@gjsify/adwaita-core 0.47.0 → 0.49.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/adjustment.js +1 -0
- package/lib/esm/avatar.js +1 -1
- package/lib/esm/conformance/adjustment.js +1 -0
- package/lib/esm/conformance/avatar.js +1 -1
- package/lib/esm/conformance/index.js +1 -1
- package/lib/esm/conformance/list.js +1 -0
- package/lib/esm/conformance/menu.js +1 -0
- package/lib/esm/conformance/rows.js +1 -1
- package/lib/esm/conformance/shared-trees.js +1 -0
- package/lib/esm/conformance/split-button.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/list.js +1 -0
- package/lib/esm/menu.js +2 -0
- package/lib/esm/rows.js +1 -1
- package/lib/esm/split-button.js +1 -1
- package/lib/esm/tab-view.js +1 -1
- package/lib/types/adjustment.d.ts +198 -0
- package/lib/types/adjustment.spec.d.ts +2 -0
- package/lib/types/avatar.d.ts +15 -0
- package/lib/types/conformance/adjustment.d.ts +33 -0
- package/lib/types/conformance/avatar.d.ts +16 -0
- package/lib/types/conformance/index.d.ts +12 -4
- package/lib/types/conformance/list.d.ts +171 -0
- package/lib/types/conformance/menu.d.ts +118 -0
- package/lib/types/conformance/rows.d.ts +3 -3
- package/lib/types/conformance/shared-trees.d.ts +93 -0
- package/lib/types/conformance/split-button.d.ts +9 -19
- package/lib/types/index.d.ts +12 -6
- package/lib/types/list.d.ts +109 -0
- package/lib/types/list.spec.d.ts +2 -0
- package/lib/types/menu.d.ts +366 -0
- package/lib/types/menu.spec.d.ts +2 -0
- package/lib/types/rows.d.ts +78 -109
- package/lib/types/shared-trees.spec.d.ts +2 -0
- package/lib/types/split-button.d.ts +21 -32
- package/lib/types/tab-view.d.ts +35 -2
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";const e={value:0,lower:0,upper:100,stepIncrement:1,pageIncrement:1,pageSize:0},t={...e,value:NaN};function finite(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function adjustmentRange(e){return[e.lower,Math.max(e.lower,e.upper-e.pageSize)]}function clampAdjustmentValue(e,t){let[n,r]=adjustmentRange(e);return typeof t!=`number`||Number.isNaN(t)?n:Math.min(r,Math.max(n,t))}function snapAdjustmentValue(e,t){let n=clampAdjustmentValue(e,t),[r,i]=adjustmentRange(e),a=(i-r)/e.stepIncrement,o=Math.floor(a+Math.max(1,Math.abs(a))*1e-12),s=Math.min(o,Math.max(0,Math.round((n-r)/e.stepIncrement)));return Math.min(i,Math.max(r,r+s*e.stepIncrement))}function normalizeAdjustment(n,r=t){let i=n??{},a=finite(i.lower,r.lower),o=Math.max(a,finite(i.upper,r.upper)),s=finite(i.stepIncrement,r.stepIncrement),c=s>0?s:r.stepIncrement>0?r.stepIncrement:e.stepIncrement,l=r.pageIncrement===r.stepIncrement,u=finite(i.pageIncrement,l?c:r.pageIncrement),d={value:0,lower:a,upper:o,stepIncrement:c,pageIncrement:u>0?u:c,pageSize:Math.max(0,finite(i.pageSize,r.pageSize))};return d.value=clampAdjustmentValue(d,typeof i.value==`number`?i.value:r.value),d}const n=[`value`,`lower`,`upper`,`stepIncrement`,`pageIncrement`,`pageSize`];function parseAdjustment(e){if(!e)return{};let t;try{t=JSON.parse(e)}catch{return{}}if(typeof t!=`object`||!t||Array.isArray(t))return{};let r=t,i={};for(let e of n){let t=r[e];typeof t==`number`&&(i[e]=t)}return i}var SpinState=class{constructor(){this._adjustment=normalizeAdjustment(),this._valueSet=!1,this._listeners=new Set,this._rangeListeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}subscribeChanged(e){return this._rangeListeners.add(e),()=>{this._rangeListeners.delete(e)}}_emit(e){let t={value:this._adjustment.value,interactive:e};for(let e of[...this._listeners])e(t)}_emitChanged(){let e=this._adjustment;for(let t of[...this._rangeListeners])t(e)}_bump(e){let t=clampAdjustmentValue(this._adjustment,this._adjustment.value+e);return t===this._adjustment.value?!1:(this._valueSet=!0,this._adjustment={...this._adjustment,value:t},this._emit(!0),!0)}get adjustment(){return{...this._adjustment}}get value(){return this._adjustment.value}configure(e){let t=this._adjustment,n=normalizeAdjustment(e,this._valueSet?t:{...t,value:NaN});typeof e?.value==`number`&&Number.isFinite(e.value)&&(this._valueSet=!0);let r=n.lower!==t.lower||n.upper!==t.upper||n.stepIncrement!==t.stepIncrement||n.pageIncrement!==t.pageIncrement||n.pageSize!==t.pageSize,i=n.value!==t.value;return!r&&!i?!1:(this._adjustment=n,r&&this._emitChanged(),i&&this._emit(!1),!0)}setValue(e){Number.isFinite(e)&&(this._valueSet=!0);let t=clampAdjustmentValue(this._adjustment,e);return t===this._adjustment.value?!1:(this._adjustment={...this._adjustment,value:t},this._emit(!1),!0)}setValueInteractive(e){Number.isFinite(e)&&(this._valueSet=!0);let t=clampAdjustmentValue(this._adjustment,e);return t===this._adjustment.value?!1:(this._adjustment={...this._adjustment,value:t},this._emit(!0),!0)}increment(){return this._bump(this._adjustment.stepIncrement)}decrement(){return this._bump(-this._adjustment.stepIncrement)}};export{e as ADW_ADJUSTMENT_DEFAULTS,SpinState,adjustmentRange,clampAdjustmentValue,normalizeAdjustment,parseAdjustment,snapAdjustmentValue};
|
package/lib/esm/avatar.js
CHANGED
|
@@ -1 +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};
|
|
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)}`}function avatarIconSize(e){return Math.trunc(e/2)}export{r as AVATAR_COLORS,n as AVATAR_COLOR_COUNT,avatarColor,avatarColorClass,avatarFontSize,avatarIconSize,avatarInitials,avatarMaxFontSize,avatarMode,flattenAvatarGradient,gStrHash,randomAvatarColorClass};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={value:0,lower:0,upper:100,stepIncrement:1,pageIncrement:1,pageSize:0},t=[{rule:`an empty adjustment is 0…100 step 1 — the shared default, not GTK's 0…0 step 0`,input:{},adjustment:e},{rule:`the unwritten fields come from that default`,input:{upper:10},adjustment:{...e,upper:10}},{rule:`a value authored ABOVE the range lands on the upper bound`,input:{lower:0,upper:10,value:99},adjustment:{...e,upper:10,value:10}},{rule:`a value authored BELOW the range lands on the lower bound`,input:{lower:5,upper:10,value:1},adjustment:{...e,lower:5,upper:10,value:5}},{rule:`a zero step becomes 1 — GTK's default step is a stepper that cannot move`,input:{stepIncrement:0},adjustment:e},{rule:`the page increment follows the step until one is authored`,input:{stepIncrement:5},adjustment:{...e,stepIncrement:5,pageIncrement:5}},{rule:`an upper below the lower collapses the range to a point rather than inverting it`,input:{lower:10,upper:2,value:7},adjustment:{...e,lower:10,upper:10,value:10}},{rule:`a page size takes its bite out of the top: the value may reach upper - pageSize`,input:{lower:0,upper:100,pageSize:20,value:95},adjustment:{...e,pageSize:20,value:80}},{rule:`an unwritten value on a range that excludes zero lands at the BOTTOM, not the top`,input:{lower:-100,upper:-50},adjustment:{...e,lower:-100,upper:-50,value:-100}}],n=[{rule:`reads the fields the JSON names`,raw:`{"lower":1,"upper":20}`,input:{lower:1,upper:20}},{rule:`names no value where the JSON names none, so an authored value survives the write`,raw:`{"upper":20}`,input:{upper:20}},{rule:`drops a key an adjustment does not have`,raw:`{"min":1,"upper":20}`,input:{upper:20}},{rule:`drops a field that is not a number`,raw:`{"upper":"20"}`,input:{}},{rule:`absent is nothing authored`,raw:null,input:{}},{rule:`unparseable is nothing authored, and not a throw`,raw:`{lower:1`,input:{}},{rule:`well-formed JSON that is not an object is nothing authored`,raw:`[1,2]`,input:{}}],r=[{rule:`ticks are counted from the LOWER bound, not from zero`,input:{lower:1,upper:10,stepIncrement:3},from:5,snapped:4},{rule:`and it rounds to the nearer of the two`,input:{lower:1,upper:10,stepIncrement:3},from:6,snapped:7},{rule:`a drag past the top clamps first, so an upper off the grid is not reachable`,input:{lower:0,upper:10,stepIncrement:3},from:99,snapped:9},{rule:`an upper ON the grid is reachable`,input:{lower:0,upper:9,stepIncrement:3},from:99,snapped:9},{rule:`a drag below the bottom lands on the lower bound`,input:{lower:16,upper:64,stepIncrement:4},from:-99,snapped:16},{rule:`a value already on a tick does not move`,input:{lower:0,upper:10,stepIncrement:2},from:6,snapped:6},{rule:`an upper bound off the grid is not reachable, even when the drag ends ON it`,input:{lower:0,upper:10,stepIncrement:4},from:10,snapped:8},{rule:`an upper bound ON the grid is reachable, decimal step and all`,input:{lower:0,upper:.3,stepIncrement:.1},from:.3,snapped:.3},{rule:`and a tick below it is exact rather than one step off the accumulated sum`,input:{lower:0,upper:.3,stepIncrement:.1},from:.21,snapped:.2}];export{t as ADJUSTMENT_AUTHORED_VECTORS,n as ADJUSTMENT_PARSE_VECTORS,r as ADJUSTMENT_SNAP_VECTORS};
|
|
@@ -1 +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`}],
|
|
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=[{size:16,iconSize:8},{size:24,iconSize:12},{size:31,iconSize:15},{size:32,iconSize:16},{size:48,iconSize:24},{size:96,iconSize:48},{size:128,iconSize:64}],r=[{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`}],i=[{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{i as AVATAR_COLOR_VECTORS,t as AVATAR_FONT_SIZE_VECTORS,n as AVATAR_ICON_SIZE_VECTORS,e as AVATAR_INITIALS_VECTORS,r as AVATAR_MODE_VECTORS};
|
|
@@ -1 +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{ACCENT_COLOR_VECTORS as p}from"./accent.js";import{ACTION_ROW_ACTIVATION_VECTORS as m,BUTTON_ROW_ACTIVATABLE_VECTORS as h,BUTTON_ROW_ICON_VECTORS as g,LABEL_VISIBILITY_VECTORS as _,SWITCH_ROW_NOTIFY_VECTORS as v,WINDOW_TITLE_VECTORS as y}from"./action-row.js";import{AVATAR_COLOR_VECTORS as b,AVATAR_FONT_SIZE_VECTORS as x,AVATAR_INITIALS_VECTORS as S,AVATAR_MODE_VECTORS as C}from"./avatar.js";import{BANNER_BUTTON_STYLE_PARSE_VECTORS as w,BANNER_BUTTON_STYLE_VECTORS as T,BANNER_BUTTON_TEXT_VECTORS as E,BANNER_BUTTON_VISIBLE_VECTORS as D,BANNER_DEFAULT_VECTORS as O}from"./banner.js";import{BREAKPOINT_PICK_VECTORS as k,BREAKPOINT_TRANSITION_VECTORS as A}from"./breakpoint-bin.js";import{BUTTON_CONTENT_DEFAULT_VECTORS as j,BUTTON_CONTENT_ELLIPSIZE_VECTORS as M,BUTTON_CONTENT_ICON_VECTORS as N,BUTTON_CONTENT_LABEL_VECTORS as P,BUTTON_CONTENT_STYLE_TARGET_VECTORS as F,BUTTON_CONTENT_TEXT_VECTORS as I}from"./button-content.js";import{BUTTON_STYLE_CLASS_VECTORS as L}from"./button.js";import{CAROUSEL_CLAMP_VECTORS as R,CAROUSEL_NAVIGATE_VECTORS as z,CAROUSEL_PAGE_ALLOCATION_VECTORS as B,CAROUSEL_PAGE_AT_POSITION_VECTORS as V,CAROUSEL_PAGE_LIST_VECTORS as H,CAROUSEL_PROPERTY_DEFAULT_VECTORS as U,CAROUSEL_RANGE_VECTORS as W,CAROUSEL_REORDER_SHIFT_VECTORS as G,CAROUSEL_REVEAL_VECTORS as K,CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS as q,CAROUSEL_SNAP_POINT_VECTORS as J,CAROUSEL_WHEEL_LOCKOUT_VECTORS as Y,CAROUSEL_WHEEL_VECTORS as X}from"./carousel.js";import{RADIO_GROUP_VECTORS as Z}from"./checks.js";import{CLAMP_ALLOCATE_VECTORS as Q,CLAMP_CHILD_SIZE_VECTORS as $,CLAMP_PROPERTY_VECTORS as ee,CLAMP_SIZE_FROM_CHILD_VECTORS as te,CLAMP_THRESHOLD_VECTORS as ne,SPINNER_GEOMETRY_VECTORS as re,SPINNER_SIZE_VECTORS as ie,TOOLBAR_VIEW_ALLOCATE_VECTORS as ae,TOOLBAR_VIEW_CLASS_VECTORS as oe,TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS as se,TOOLBAR_VIEW_MEASURE_VECTORS as ce}from"./chrome.js";import{DATA_GRID_CELL_TEXT_VECTORS as le,DATA_GRID_COLUMN_CLASS_VECTORS as ue,DATA_GRID_COLUMN_NORMALIZE_VECTORS as de,DATA_GRID_INTERACTIVE_VECTORS as fe,DATA_GRID_TRACK_VECTORS as pe,DATA_GRID_VARIANT_VECTORS as me}from"./data-grid.js";import{BOTTOM_SHEET_CLOSE_VECTORS as he,BOTTOM_SHEET_PRESENTATION_VECTORS as ge,runBottomSheetSteps as _e}from"./dialog.js";import{ENTRY_MAX_LENGTH_VECTORS as ve,ENTRY_ROW_ACTIVATION_VECTORS as ye,ENTRY_ROW_GUARD_VECTORS as be,ENTRY_ROW_STATE_VECTORS as xe,ENTRY_TEXT_LENGTH_VECTORS as Se,PASSWORD_ENTRY_ROW_VECTORS as Ce,PASSWORD_REVEAL_GUARD_VECTORS as we}from"./entry-row.js";import{HEADER_BAR_PACK_VECTORS as Te,HEADER_BAR_TITLE_SOURCE_VECTORS as Ee,HEADER_BAR_TITLE_WIDGET_VECTORS as De}from"./header-bar.js";import{COMBO_CHOOSER_VECTORS as Oe,COMBO_SELECTION_VECTORS as ke}from"./rows.js";import{VIEW_STACK_ICON_NAME_VECTORS as Ae,VIEW_STACK_PAGE_VECTORS as je,VIEW_STACK_VECTORS as Me}from"./view-stack.js";import{NAVIGATION_VIEW_VECTORS as Ne,collectNavigationState as Pe,navigationEventLog as Fe,runNavigationSteps as Ie}from"./navigation-view.js";import{SIDEBAR_ACTIVATION_VECTORS as Le,SIDEBAR_CLAMP_VECTORS as Re,SIDEBAR_FILTER_VECTORS as ze,SIDEBAR_ITEMS_CHANGED_VECTORS as Be,SIDEBAR_ITEM_FLAG_VECTORS as Ve,SIDEBAR_MODEL_VECTORS as He,SIDEBAR_MODE_VECTORS as Ue}from"./sidebar.js";import{ADW_LENGTH_UNIT_VECTORS as We,GLIB_CLAMP_VECTORS as Ge,NATURAL_SIDEBAR_WIDTH_VECTORS as Ke,NAVIGATION_ACTION_VECTORS as qe,NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS as Je,NAVIGATION_STACK_VECTORS as Ye,OVERLAY_COLLAPSE_VECTORS as Xe,OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS as Ze,OVERLAY_SWIPE_AREA_VECTORS as Qe,OVERLAY_SWIPE_CANCEL_VECTORS as $e,OVERLAY_SWIPE_RELEASE_VECTORS as et,OVERLAY_SWIPE_SNAP_POINT_VECTORS as tt,OVERLAY_SWIPE_START_VECTORS as nt,SIDEBAR_BOUNDS_VECTORS as rt,SIDEBAR_WIDTH_VECTORS as it,SPLIT_VIEW_MEASURE_VECTORS as at,TAGS_CONFLICT_VECTORS as ot}from"./split-view.js";import{MENU_BUTTON_DIRECTION_VECTORS as st,SPLIT_BUTTON_CONTENT_VECTORS as ct,SPLIT_BUTTON_DIRECTION_VECTORS as lt,SPLIT_BUTTON_DROPDOWN_VECTORS as ut,SPLIT_BUTTON_MENU_ACTIVATION_VECTORS as dt,SPLIT_BUTTON_MENU_PARSE_VECTORS as ft,SPLIT_BUTTON_ROOT_STATE_VECTORS as pt,SPLIT_BUTTON_STYLE_CLASS_VECTORS as mt,SPLIT_BUTTON_TOOLTIP_VECTORS as ht}from"./split-button.js";import{INLINE_TOGGLE_VECTORS as gt,INLINE_TOOLTIP_VECTORS as _t,VIEW_SWITCHER_BADGE_VECTORS as vt,VIEW_SWITCHER_BAR_REVEAL_VECTORS as yt,VIEW_SWITCHER_BAR_VECTORS as bt,VIEW_SWITCHER_BUTTON_VECTORS as xt,VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS as St,VIEW_SWITCHER_DRAG_VECTORS as Ct,VIEW_SWITCHER_ICON_VECTORS as wt,VIEW_SWITCHER_MNEMONIC_VECTORS as Tt,VIEW_SWITCHER_REBUILD_VECTORS as Et,VIEW_SWITCHER_SELECTION_VECTORS as Dt,createViewSwitcherClock as Ot}from"./view-switcher.js";import{TABS_REVEALED_VECTORS as kt,TAB_CLOSE_VISIBLE_VECTORS as At,TAB_DESCENDANT_VECTORS as jt,TAB_ICON_STATE_VECTORS as Mt,TAB_PAGE_DESCRIPTOR_VECTORS as Nt,TAB_SUCCESSOR_VECTORS as Pt,TAB_TOOLTIP_VECTORS as Ft,TAB_VIEW_VECTORS as It,applyTabViewOp as Lt,seedTabViewPages as Rt,tabViewClosing as zt,tabViewOrder as Bt}from"./tab-view.js";import{CASE_FOLD_VECTORS as Vt,MAKE_COMPARABLE_VECTORS as Ht,PREFERENCES_GROUP_HEADER_VECTORS as Ut,PREFERENCES_SEARCH_PAGES as Wt,PREFERENCES_SEARCH_VECTORS as Gt,ROW_MATCH_VECTORS as Kt,SEARCH_CORPUS_VECTORS as qt,SEARCH_ROW_SUBTITLE_VECTORS as Jt,STRIP_MARKUP_VECTORS as Yt,STRIP_MNEMONIC_VECTORS as Xt}from"./preferences.js";import{POPOVER_KEY_VECTORS as Zt,POPOVER_SURFACE_VECTORS as Qt}from"./popover.js";import{SHORTCUT_LABEL_VECTORS as $t,formatShortcutLabelNodes as en}from"./shortcut-label.js";import{SPINNER_ARC_ENVELOPE as tn,SPINNER_ARC_PHASE_VECTORS as nn,SPINNER_ARC_TOLERANCE as rn,SPINNER_CONSTANT_VECTORS as an}from"./spinner.js";import{WRAP_BOX_CHILD_ORDER_VECTORS as on,WRAP_BOX_LENGTH_VECTORS as sn,WRAP_BOX_LINE_VECTORS as cn,WRAP_BOX_NATURAL_LENGTH_VECTORS as ln,WRAP_BOX_NOTIFY_PROPERTIES as un,WRAP_BOX_POLICY_VECTORS as dn,WRAP_BOX_SPACING_NOTIFY_VECTORS as fn,WRAP_BOX_SPACING_VECTORS as pn}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 ACCENT_COLOR_VECTORS,m as ACTION_ROW_ACTIVATION_VECTORS,We as ADW_LENGTH_UNIT_VECTORS,b as AVATAR_COLOR_VECTORS,x as AVATAR_FONT_SIZE_VECTORS,S as AVATAR_INITIALS_VECTORS,C as AVATAR_MODE_VECTORS,w as BANNER_BUTTON_STYLE_PARSE_VECTORS,T as BANNER_BUTTON_STYLE_VECTORS,E as BANNER_BUTTON_TEXT_VECTORS,D as BANNER_BUTTON_VISIBLE_VECTORS,O as BANNER_DEFAULT_VECTORS,he as BOTTOM_SHEET_CLOSE_VECTORS,ge as BOTTOM_SHEET_PRESENTATION_VECTORS,k as BREAKPOINT_PICK_VECTORS,A as BREAKPOINT_TRANSITION_VECTORS,j as BUTTON_CONTENT_DEFAULT_VECTORS,M as BUTTON_CONTENT_ELLIPSIZE_VECTORS,N as BUTTON_CONTENT_ICON_VECTORS,P as BUTTON_CONTENT_LABEL_VECTORS,F as BUTTON_CONTENT_STYLE_TARGET_VECTORS,I as BUTTON_CONTENT_TEXT_VECTORS,h as BUTTON_ROW_ACTIVATABLE_VECTORS,g as BUTTON_ROW_ICON_VECTORS,L as BUTTON_STYLE_CLASS_VECTORS,R as CAROUSEL_CLAMP_VECTORS,z as CAROUSEL_NAVIGATE_VECTORS,B as CAROUSEL_PAGE_ALLOCATION_VECTORS,V as CAROUSEL_PAGE_AT_POSITION_VECTORS,H as CAROUSEL_PAGE_LIST_VECTORS,U as CAROUSEL_PROPERTY_DEFAULT_VECTORS,W as CAROUSEL_RANGE_VECTORS,G as CAROUSEL_REORDER_SHIFT_VECTORS,K as CAROUSEL_REVEAL_VECTORS,q as CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS,J as CAROUSEL_SNAP_POINT_VECTORS,Y as CAROUSEL_WHEEL_LOCKOUT_VECTORS,X as CAROUSEL_WHEEL_VECTORS,Vt as CASE_FOLD_VECTORS,Q as CLAMP_ALLOCATE_VECTORS,$ as CLAMP_CHILD_SIZE_VECTORS,ee as CLAMP_PROPERTY_VECTORS,te as CLAMP_SIZE_FROM_CHILD_VECTORS,ne as CLAMP_THRESHOLD_VECTORS,Oe as COMBO_CHOOSER_VECTORS,ke as COMBO_SELECTION_VECTORS,a as CREDITS_SECTIONS_VECTORS,o as CREDIT_PERSON_VECTORS,le as DATA_GRID_CELL_TEXT_VECTORS,ue as DATA_GRID_COLUMN_CLASS_VECTORS,de as DATA_GRID_COLUMN_NORMALIZE_VECTORS,fe as DATA_GRID_INTERACTIVE_VECTORS,pe as DATA_GRID_TRACK_VECTORS,me as DATA_GRID_VARIANT_VECTORS,ve as ENTRY_MAX_LENGTH_VECTORS,ye as ENTRY_ROW_ACTIVATION_VECTORS,be as ENTRY_ROW_GUARD_VECTORS,xe as ENTRY_ROW_STATE_VECTORS,Se as ENTRY_TEXT_LENGTH_VECTORS,Ge as GLIB_CLAMP_VECTORS,Te as HEADER_BAR_PACK_VECTORS,Ee as HEADER_BAR_TITLE_SOURCE_VECTORS,De as HEADER_BAR_TITLE_WIDGET_VECTORS,gt as INLINE_TOGGLE_VECTORS,_t as INLINE_TOOLTIP_VECTORS,_ 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,Ht as MAKE_COMPARABLE_VECTORS,st as MENU_BUTTON_DIRECTION_VECTORS,Ke as NATURAL_SIDEBAR_WIDTH_VECTORS,qe as NAVIGATION_ACTION_VECTORS,Je as NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS,Ye as NAVIGATION_STACK_VECTORS,Ne as NAVIGATION_VIEW_VECTORS,Xe as OVERLAY_COLLAPSE_VECTORS,Ze as OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS,Qe as OVERLAY_SWIPE_AREA_VECTORS,$e as OVERLAY_SWIPE_CANCEL_VECTORS,et as OVERLAY_SWIPE_RELEASE_VECTORS,tt as OVERLAY_SWIPE_SNAP_POINT_VECTORS,nt as OVERLAY_SWIPE_START_VECTORS,Ce as PASSWORD_ENTRY_ROW_VECTORS,we as PASSWORD_REVEAL_GUARD_VECTORS,Zt as POPOVER_KEY_VECTORS,Qt as POPOVER_SURFACE_VECTORS,Ut as PREFERENCES_GROUP_HEADER_VECTORS,Wt as PREFERENCES_SEARCH_PAGES,Gt as PREFERENCES_SEARCH_VECTORS,Z as RADIO_GROUP_VECTORS,Kt as ROW_MATCH_VECTORS,qt as SEARCH_CORPUS_VECTORS,Jt as SEARCH_ROW_SUBTITLE_VECTORS,$t as SHORTCUT_LABEL_VECTORS,Le as SIDEBAR_ACTIVATION_VECTORS,rt as SIDEBAR_BOUNDS_VECTORS,Re as SIDEBAR_CLAMP_VECTORS,ze as SIDEBAR_FILTER_VECTORS,Be as SIDEBAR_ITEMS_CHANGED_VECTORS,Ve as SIDEBAR_ITEM_FLAG_VECTORS,He as SIDEBAR_MODEL_VECTORS,Ue as SIDEBAR_MODE_VECTORS,it as SIDEBAR_WIDTH_VECTORS,tn as SPINNER_ARC_ENVELOPE,nn as SPINNER_ARC_PHASE_VECTORS,rn as SPINNER_ARC_TOLERANCE,an as SPINNER_CONSTANT_VECTORS,re as SPINNER_GEOMETRY_VECTORS,ie as SPINNER_SIZE_VECTORS,ct as SPLIT_BUTTON_CONTENT_VECTORS,lt as SPLIT_BUTTON_DIRECTION_VECTORS,ut as SPLIT_BUTTON_DROPDOWN_VECTORS,dt as SPLIT_BUTTON_MENU_ACTIVATION_VECTORS,ft as SPLIT_BUTTON_MENU_PARSE_VECTORS,pt as SPLIT_BUTTON_ROOT_STATE_VECTORS,mt as SPLIT_BUTTON_STYLE_CLASS_VECTORS,ht as SPLIT_BUTTON_TOOLTIP_VECTORS,at as SPLIT_VIEW_MEASURE_VECTORS,Yt as STRIP_MARKUP_VECTORS,Xt as STRIP_MNEMONIC_VECTORS,v as SWITCH_ROW_NOTIFY_VECTORS,kt as TABS_REVEALED_VECTORS,At as TAB_CLOSE_VISIBLE_VECTORS,jt as TAB_DESCENDANT_VECTORS,Mt as TAB_ICON_STATE_VECTORS,Nt as TAB_PAGE_DESCRIPTOR_VECTORS,Pt as TAB_SUCCESSOR_VECTORS,Ft as TAB_TOOLTIP_VECTORS,It as TAB_VIEW_VECTORS,ot as TAGS_CONFLICT_VECTORS,ae as TOOLBAR_VIEW_ALLOCATE_VECTORS,oe as TOOLBAR_VIEW_CLASS_VECTORS,se as TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS,ce as TOOLBAR_VIEW_MEASURE_VECTORS,f as TRANSLATOR_CREDITS_VECTORS,Ae as VIEW_STACK_ICON_NAME_VECTORS,je as VIEW_STACK_PAGE_VECTORS,Me as VIEW_STACK_VECTORS,vt as VIEW_SWITCHER_BADGE_VECTORS,yt as VIEW_SWITCHER_BAR_REVEAL_VECTORS,bt as VIEW_SWITCHER_BAR_VECTORS,xt as VIEW_SWITCHER_BUTTON_VECTORS,St as VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS,Ct as VIEW_SWITCHER_DRAG_VECTORS,wt as VIEW_SWITCHER_ICON_VECTORS,Tt as VIEW_SWITCHER_MNEMONIC_VECTORS,Et as VIEW_SWITCHER_REBUILD_VECTORS,Dt as VIEW_SWITCHER_SELECTION_VECTORS,y as WINDOW_TITLE_VECTORS,on as WRAP_BOX_CHILD_ORDER_VECTORS,sn as WRAP_BOX_LENGTH_VECTORS,cn as WRAP_BOX_LINE_VECTORS,ln as WRAP_BOX_NATURAL_LENGTH_VECTORS,un as WRAP_BOX_NOTIFY_PROPERTIES,dn as WRAP_BOX_POLICY_VECTORS,fn as WRAP_BOX_SPACING_NOTIFY_VECTORS,pn as WRAP_BOX_SPACING_VECTORS,Lt as applyTabViewOp,Pe as collectNavigationState,Ot as createViewSwitcherClock,en as formatShortcutLabelNodes,Fe as navigationEventLog,_e as runBottomSheetSteps,Ie as runNavigationSteps,Rt as seedTabViewPages,zt as tabViewClosing,Bt as tabViewOrder};
|
|
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{ACCENT_COLOR_VECTORS as p}from"./accent.js";import{ACTION_ROW_ACTIVATION_VECTORS as m,BUTTON_ROW_ACTIVATABLE_VECTORS as h,BUTTON_ROW_ICON_VECTORS as g,LABEL_VISIBILITY_VECTORS as _,SWITCH_ROW_NOTIFY_VECTORS as v,WINDOW_TITLE_VECTORS as y}from"./action-row.js";import{ADJUSTMENT_AUTHORED_VECTORS as b,ADJUSTMENT_PARSE_VECTORS as x,ADJUSTMENT_SNAP_VECTORS as S}from"./adjustment.js";import{AVATAR_COLOR_VECTORS as C,AVATAR_FONT_SIZE_VECTORS as w,AVATAR_ICON_SIZE_VECTORS as T,AVATAR_INITIALS_VECTORS as E,AVATAR_MODE_VECTORS as D}from"./avatar.js";import{BANNER_BUTTON_STYLE_PARSE_VECTORS as O,BANNER_BUTTON_STYLE_VECTORS as k,BANNER_BUTTON_TEXT_VECTORS as A,BANNER_BUTTON_VISIBLE_VECTORS as j,BANNER_DEFAULT_VECTORS as M}from"./banner.js";import{BREAKPOINT_PICK_VECTORS as N,BREAKPOINT_TRANSITION_VECTORS as P}from"./breakpoint-bin.js";import{BUTTON_CONTENT_DEFAULT_VECTORS as F,BUTTON_CONTENT_ELLIPSIZE_VECTORS as I,BUTTON_CONTENT_ICON_VECTORS as L,BUTTON_CONTENT_LABEL_VECTORS as R,BUTTON_CONTENT_STYLE_TARGET_VECTORS as z,BUTTON_CONTENT_TEXT_VECTORS as B}from"./button-content.js";import{BUTTON_STYLE_CLASS_VECTORS as V}from"./button.js";import{CAROUSEL_CLAMP_VECTORS as H,CAROUSEL_NAVIGATE_VECTORS as U,CAROUSEL_PAGE_ALLOCATION_VECTORS as W,CAROUSEL_PAGE_AT_POSITION_VECTORS as G,CAROUSEL_PAGE_LIST_VECTORS as K,CAROUSEL_PROPERTY_DEFAULT_VECTORS as q,CAROUSEL_RANGE_VECTORS as J,CAROUSEL_REORDER_SHIFT_VECTORS as Y,CAROUSEL_REVEAL_VECTORS as X,CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS as Z,CAROUSEL_SNAP_POINT_VECTORS as Q,CAROUSEL_WHEEL_LOCKOUT_VECTORS as $,CAROUSEL_WHEEL_VECTORS as ee}from"./carousel.js";import{RADIO_GROUP_VECTORS as te}from"./checks.js";import{CLAMP_ALLOCATE_VECTORS as ne,CLAMP_CHILD_SIZE_VECTORS as re,CLAMP_PROPERTY_VECTORS as ie,CLAMP_SIZE_FROM_CHILD_VECTORS as ae,CLAMP_THRESHOLD_VECTORS as oe,SPINNER_GEOMETRY_VECTORS as se,SPINNER_SIZE_VECTORS as ce,TOOLBAR_VIEW_ALLOCATE_VECTORS as le,TOOLBAR_VIEW_CLASS_VECTORS as ue,TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS as de,TOOLBAR_VIEW_MEASURE_VECTORS as fe}from"./chrome.js";import{DATA_GRID_CELL_TEXT_VECTORS as pe,DATA_GRID_COLUMN_CLASS_VECTORS as me,DATA_GRID_COLUMN_NORMALIZE_VECTORS as he,DATA_GRID_INTERACTIVE_VECTORS as ge,DATA_GRID_TRACK_VECTORS as _e,DATA_GRID_VARIANT_VECTORS as ve}from"./data-grid.js";import{BOTTOM_SHEET_CLOSE_VECTORS as ye,BOTTOM_SHEET_PRESENTATION_VECTORS as be,runBottomSheetSteps as xe}from"./dialog.js";import{ENTRY_MAX_LENGTH_VECTORS as Se,ENTRY_ROW_ACTIVATION_VECTORS as Ce,ENTRY_ROW_GUARD_VECTORS as we,ENTRY_ROW_STATE_VECTORS as Te,ENTRY_TEXT_LENGTH_VECTORS as Ee,PASSWORD_ENTRY_ROW_VECTORS as De,PASSWORD_REVEAL_GUARD_VECTORS as Oe}from"./entry-row.js";import{HEADER_BAR_PACK_VECTORS as ke,HEADER_BAR_TITLE_SOURCE_VECTORS as Ae,HEADER_BAR_TITLE_WIDGET_VECTORS as je}from"./header-bar.js";import{COMBO_CHOOSER_VECTORS as Me,COMBO_SELECTION_VECTORS as Ne}from"./rows.js";import{VIEW_STACK_ICON_NAME_VECTORS as Pe,VIEW_STACK_PAGE_VECTORS as Fe,VIEW_STACK_VECTORS as Ie}from"./view-stack.js";import{NAVIGATION_VIEW_VECTORS as Le,collectNavigationState as Re,navigationEventLog as ze,runNavigationSteps as Be}from"./navigation-view.js";import{SIDEBAR_ACTIVATION_VECTORS as Ve,SIDEBAR_CLAMP_VECTORS as He,SIDEBAR_FILTER_VECTORS as Ue,SIDEBAR_ITEMS_CHANGED_VECTORS as We,SIDEBAR_ITEM_FLAG_VECTORS as Ge,SIDEBAR_MODEL_VECTORS as Ke,SIDEBAR_MODE_VECTORS as qe}from"./sidebar.js";import{ADW_LENGTH_UNIT_VECTORS as Je,GLIB_CLAMP_VECTORS as Ye,NATURAL_SIDEBAR_WIDTH_VECTORS as Xe,NAVIGATION_ACTION_VECTORS as Ze,NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS as Qe,NAVIGATION_STACK_VECTORS as $e,OVERLAY_COLLAPSE_VECTORS as et,OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS as tt,OVERLAY_SWIPE_AREA_VECTORS as nt,OVERLAY_SWIPE_CANCEL_VECTORS as rt,OVERLAY_SWIPE_RELEASE_VECTORS as it,OVERLAY_SWIPE_SNAP_POINT_VECTORS as at,OVERLAY_SWIPE_START_VECTORS as ot,SIDEBAR_BOUNDS_VECTORS as st,SIDEBAR_WIDTH_VECTORS as ct,SPLIT_VIEW_MEASURE_VECTORS as lt,TAGS_CONFLICT_VECTORS as ut}from"./split-view.js";import{MENU_BUTTON_DIRECTION_VECTORS as dt,SPLIT_BUTTON_CONTENT_VECTORS as ft,SPLIT_BUTTON_DIRECTION_VECTORS as pt,SPLIT_BUTTON_DROPDOWN_VECTORS as mt,SPLIT_BUTTON_MENU_ACTIVATION_VECTORS as ht,SPLIT_BUTTON_ROOT_STATE_VECTORS as gt,SPLIT_BUTTON_STYLE_CLASS_VECTORS as _t,SPLIT_BUTTON_TOOLTIP_VECTORS as vt}from"./split-button.js";import{LIST_ITEMS_CHANGED_VECTORS as yt,LIST_MODEL_OWNERSHIP_VECTORS as bt,LIST_NORMALIZE_VECTORS as xt,LIST_PARSE_VECTORS as St,LIST_SELECTION_CLAMP_VECTORS as Ct,TAB_PAGES_ITEMS_CHANGED_VECTORS as wt,applyListReadback as Tt,replayTabPagesAsSplices as Et}from"./list.js";import{MENU_DETAILED_ACTION_VECTORS as Dt,MENU_FLATTEN_VECTORS as Ot,MENU_ITEM_STATE_VECTORS as kt,MENU_NORMALIZE_VECTORS as At,MENU_PARSE_VECTORS as jt,MENU_REFUSAL_VECTORS as Mt}from"./menu.js";import{INLINE_TOGGLE_VECTORS as Nt,INLINE_TOOLTIP_VECTORS as Pt,VIEW_SWITCHER_BADGE_VECTORS as Ft,VIEW_SWITCHER_BAR_REVEAL_VECTORS as It,VIEW_SWITCHER_BAR_VECTORS as Lt,VIEW_SWITCHER_BUTTON_VECTORS as Rt,VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS as zt,VIEW_SWITCHER_DRAG_VECTORS as Bt,VIEW_SWITCHER_ICON_VECTORS as Vt,VIEW_SWITCHER_MNEMONIC_VECTORS as Ht,VIEW_SWITCHER_REBUILD_VECTORS as Ut,VIEW_SWITCHER_SELECTION_VECTORS as Wt,createViewSwitcherClock as Gt}from"./view-switcher.js";import{TABS_REVEALED_VECTORS as Kt,TAB_CLOSE_VISIBLE_VECTORS as qt,TAB_DESCENDANT_VECTORS as Jt,TAB_ICON_STATE_VECTORS as Yt,TAB_PAGE_DESCRIPTOR_VECTORS as Xt,TAB_SUCCESSOR_VECTORS as Zt,TAB_TOOLTIP_VECTORS as Qt,TAB_VIEW_VECTORS as $t,applyTabViewOp as en,seedTabViewPages as tn,tabViewClosing as nn,tabViewOrder as rn}from"./tab-view.js";import{CASE_FOLD_VECTORS as an,MAKE_COMPARABLE_VECTORS as on,PREFERENCES_GROUP_HEADER_VECTORS as sn,PREFERENCES_SEARCH_PAGES as cn,PREFERENCES_SEARCH_VECTORS as ln,ROW_MATCH_VECTORS as un,SEARCH_CORPUS_VECTORS as dn,SEARCH_ROW_SUBTITLE_VECTORS as fn,STRIP_MARKUP_VECTORS as pn,STRIP_MNEMONIC_VECTORS as mn}from"./preferences.js";import{POPOVER_KEY_VECTORS as hn,POPOVER_SURFACE_VECTORS as gn}from"./popover.js";import{SHORTCUT_LABEL_VECTORS as _n,formatShortcutLabelNodes as vn}from"./shortcut-label.js";import{SPINNER_ARC_ENVELOPE as yn,SPINNER_ARC_PHASE_VECTORS as bn,SPINNER_ARC_TOLERANCE as xn,SPINNER_CONSTANT_VECTORS as Sn}from"./spinner.js";import{WRAP_BOX_CHILD_ORDER_VECTORS as Cn,WRAP_BOX_LENGTH_VECTORS as wn,WRAP_BOX_LINE_VECTORS as Tn,WRAP_BOX_NATURAL_LENGTH_VECTORS as En,WRAP_BOX_NOTIFY_PROPERTIES as Dn,WRAP_BOX_POLICY_VECTORS as On,WRAP_BOX_SPACING_NOTIFY_VECTORS as kn,WRAP_BOX_SPACING_VECTORS as An}from"./wrap-box.js";import{SHARED_TREE_BLOCKS_WITHOUT_EXPECTATIONS as jn,SHARED_TREE_TABLES as Mn,authoredNodes as Nn,authoredTags as Pn,reachedTables as Fn,sharedTreeExpectations as In,subjectIndexOf as Ln}from"./shared-trees.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 ACCENT_COLOR_VECTORS,m as ACTION_ROW_ACTIVATION_VECTORS,b as ADJUSTMENT_AUTHORED_VECTORS,x as ADJUSTMENT_PARSE_VECTORS,S as ADJUSTMENT_SNAP_VECTORS,Je as ADW_LENGTH_UNIT_VECTORS,C as AVATAR_COLOR_VECTORS,w as AVATAR_FONT_SIZE_VECTORS,T as AVATAR_ICON_SIZE_VECTORS,E as AVATAR_INITIALS_VECTORS,D as AVATAR_MODE_VECTORS,O as BANNER_BUTTON_STYLE_PARSE_VECTORS,k as BANNER_BUTTON_STYLE_VECTORS,A as BANNER_BUTTON_TEXT_VECTORS,j as BANNER_BUTTON_VISIBLE_VECTORS,M as BANNER_DEFAULT_VECTORS,ye as BOTTOM_SHEET_CLOSE_VECTORS,be as BOTTOM_SHEET_PRESENTATION_VECTORS,N as BREAKPOINT_PICK_VECTORS,P as BREAKPOINT_TRANSITION_VECTORS,F as BUTTON_CONTENT_DEFAULT_VECTORS,I as BUTTON_CONTENT_ELLIPSIZE_VECTORS,L as BUTTON_CONTENT_ICON_VECTORS,R as BUTTON_CONTENT_LABEL_VECTORS,z as BUTTON_CONTENT_STYLE_TARGET_VECTORS,B as BUTTON_CONTENT_TEXT_VECTORS,h as BUTTON_ROW_ACTIVATABLE_VECTORS,g as BUTTON_ROW_ICON_VECTORS,V as BUTTON_STYLE_CLASS_VECTORS,H as CAROUSEL_CLAMP_VECTORS,U as CAROUSEL_NAVIGATE_VECTORS,W as CAROUSEL_PAGE_ALLOCATION_VECTORS,G as CAROUSEL_PAGE_AT_POSITION_VECTORS,K as CAROUSEL_PAGE_LIST_VECTORS,q as CAROUSEL_PROPERTY_DEFAULT_VECTORS,J as CAROUSEL_RANGE_VECTORS,Y as CAROUSEL_REORDER_SHIFT_VECTORS,X as CAROUSEL_REVEAL_VECTORS,Z as CAROUSEL_SIZES_FROM_SNAP_POINTS_VECTORS,Q as CAROUSEL_SNAP_POINT_VECTORS,$ as CAROUSEL_WHEEL_LOCKOUT_VECTORS,ee as CAROUSEL_WHEEL_VECTORS,an as CASE_FOLD_VECTORS,ne as CLAMP_ALLOCATE_VECTORS,re as CLAMP_CHILD_SIZE_VECTORS,ie as CLAMP_PROPERTY_VECTORS,ae as CLAMP_SIZE_FROM_CHILD_VECTORS,oe as CLAMP_THRESHOLD_VECTORS,Me as COMBO_CHOOSER_VECTORS,Ne as COMBO_SELECTION_VECTORS,a as CREDITS_SECTIONS_VECTORS,o as CREDIT_PERSON_VECTORS,pe as DATA_GRID_CELL_TEXT_VECTORS,me as DATA_GRID_COLUMN_CLASS_VECTORS,he as DATA_GRID_COLUMN_NORMALIZE_VECTORS,ge as DATA_GRID_INTERACTIVE_VECTORS,_e as DATA_GRID_TRACK_VECTORS,ve as DATA_GRID_VARIANT_VECTORS,Se as ENTRY_MAX_LENGTH_VECTORS,Ce as ENTRY_ROW_ACTIVATION_VECTORS,we as ENTRY_ROW_GUARD_VECTORS,Te as ENTRY_ROW_STATE_VECTORS,Ee as ENTRY_TEXT_LENGTH_VECTORS,Ye as GLIB_CLAMP_VECTORS,ke as HEADER_BAR_PACK_VECTORS,Ae as HEADER_BAR_TITLE_SOURCE_VECTORS,je as HEADER_BAR_TITLE_WIDGET_VECTORS,Nt as INLINE_TOGGLE_VECTORS,Pt as INLINE_TOOLTIP_VECTORS,_ 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,yt as LIST_ITEMS_CHANGED_VECTORS,bt as LIST_MODEL_OWNERSHIP_VECTORS,xt as LIST_NORMALIZE_VECTORS,St as LIST_PARSE_VECTORS,Ct as LIST_SELECTION_CLAMP_VECTORS,on as MAKE_COMPARABLE_VECTORS,dt as MENU_BUTTON_DIRECTION_VECTORS,Dt as MENU_DETAILED_ACTION_VECTORS,Ot as MENU_FLATTEN_VECTORS,kt as MENU_ITEM_STATE_VECTORS,At as MENU_NORMALIZE_VECTORS,jt as MENU_PARSE_VECTORS,Mt as MENU_REFUSAL_VECTORS,Xe as NATURAL_SIDEBAR_WIDTH_VECTORS,Ze as NAVIGATION_ACTION_VECTORS,Qe as NAVIGATION_SPLIT_VIEW_LAYOUT_VECTORS,$e as NAVIGATION_STACK_VECTORS,Le as NAVIGATION_VIEW_VECTORS,et as OVERLAY_COLLAPSE_VECTORS,tt as OVERLAY_SPLIT_VIEW_LAYOUT_VECTORS,nt as OVERLAY_SWIPE_AREA_VECTORS,rt as OVERLAY_SWIPE_CANCEL_VECTORS,it as OVERLAY_SWIPE_RELEASE_VECTORS,at as OVERLAY_SWIPE_SNAP_POINT_VECTORS,ot as OVERLAY_SWIPE_START_VECTORS,De as PASSWORD_ENTRY_ROW_VECTORS,Oe as PASSWORD_REVEAL_GUARD_VECTORS,hn as POPOVER_KEY_VECTORS,gn as POPOVER_SURFACE_VECTORS,sn as PREFERENCES_GROUP_HEADER_VECTORS,cn as PREFERENCES_SEARCH_PAGES,ln as PREFERENCES_SEARCH_VECTORS,te as RADIO_GROUP_VECTORS,un as ROW_MATCH_VECTORS,dn as SEARCH_CORPUS_VECTORS,fn as SEARCH_ROW_SUBTITLE_VECTORS,jn as SHARED_TREE_BLOCKS_WITHOUT_EXPECTATIONS,Mn as SHARED_TREE_TABLES,_n as SHORTCUT_LABEL_VECTORS,Ve as SIDEBAR_ACTIVATION_VECTORS,st as SIDEBAR_BOUNDS_VECTORS,He as SIDEBAR_CLAMP_VECTORS,Ue as SIDEBAR_FILTER_VECTORS,We as SIDEBAR_ITEMS_CHANGED_VECTORS,Ge as SIDEBAR_ITEM_FLAG_VECTORS,Ke as SIDEBAR_MODEL_VECTORS,qe as SIDEBAR_MODE_VECTORS,ct as SIDEBAR_WIDTH_VECTORS,yn as SPINNER_ARC_ENVELOPE,bn as SPINNER_ARC_PHASE_VECTORS,xn as SPINNER_ARC_TOLERANCE,Sn as SPINNER_CONSTANT_VECTORS,se as SPINNER_GEOMETRY_VECTORS,ce as SPINNER_SIZE_VECTORS,ft as SPLIT_BUTTON_CONTENT_VECTORS,pt as SPLIT_BUTTON_DIRECTION_VECTORS,mt as SPLIT_BUTTON_DROPDOWN_VECTORS,ht as SPLIT_BUTTON_MENU_ACTIVATION_VECTORS,gt as SPLIT_BUTTON_ROOT_STATE_VECTORS,_t as SPLIT_BUTTON_STYLE_CLASS_VECTORS,vt as SPLIT_BUTTON_TOOLTIP_VECTORS,lt as SPLIT_VIEW_MEASURE_VECTORS,pn as STRIP_MARKUP_VECTORS,mn as STRIP_MNEMONIC_VECTORS,v as SWITCH_ROW_NOTIFY_VECTORS,Kt as TABS_REVEALED_VECTORS,qt as TAB_CLOSE_VISIBLE_VECTORS,Jt as TAB_DESCENDANT_VECTORS,Yt as TAB_ICON_STATE_VECTORS,wt as TAB_PAGES_ITEMS_CHANGED_VECTORS,Xt as TAB_PAGE_DESCRIPTOR_VECTORS,Zt as TAB_SUCCESSOR_VECTORS,Qt as TAB_TOOLTIP_VECTORS,$t as TAB_VIEW_VECTORS,ut as TAGS_CONFLICT_VECTORS,le as TOOLBAR_VIEW_ALLOCATE_VECTORS,ue as TOOLBAR_VIEW_CLASS_VECTORS,de as TOOLBAR_VIEW_CONTENT_FOR_SIZE_VECTORS,fe as TOOLBAR_VIEW_MEASURE_VECTORS,f as TRANSLATOR_CREDITS_VECTORS,Pe as VIEW_STACK_ICON_NAME_VECTORS,Fe as VIEW_STACK_PAGE_VECTORS,Ie as VIEW_STACK_VECTORS,Ft as VIEW_SWITCHER_BADGE_VECTORS,It as VIEW_SWITCHER_BAR_REVEAL_VECTORS,Lt as VIEW_SWITCHER_BAR_VECTORS,Rt as VIEW_SWITCHER_BUTTON_VECTORS,zt as VIEW_SWITCHER_BUTTON_VISIBILITY_VECTORS,Bt as VIEW_SWITCHER_DRAG_VECTORS,Vt as VIEW_SWITCHER_ICON_VECTORS,Ht as VIEW_SWITCHER_MNEMONIC_VECTORS,Ut as VIEW_SWITCHER_REBUILD_VECTORS,Wt as VIEW_SWITCHER_SELECTION_VECTORS,y as WINDOW_TITLE_VECTORS,Cn as WRAP_BOX_CHILD_ORDER_VECTORS,wn as WRAP_BOX_LENGTH_VECTORS,Tn as WRAP_BOX_LINE_VECTORS,En as WRAP_BOX_NATURAL_LENGTH_VECTORS,Dn as WRAP_BOX_NOTIFY_PROPERTIES,On as WRAP_BOX_POLICY_VECTORS,kn as WRAP_BOX_SPACING_NOTIFY_VECTORS,An as WRAP_BOX_SPACING_VECTORS,Tt as applyListReadback,en as applyTabViewOp,Nn as authoredNodes,Pn as authoredTags,Re as collectNavigationState,Gt as createViewSwitcherClock,vn as formatShortcutLabelNodes,ze as navigationEventLog,Fn as reachedTables,Et as replayTabPagesAsSplices,xe as runBottomSheetSteps,Be as runNavigationSteps,tn as seedTabViewPages,In as sharedTreeExpectations,Ln as subjectIndexOf,nn as tabViewClosing,rn as tabViewOrder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{tabViewItemsChanged as e}from"../tab-view.js";const t=[{input:[`Cyan`,`Magenta`],model:[{value:`Cyan`,label:`Cyan`},{value:`Magenta`,label:`Magenta`}],rule:"a bare string is both value and label — `Gtk.StringList`, which is what a combo row is fed in the common case"},{input:[{value:`a`,label:`One`}],model:[{value:`a`,label:`One`}],rule:`a full descriptor passes through unchanged`},{input:[{label:`Apple`}],model:[{value:`Apple`,label:`Apple`}],rule:"a label with no value is addressable BY that label — otherwise the item answers to `undefined` and `selectedValue` can never reach it"},{input:[{value:`k`}],model:[{value:`k`,label:`k`}],rule:`a value with no label draws its value, so an item is never blank by omission`},{input:[{value:7,label:42}],model:[{value:`7`,label:`42`}],rule:`both halves are stringified: the model is a string list on GTK, and a number that stayed a number would fail an === against the attribute it round-trips through`},{input:[{value:``,label:`blank`}],model:[{value:``,label:`blank`}],rule:`an EMPTY value is a value — it is not missing, so the label does not stand in for it`},{input:[],model:[],rule:`the empty model normalises to the empty model, which is the state a placeholder is drawn from`}],n=[{attribute:`["a","b"]`,model:[{value:`a`,label:`a`},{value:`b`,label:`b`}],rule:`the string-array form, which is what markup writes in the common case`},{attribute:`[{"value":"a","label":"A"}]`,model:[{value:`a`,label:`A`}],rule:`the descriptor form`},{attribute:`[not json`,model:[],rule:`unparseable JSON is an author slip and yields the empty model — it must not stop the element upgrading`},{attribute:`{"a":1}`,model:[],rule:"well-formed JSON that is not an ARRAY is the second, different slip, and it answers the same way rather than throwing on `.map`"},{attribute:``,model:[],rule:`an empty attribute is an empty model, not a parse attempt`}],r={value:`a`,label:`A`},i={value:`b`,label:`B`},a={value:`c`,label:`C`},o=[r,i,a],s=[{previous:[],next:o,change:{position:0,removed:0,added:3},survivors:0,rule:`the first assignment adds everything at 0 — there is nothing to carry over`},{previous:o,next:[...o,{value:`d`,label:`D`}],change:{position:3,removed:0,added:1},survivors:3,rule:`an APPEND touches one position: three views stand, and this is the row a rebuild fails while the model still reads correct`},{previous:o,next:[{value:`z`,label:`Z`},...o],change:{position:0,removed:0,added:1},survivors:3,rule:`a PREPEND is one insertion at 0, not a shift of everything after it — positions move, nodes do not`},{previous:o,next:[r,a],change:{position:1,removed:1,added:0},survivors:2,rule:`a removal from the middle: the shared suffix is what keeps it one item wide`},{previous:o,next:[r,{value:`b`,label:`Renamed`},a],change:{position:1,removed:1,added:1},survivors:2,rule:"a RELABELLED item at an unchanged value is inside the range — comparing by value alone would leave the old text on screen, which is what `selection_item_changed` exists for upstream"},{previous:o,next:o,change:null,survivors:3,rule:`an equal model emits NOTHING, as GTK does — a renderer that rebuilt here would discard three live views for no change at all`},{previous:o,next:[{value:`a`,label:`A`},{value:`b`,label:`B`},{value:`c`,label:`C`}],change:null,survivors:3,rule:`equality is STRUCTURAL, not by array identity: a caller that rebuilds its array every render must not force a rebuild here`},{previous:o,next:[],change:{position:0,removed:3,added:0},survivors:0,rule:`emptying the model removes everything from 0`},{previous:o,next:[a,i,r],change:{position:0,removed:3,added:3},survivors:0,rule:"a REVERSAL is the whole span: `items-changed` has no vocabulary for a move, and neither does `g_list_store_move`, which reports one the same way"}],c=[{initial:[r,i],source:`readback`,op:`append`,assign:!1,model:[r,i],itemsChanged:null,survivors:2,rule:`a model read back is the CALLER's array — pushing onto it moves nothing, because nothing was assigned`},{initial:[r,i],source:`readback`,op:`append`,assign:!0,model:[r,i,{value:`z`,label:`Z`}],itemsChanged:{position:2,removed:0,added:1},survivors:2,rule:`read, push, assign is one insertion at the end — the pattern a full rebuild used to serve and a splice over a shared array answers with nothing at all`},{initial:[r,i],source:`readback`,op:`relabel-first`,assign:!0,model:[{value:`a`,label:`Renamed`},i],itemsChanged:{position:0,removed:1,added:1},survivors:1,rule:`relabelling an item THROUGH the array read back is the same failure one level down: a shared descriptor changes the stored model too, so the comparison sees no change`},{initial:[r,i,a],source:`readback`,op:`remove-first`,assign:!0,model:[i,a],itemsChanged:{position:0,removed:1,added:0},survivors:2,rule:`the shrink direction, which a shared array reports as a model that got shorter on BOTH sides and therefore did not change`},{initial:[r,i],source:`input`,op:`append`,assign:!0,model:[r,i,{value:`z`,label:`Z`}],itemsChanged:{position:2,removed:0,added:1},survivors:2,rule:`the OTHER door — an array the caller ASSIGNED and kept a reference to. Closing only the read-back one leaves the same comparison reading the new value on both sides, by the other route`}];function applyListReadback(e,t){if(t===`append`)e.push({value:`z`,label:`Z`});else if(t===`relabel-first`){let t=e[0];t&&(t.label=`Renamed`)}else e.shift();return e}const l=[{selected:1,length:3,result:1,rule:`a position the new model has is kept`},{selected:5,length:3,result:0,rule:"a position past the end falls back to 0 — `GtkSingleSelection` autoselects rather than deselecting"},{selected:-1,length:3,result:0,rule:"the SENTINEL falls back to 0 too, which is how a widget recovers a selection when its model grows; a one-sided `selected >= length` would leave the -1 standing"},{selected:0,length:0,result:-1,rule:`an EMPTY model has no 0 to fall back to, so it lands on the sentinel and a placeholder becomes drawable`},{selected:NaN,length:3,result:0,rule:"a non-finite position addresses no item — the same answer as one past the end, so a `parseInt` of a malformed attribute cannot poison the index"}],u=[{change:{kind:`attached`,id:`C`,position:2,previousPosition:-1},itemsChanged:{position:2,removed:0,added:1},before:[`A`,`B`],after:[`A`,`B`,`C`],rule:"attached is one addition at the new position; `previousPosition` is -1 because the page had none"},{change:{kind:`detached`,id:`B`,position:1,previousPosition:1},itemsChanged:{position:1,removed:1,added:0},before:[`A`,`B`,`C`],after:[`A`,`C`],rule:`detached is one removal at the position it was removed FROM`},{change:{kind:`updated`,id:`B`,position:1,previousPosition:1},itemsChanged:{position:1,removed:1,added:1},before:[`A`,`B`,`C`],after:[`A`,`B`,`C`],rule:'a per-page notify is removed-1/added-1 at that position — `GListModel` has no other verb for "this item is different now" — and it moves nothing'},{change:{kind:`reordered`,id:`D`,position:1,previousPosition:3},itemsChanged:{position:1,removed:3,added:3},before:[`A`,`B`,`C`,`D`],after:[`A`,`D`,`B`,`C`],rule:`a move BACKWARDS is the span between the two positions, re-added in the new order`},{change:{kind:`reordered`,id:`A`,position:2,previousPosition:0},itemsChanged:{position:0,removed:3,added:3},before:[`A`,`B`,`C`,`D`],after:[`B`,`C`,`A`,`D`],rule:`a move FORWARDS spans the same way — the position is the LOWER of the two, so the range covers both ends`},{change:{kind:`pinned`,id:`C`,position:0,previousPosition:2},itemsChanged:{position:0,removed:3,added:3},before:[`A`,`B`,`C`],after:[`C`,`A`,`B`],rule:`pinning is a flip AND a re-order, so it reports as the move it is rather than as an update in place`}];function replayTabPagesAsSplices(t,n){let r=[...t];for(let t of n){let{position:n,removed:i,added:a}=e(t),o=r.splice(n,i);if(a===0)continue;if(t.kind===`attached`){r.splice(n,0,t.id);continue}if(t.kind===`updated`){r.splice(n,0,...o);continue}let s=o.filter(e=>e!==t.id);s.splice(t.position-n,0,t.id),r.splice(n,0,...s)}return r}export{s as LIST_ITEMS_CHANGED_VECTORS,c as LIST_MODEL_OWNERSHIP_VECTORS,t as LIST_NORMALIZE_VECTORS,n as LIST_PARSE_VECTORS,l as LIST_SELECTION_CLAMP_VECTORS,u as TAB_PAGES_ITEMS_CHANGED_VECTORS,applyListReadback,replayTabPagesAsSplices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{input:[`Save as…`],model:[{kind:`item`,label:`Save as…`}],rule:`a bare string is a label-only item — the shorthand NativeScript used to be alone in having`},{input:[{label:`Save as…`,action:`app.save-as`}],model:[{kind:`item`,label:`Save as…`,action:`app.save-as`}],rule:`the GTK shape: (label, detailed action) pairs (gtkpopovermenu.c:101,103)`},{input:[{section:[{label:`Cut`,action:`app.cut`},`Copy`],label:`Edit`}],model:[{kind:`section`,items:[{kind:`item`,label:`Cut`,action:`app.cut`},{kind:`item`,label:`Copy`}],label:`Edit`}],rule:"a `section` key IS the section link, and its `label` is the group heading (gtkpopovermenu.c:115-117)"},{input:[{label:`More`,submenu:[`Rename`],icon:`view-more-symbolic`}],model:[{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`Rename`}],icon:`view-more-symbolic`}],rule:"a `submenu` key wins over the attributes beside it — a link is read before an attribute (gtkpopovermenu.c:126-131)"},{input:[{label:`Recent`,submenu:[`Report.pdf`],submenuAction:`win.recent-shown`,macosSpecial:`services`}],model:[{kind:`submenu`,label:`Recent`,items:[{kind:`item`,label:`Report.pdf`}],submenuAction:`win.recent-shown`,macosSpecial:`services`}],rule:"the two submenu attributes the first cut dropped in silence — `submenu-action` (gtkpopovermenu.c:106-107, read at gtkmenutrackeritem.c:822) and `gtk-macos-special` (:130-131, read at :761)"},{input:[{label:`List`,action:`app.view::list`}],model:[{kind:`item`,label:`List`,action:`app.view::list`}],rule:`the target travels INSIDE the detailed action, so no GVariant encoding has to be invented`},{input:[{label:`Zoom`,custom:`zoom-control`}],model:[{kind:`item`,label:`Zoom`,custom:`zoom-control`}],rule:"`custom` names an application widget and survives normalisation — refusing it is a SURFACE question"},{input:[{label:`Undo`,accel:`<Control>z`,verbIcon:`edit-undo-symbolic`,useMarkup:!0}],model:[{kind:`item`,label:`Undo`,verbIcon:`edit-undo-symbolic`,accel:`<Control>z`,useMarkup:!0}],rule:`the decoration attributes round-trip whether or not a given surface draws them`},{input:[{label:`Delete`,hiddenWhen:`action-disabled`},{label:`X`,hiddenWhen:`whenever`}],model:[{kind:`item`,label:`Delete`,hiddenWhen:`action-disabled`},{kind:`item`,label:`X`}],rule:'an unknown `hidden-when` is IGNORED, not stored: "Ignore other values" (gtkmenutrackeritem.c:530-535 + the comment at :537-544)'},{input:[{label:`Open`,action:7,icon:{name:`x`}}],model:[{kind:`item`,label:`Open`}],rule:`a non-string attribute is dropped rather than leaked into a field typed as one`},{input:[{label:`Open`,action:``}],model:[{kind:`item`,label:`Open`}],rule:"an EMPTY action is not an action — GIO refuses `''`, and dropping it here is one abort the GTK path never has to refuse"},{input:[{},null,42,[`nested`],{label:42}],model:[],rule:`an entry with no usable attribute and no link draws nothing, so it is not an entry`},{input:[{label:``}],model:[{kind:`item`,label:``}],rule:"an EMPTY label is a label — the same distinction `text-button` is keyed off"},{input:[{kind:`section`,items:[{kind:`item`,label:`Cut`}]},{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`Rename`}]}],model:[{kind:`section`,items:[{kind:`item`,label:`Cut`}]},{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`Rename`}]}],rule:`IDEMPOTENCE: a normalised model is legal input, or handing a widget its own model back would flatten it`}],t=[{json:`[{"label":"Save as…","action":"app.save-as"}]`,model:[{kind:`item`,label:`Save as…`,action:`app.save-as`}],rule:`the GTK shape through the attribute door`},{json:`[{"label":"Copy","action":"app.copy"},{"label":"Copy","action":"app.copy-special"}]`,model:[{kind:`item`,label:`Copy`,action:`app.copy`},{kind:`item`,label:`Copy`,action:`app.copy-special`}],rule:`duplicate labels are legal and must NOT collapse`},{json:`[{"label":"About","id":"about","icon":"help-about-symbolic"}]`,model:[{kind:`item`,label:`About`,icon:`help-about-symbolic`,id:`about`}],rule:`the menu-button extras (id/icon) are attributes like any other`},{json:`[{"section":[{"label":"Cut"}]},{"label":"More","submenu":[{"label":"Rename"}]}]`,model:[{kind:`section`,items:[{kind:`item`,label:`Cut`}]},{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`Rename`}]}],rule:`sections and submenus are writable in markup — the whole point of a JSON attribute`},{json:null,model:[],rule:`no attribute → no menu`},{json:``,model:[],rule:`an empty attribute → no menu`},{json:`not json at all`,model:[],rule:`malformed JSON degrades to no menu, it does not throw`},{json:`{"label":"Save"}`,model:[],rule:`a non-array root is rejected wholesale`},{json:`[]`,model:[],rule:`an empty array is an empty menu`},{json:`[{"action":"app.x"},null,42,["label"]]`,model:[{kind:`item`,label:``,action:`app.x`}],rule:`an entry with an action but no label is still an item; the three junk entries are not`}],n=[{model:[{kind:`item`,label:`New`},{kind:`section`,items:[{kind:`item`,label:`Cut`},{kind:`item`,label:`Copy`}]},{kind:`item`,label:`Quit`}],rows:[{label:`New`,path:[0],separated:!1},{label:`Cut`,path:[1,0],separated:!0},{label:`Copy`,path:[1,1],separated:!1},{label:`Quit`,path:[2],separated:!0}],rule:`a section is inlined and separated on BOTH sides; its items keep their real paths`},{model:[{kind:`section`,items:[{kind:`item`,label:`Cut`}]},{kind:`item`,label:`Quit`}],rows:[{label:`Cut`,path:[0,0],separated:!1},{label:`Quit`,path:[1],separated:!0}],rule:`a LEADING section draws no separator above it`},{model:[{kind:`section`,items:[{kind:`item`,label:`A`}]},{kind:`section`,items:[{kind:`item`,label:`B`}]}],rows:[{label:`A`,path:[0,0],separated:!1},{label:`B`,path:[1,0],separated:!0}],rule:`two adjacent sections are separated once, not twice`},{model:[{kind:`section`,items:[]},{kind:`item`,label:`Quit`}],rows:[{label:`Quit`,path:[1],separated:!1}],rule:`an EMPTY section draws nothing and opens no boundary — a separator with no group above it`},{model:[{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`Rename`}]}],rows:[{label:`More`,path:[0],separated:!1}],rule:`a submenu stays ONE row: inlining it would offer items the user never opened`}],r=[{detailed:`app.save-as`,name:`app.save-as`,gioValid:!0,rule:`no target`},{detailed:`app.view::list`,name:`app.view`,target:`list`,gioValid:!0,rule:"the `::` form — a string target"},{detailed:`win.zoom(2)`,name:`win.zoom`,target:`2`,gioValid:!0,rule:"the `(…)` form — a GVariant text target"},{detailed:`app.view('list')`,name:`app.view`,target:`list`,gioValid:!0,rule:"the QUOTED `(…)` form is the same target as the `::` form — unquoted, or a radio written this way reads OFF"},{detailed:`app.view('a\\'b')`,name:`app.view`,target:`a'b`,gioValid:!0,rule:`GVariant text ESCAPES the quote inside a quoted string; leaving the escape on is wrong CONTENT, not a second spelling`},{detailed:`app.view('a\\\\b')`,name:`app.view`,target:`a\\b`,gioValid:!0,rule:`and the backslash — the only other character GVariant escapes there`},{detailed:`app.view::a::b`,name:`app.view`,target:`a::b`,gioValid:!0,rule:"only the FIRST `::` splits; the rest is target text"},{detailed:`app.x(`,name:`app.x(`,gioValid:!1,rule:"an unterminated `(` is not the target form — the splitter keeps the lot, GIO ABORTS on it"},{detailed:`win.zoom(qqq)`,name:`win.zoom`,target:`qqq`,gioValid:!1,rule:"the splitter cannot know `qqq` is not a GVariant; GIO can, and aborts"},{detailed:`app.a b`,name:`app.a b`,gioValid:!1,rule:`a space is not legal in an action name`},{detailed:`app.x)`,name:`app.x)`,gioValid:!1,rule:"a stray `)` is not the target form"},{detailed:`app.x()`,name:`app.x`,target:``,gioValid:!1,rule:`an EMPTY target is not a GVariant — "0:expected value"`},{detailed:`a.b(1,2)`,name:`a.b`,target:`1,2`,gioValid:!1,rule:`two values are not one target — "1:expected end of input"`}],i={"app.sidebar":{state:`true`},"app.view":{state:`list`},"app.save":{enabled:!1},"app.copy":{}},a=[{item:{kind:`item`,label:`Heading`},actions:i,state:{sensitive:!0,toggled:!1,role:`normal`,visible:!0},rule:`NO action at all is SENSITIVE — C sets it explicitly in the else branch (c:591-595, the assignment at c:594)`},{item:{kind:`item`,label:`Save`,action:`app.save`},actions:i,state:{sensitive:!1,toggled:!1,role:`normal`,visible:!0},rule:"sensitive IS the action’s enabled flag — `self->sensitive = enabled` (c:332)"},{item:{kind:`item`,label:`Copy`,action:`app.copy`},actions:i,state:{sensitive:!0,toggled:!1,role:`normal`,visible:!0},rule:`an action with no state is a plain command`},{item:{kind:`item`,label:`Missing`,action:`app.nope`},actions:i,state:{sensitive:!1,toggled:!1,role:`normal`,visible:!0},rule:`an action the group has not got is INSENSITIVE, and still shown (c:582-586)`},{item:{kind:`item`,label:`Sidebar`,action:`app.sidebar`},actions:i,state:{sensitive:!0,toggled:!0,role:`check`,visible:!0},rule:`a boolean state with no target is a CHECK, toggled by the state (c:342-346)`},{item:{kind:`item`,label:`List`,action:`app.view::list`},actions:i,state:{sensitive:!0,toggled:!0,role:`radio`,visible:!0},rule:`a target AND a state is a RADIO, toggled when they are equal (c:336-340)`},{item:{kind:`item`,label:`Grid`,action:`app.view::grid`},actions:i,state:{sensitive:!0,toggled:!1,role:`radio`,visible:!0},rule:`the OTHER radio of the same action is a radio too, and off`},{item:{kind:`item`,label:`Save`,action:`app.save`,hiddenWhen:`action-disabled`},actions:i,state:{sensitive:!1,toggled:!1,role:`normal`,visible:!1},rule:`hidden-when="action-disabled" folds onto sensitive (c:271-272)`},{item:{kind:`item`,label:`Ghost`,action:`app.nope`,hiddenWhen:`action-missing`},actions:i,state:{sensitive:!1,toggled:!1,role:`normal`,visible:!1},rule:`hidden-when="action-missing" folds onto can_activate (c:267-268)`},{item:{kind:`item`,label:`Ghost`,hiddenWhen:`action-missing`},actions:i,state:{sensitive:!0,toggled:!1,role:`normal`,visible:!1},rule:`an actionless item with hidden-when="action-missing" is hidden FOR EVER — C says so in its own comment (c:541-543)`},{item:{kind:`item`,label:`Quit`,action:`app.quit`},actions:{},state:{sensitive:!1,toggled:!1,role:`normal`,visible:!0},rule:`an EMPTY group knows the action is missing, so the item is insensitive`},{item:{kind:`item`,label:`Menubar`,action:`app.copy`,hiddenWhen:`macos-menubar`},actions:i,state:{sensitive:!0,toggled:!1,role:`normal`,visible:!0},rule:"macos-menubar hides only under `mac_os_mode`, which no renderer here is (c:534-535)"}],o=[{model:[{kind:`item`,label:`Save`,action:`app.save`}],paths:[],rule:`an ordinary menu is refused by nothing`},{model:[{kind:`item`,label:`Zoom`,custom:`zoom-control`}],paths:[[0]],rule:"`custom` names an application widget, so a blank row would be the alternative"},{model:[{kind:`item`,label:`A`},{kind:`section`,items:[{kind:`item`,label:`Z`,custom:`zoom`}]},{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`C`,custom:`colour`}]}],paths:[[1,0],[2,0]],rule:`the walk enters sections AND submenus — a refusal three levels down is still a blank row`},{model:[{kind:`item`,label:`A`,custom:`one`},{kind:`item`,label:`B`,custom:`two`}],paths:[[0],[1]],rule:`EVERY refusal is reported, not the first: a GTK menu typically has all of its custom items at once`}];export{r as MENU_DETAILED_ACTION_VECTORS,n as MENU_FLATTEN_VECTORS,a as MENU_ITEM_STATE_VECTORS,e as MENU_NORMALIZE_VECTORS,t as MENU_PARSE_VECTORS,o as MENU_REFUSAL_VECTORS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=[{label:`One`,value:`a`},{label:`Two`,value:`b`}],t=[{name:`programmatic index set`,steps:[{op:`
|
|
1
|
+
const e=[{label:`One`,value:`a`},{label:`Two`,value:`b`}],t=[{name:`programmatic index set`,steps:[{op:`setModel`,model: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:`setModel`,model: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:`setModel`,model: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:`setModel`,model: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:`setModel`,model: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:`setModel`,model: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:`setModel`,model: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:`setModel`,model:[{label:`First`,value:`a`}]},{op:`setModel`,model:[{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:`setModel`,model:e},{op:`setSelectedIndex`,index:1},{op:`setModel`,model:[{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:`setModel`,model:[{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:`setModel`,model:[]}],selected:-1,value:``,label:``,emitted:[{selected:-1,value:``,label:``,interactive:!1}],rule:`GTK_INVALID_LIST_POSITION (:593-596, :809-810) — an empty model has no index 0 to autoselect`},{name:`picking from an empty model`,steps:[{op:`setModel`,model:[]},{op:`select`,index:0}],selected:-1,value:``,label:``,emitted:[{selected:-1,value:``,label:``,interactive:!1}],rule:`there is no option 0 to pick — and the renderers never open a chooser over an empty model either`},{name:`emptying a model that had a selection`,steps:[{op:`setModel`,model:e},{op:`setSelectedIndex`,index:1},{op:`setModel`,model:[]}],selected:-1,value:``,label:``,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:1,value:`b`,label:`Two`,interactive:!1},{selected:-1,value:``,label:``,interactive:!1}],rule:`the selection does NOT survive as index 0 — there is nothing at 0 any more`},{name:`a model that is emptied and refilled`,steps:[{op:`setModel`,model:e},{op:`setModel`,model:[]},{op:`setModel`,model:e}],selected:0,value:`a`,label:`One`,emitted:[{selected:0,value:`a`,label:`One`,interactive:!1},{selected:-1,value:``,label:``,interactive:!1},{selected:0,value:`a`,label:`One`,interactive:!1}],rule:`autoselect runs again, so the sentinel recovers to 0 — it is BELOW the range, which a one-sided >= length check leaves in place`},{name:`a model with an empty first label is still a selection`,steps:[{op:`setModel`,model:[{label:``,value:`blank`}]}],selected:0,value:`blank`,label:``,emitted:[{selected:0,value:`blank`,label:``,interactive:!1}],rule:`the case the sentinel exists to separate: an empty LABEL, not an empty model`}],n=[{count:0,presentsChooser:!1,rule:`an empty model is not a chooser`},{count:1,presentsChooser:!1,rule:`ONE option is not a choice — the arrow goes and the row goes inert`},{count:2,presentsChooser:!0,rule:`two is the smallest real choice — the predicate is > 1, not >= 1`},{count:5,presentsChooser:!0,rule:`and anything above it`}];export{n as COMBO_CHOOSER_VECTORS,t as COMBO_SELECTION_VECTORS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{SWITCH_ROW_NOTIFY_VECTORS as e}from"./action-row.js";import{BANNER_BUTTON_TEXT_VECTORS as t,BANNER_BUTTON_VISIBLE_VECTORS as n}from"./banner.js";import{ENTRY_TEXT_LENGTH_VECTORS as r}from"./entry-row.js";const i=[`BANNER_BUTTON_TEXT_VECTORS`,`BANNER_BUTTON_VISIBLE_VECTORS`,`ENTRY_TEXT_LENGTH_VECTORS`,`SWITCH_ROW_NOTIFY_VECTORS`],a={"Adw.ShortcutLabel":"a CHOICE, not an impossibility: SHORTCUT_LABEL_VECTORS is deliberately off SHARED_TREE_TABLES, because the row this block would instantiate is unreadable on a translated host — see the header. What that costs is one-sided. `adwaita-web` drives the table from its own spec and would pass the row here too; `gtk-host` drives it from NO spec, so libadwaita's own keycap rendering is the one thing this declaration leaves unchecked. Joining it wants `it.failing(…, { when: <translated host> })` per tests/AGENTS.md rule 6 — a tolerated failure on a de_DE desk, a REAL assertion anywhere the host is untranslated, which no workflow here opts out of.","Adw.WindowTitle":`WINDOW_TITLE_VECTORS is a STEP table over a fresh widget and its rows spell their own titles; the authored "Inbox"/"3 unread messages" is no row's input, and LABEL_VISIBILITY_VECTORS keys on the label TEXT for the same reason.`},switchRowRowFor=t=>e.find(e=>t===void 0?e.steps.length===0:e.steps.length===1&&e.steps[0].op===`set-active`&&e.steps[0].active===t);function expectationsForNode(e,i){let a=e.props??{},o=[],at=(t,n,r,a)=>o.push({path:i,gtype:e.tag,table:t,observable:n,expected:r,rule:a});if(e.tag===`AdwEntryRow`){let e=typeof a.text==`string`?a.text:``,t=r.find(t=>t.text===e);t&&at(`ENTRY_TEXT_LENGTH_VECTORS`,`entry-text-length`,t.length,t.rule)}if(e.tag===`AdwSwitchRow`){let e=typeof a.active==`boolean`?a.active:void 0,t=switchRowRowFor(e);t&&at(`SWITCH_ROW_NOTIFY_VECTORS`,`switch-row-active`,t.active,t.rule)}if(e.tag===`AdwBanner`){let e=typeof a.buttonLabel==`string`?a.buttonLabel:void 0;if(e!==void 0){let r=n.find(t=>t.label===e);r&&at(`BANNER_BUTTON_VISIBLE_VECTORS`,`banner-button-visible`,r.visible,r.rule);let i=t.find(t=>t.label===e);i&&at(`BANNER_BUTTON_TEXT_VECTORS`,`banner-button-text`,i.text,i.rule)}}return o}function walk(e,t,n){n(e,t),(e.children??[]).forEach((e,r)=>walk(e,`${t} > ${e.tag}[${r}]`,n))}function authoredNodes(e){let t=[];return walk(e,e.tag,(e,n)=>t.push({node:e,path:n})),t}function authoredTags(e,t=e=>e){return authoredNodes(e).map(({node:e})=>t(e.tag))}function subjectIndexOf(e,t){return authoredNodes(e).findIndex(e=>e.path===t)}function sharedTreeExpectations(e){let t=[];return walk(e,e.tag,(e,n)=>t.push(...expectationsForNode(e,n))),t}function reachedTables(e){let t=new Set;for(let n of e)for(let e of sharedTreeExpectations(n))t.add(e.table);return[...t].sort()}export{a as SHARED_TREE_BLOCKS_WITHOUT_EXPECTATIONS,i as SHARED_TREE_TABLES,authoredNodes,authoredTags,reachedTables,sharedTreeExpectations,subjectIndexOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=[{name:`icon-name (test_adw_split_button_icon_name, tests/test-split-button.c:17-55)`,steps:[{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`first icon on an empty button notifies icon-name only (:31-32)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!1,notified:[],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:"same icon again is a no-op — `if (!g_strcmp0 …) return` (:34-36 / c:756-757)"},{op:`icon-name`,value:`edit-find-symbolic`,changed:!0,notified:[`child`,`icon-name`],mode:`icon`,label:null,iconName:`edit-find-symbolic`,styleClasses:[`image-button`],rule:`icon→icon still notifies child: the internal GtkImage is non-NULL (:38-40 / c:762-763)`},{op:`label`,value:`Open`,changed:!0,notified:[`icon-name`,`child`,`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`setting the label CLEARS the icon — get_icon_name() is NULL after (:42-44)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`label`,`child`,`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`and back: setting the icon CLEARS the label (:46-48)`},{op:`child`,value:`child1`,changed:!0,notified:[`icon-name`,`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`a child clears both, and carries neither style class (:50-52)`}]},{name:`label (test_adw_split_button_label, tests/test-split-button.c:57-95)`,steps:[{op:`label`,value:`Open`,changed:!0,notified:[`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`first label on an empty button notifies label only (:71-72)`},{op:`label`,value:`Open`,changed:!1,notified:[],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`same label again is a no-op (:74-76 / c:668-669)`},{op:`label`,value:`Find`,changed:!0,notified:[`child`,`label`],mode:`label`,label:`Find`,iconName:null,styleClasses:[`text-button`],rule:`label→label notifies child: the internal GtkLabel is non-NULL (:78-80 / c:674-675)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`label`,`child`,`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`setting the icon CLEARS the label — get_label() is NULL after (:82-84)`},{op:`label`,value:`Open`,changed:!0,notified:[`icon-name`,`child`,`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`and back again (:86-88)`},{op:`child`,value:`child1`,changed:!0,notified:[`label`,`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`a child clears the label (:90-92)`}]},{name:`child (test_adw_split_button_child, tests/test-split-button.c:125-170)`,steps:[{op:`child`,value:null,changed:!1,notified:[],mode:`empty`,label:null,iconName:null,styleClasses:[],rule:`clearing an already-empty button is a no-op (:143-144 / c:806-807)`},{op:`child`,value:`child1`,changed:!0,notified:[`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`first child notifies child only (:146-148)`},{op:`child`,value:`child2`,changed:!0,notified:[`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`child→child notifies once; neither label nor icon was set (:150-152)`},{op:`label`,value:`Open`,changed:!0,notified:[`child`,`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`the label replaces the app child — get_child() is no longer it (:154-159)`},{op:`child`,value:`child3`,changed:!0,notified:[`label`,`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`a child clears the label back out (:161-163)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`child`,`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`the icon replaces the app child (:165-167)`}]},{name:`empty + whitespace labels (derived from adw-split-button.c:151-159, not asserted upstream)`,steps:[{op:`label`,value:``,changed:!0,notified:[`label`],mode:`label`,label:``,iconName:null,styleClasses:[],rule:"an empty label is SET (non-NULL) but `label[0]` is NUL — no text-button class (c:156)"},{op:`icon-name`,value:``,changed:!0,notified:[`label`,`child`,`icon-name`],mode:`icon`,label:null,iconName:``,styleClasses:[],rule:`the empty label is still a non-NULL pointer, so it is notified as cleared (c:760-761)`},{op:`label`,value:` `,changed:!0,notified:[`icon-name`,`child`,`label`],mode:`label`,label:` `,iconName:null,styleClasses:[`text-button`],rule:"whitespace is a valid label: nothing trims, and `label[0]` is a space (c:156-159)"},{op:`label`,value:` `,changed:!1,notified:[],mode:`label`,label:` `,iconName:null,styleClasses:[`text-button`],rule:`g_strcmp0 is a byte compare — the same two spaces are the same label`},{op:`label`,value:`Änderungen speichern…`,changed:!0,notified:[`child`,`label`],mode:`label`,label:`Änderungen speichern…`,iconName:null,styleClasses:[`text-button`],rule:`non-ASCII is stored verbatim — no normalisation, no escaping (c:661-682)`}]}],t=[{label:`Open`,iconName:null,classes:[`text-button`],rule:`a label gives text-button (c:156-159)`},{label:null,iconName:`document-open-symbolic`,classes:[`image-button`],rule:`an icon gives image-button (c:151-154)`},{label:``,iconName:null,classes:[],rule:"`label[0]` is NUL — an empty label carries NO class"},{label:null,iconName:``,classes:[],rule:"`icon_name[0]` is NUL — an empty icon name carries NO class"},{label:` `,iconName:null,classes:[`text-button`],rule:`two spaces are a non-empty label — no trimming`},{label:` `,iconName:null,classes:[`text-button`],rule:`any non-NUL first byte counts, tab included`},{label:null,iconName:null,classes:[],rule:`a child (or nothing) carries neither class (c:145-165)`},{label:`Open`,iconName:`document-open-symbolic`,classes:[`image-button`,`text-button`],rule:`the two branches are independent and evaluated icon-first (c:151-159)`}],n=[{tooltip:``,text:`More Options`,markup:!1,rule:`unset/cleared restores the translated default as TEXT`},{tooltip:`Some tooltip`,text:`Some tooltip`,markup:!0,rule:`a set tooltip is markup (c:1046-1047)`},{tooltip:`Some <b>tooltip</b>`,text:`Some <b>tooltip</b>`,markup:!0,rule:`Pango markup passes through unescaped (c:428)`},{tooltip:` `,text:` `,markup:!0,rule:"`*tooltip` is a space — non-NUL, so it is a real tooltip"}],r=[{direction:`down`,arrowIcon:`pan-down-symbolic`,popupDirection:`down`,rule:"the default (c:420); glyph from `menubutton arrow.down`, not overridden (_buttons.scss:457-459)"},{direction:`up`,arrowIcon:`pan-up-symbolic`,popupDirection:`up`,rule:"`menubutton arrow.up`, not overridden (_buttons.scss:460-462)"},{direction:`left`,arrowIcon:`pan-start-symbolic`,popupDirection:`left`,rule:`left uses pan-START, not pan-left (_buttons.scss:463-465)`},{direction:`right`,arrowIcon:`pan-end-symbolic`,popupDirection:`right`,rule:`right uses pan-END (_buttons.scss:466-468)`},{direction:`none`,arrowIcon:`pan-down-symbolic`,popupDirection:`down`,rule:"WINNING selector `splitbutton > menubutton > button > arrow.none` (_buttons.scss:621-623) OVERRIDES `menubutton arrow.none` (:454-456): inside a split button `none` draws pan-down, NOT open-menu — and pops down (c:415), so it is indistinguishable from `down`"}],i=[{direction:`none`,arrowIcon:`open-menu-symbolic`,popupDirection:`down`,rule:"`menubutton arrow.none` (_buttons.scss:454-456) — the hamburger, unopposed here; placement still down (c:415 via the shared GtkMenuButton, c:971/:997)"},{direction:`down`,arrowIcon:`pan-down-symbolic`,popupDirection:`down`,rule:"`menubutton arrow.down` (_buttons.scss:457-459) — identical to the split button row"},{direction:`up`,arrowIcon:`pan-up-symbolic`,popupDirection:`up`,rule:"`menubutton arrow.up` (_buttons.scss:460-462)"},{direction:`left`,arrowIcon:`pan-start-symbolic`,popupDirection:`left`,rule:"`menubutton arrow.left` (_buttons.scss:463-465)"},{direction:`right`,arrowIcon:`pan-end-symbolic`,popupDirection:`right`,rule:"`menubutton arrow.right` (_buttons.scss:466-468)"}],a={active:!1,checked:!1,keyboardActivating:!1},o=[{action:a,dropdown:a,active:!1,checked:!1,rule:`idle folds to idle`},{action:{...a,active:!0},dropdown:a,active:!0,checked:!1,rule:`a pressed action half makes the WHOLE control active (c:134-137)`},{action:a,dropdown:{...a,active:!0},active:!0,checked:!1,rule:`so does a pressed dropdown half — the flags are OR-ed (c:127-128)`},{action:a,dropdown:{...a,checked:!0},active:!1,checked:!0,rule:`an open menu checks the arrow half, and the root with it (c:139-142)`},{action:{...a,keyboardActivating:!0},dropdown:a,active:!0,checked:!1,rule:`the keyboard-activating CSS class counts as ACTIVE (c:130-135)`},{action:{...a,active:!0},dropdown:{...a,checked:!0},active:!0,checked:!0,rule:`active and checked are independent folds`}],s=[{json:`[{"label":"Save as…","action":"app.save-as"}]`,entries:[{label:`Save as…`,action:`app.save-as`}],rule:`the GTK shape: (label, detailed action) pairs (c:385-388)`},{json:`[{"label":"Copy","action":"app.copy"},{"label":"Copy","action":"app.copy-special"}]`,entries:[{label:`Copy`,action:`app.copy`},{label:`Copy`,action:`app.copy-special`}],rule:`duplicate labels are legal and must NOT collapse`},{json:`[{"label":"About","id":"about","icon":"help-about-symbolic"}]`,entries:[{label:`About`,id:`about`,icon:`help-about-symbolic`}],rule:`the menu-button extras (id/icon) share the same entry type`},{json:null,entries:[],rule:`no attribute → no menu`},{json:``,entries:[],rule:`an empty attribute → no menu`},{json:`not json at all`,entries:[],rule:`malformed JSON degrades to no menu, it does not throw`},{json:`{"label":"Save"}`,entries:[],rule:`a non-array root is rejected wholesale`},{json:`[]`,entries:[],rule:`an empty array is an empty menu`},{json:`[{"action":"app.x"},null,42,["label"]]`,entries:[],rule:"entries without a `label` key are dropped"},{json:`[{"label":42,"action":7}]`,entries:[{label:`42`}],rule:`the label is String()-coerced; a non-string action is dropped rather than leaked`}],c=[{label:`Copy`,action:`app.copy`},{label:`Copy`,action:`app.copy-special`}],l=[{entries:c,index:1,activated:{label:`Copy`,action:`app.copy-special`},rule:`the SECOND of two identically labelled entries — the indexOf bug`},{entries:c,index:0,activated:{label:`Copy`,action:`app.copy`},rule:`position 0`},{entries:c,index:2,activated:null,rule:`a position past n_items has no item`},{entries:c,index:-1,activated:null,rule:`a negative position has no item`},{entries:c,index:.5,activated:null,rule:`a fractional position is not a position`},{entries:[],index:0,activated:null,rule:`no menu model → nothing to activate`}],u=[{entries:[],popover:!1,enabled:!1,canOpen:!1,rule:`neither → insensitive dropdown; an empty entry list is the renderers’ spelling of "no menu", so a menu-less button must not open an empty popover`},{entries:[{label:`Save as…`,action:`app.save-as`}],popover:!1,enabled:!0,canOpen:!0,rule:`a menu model makes the dropdown live`},{entries:[],popover:!0,enabled:!0,canOpen:!0,rule:`so does a popover on its own`},{entries:[{label:`Save as…`}],popover:!0,enabled:!0,canOpen:!0,rule:`setting one dissociates the other, but the dropdown stays live (c:390-403)`}];export{i as MENU_BUTTON_DIRECTION_VECTORS,e as SPLIT_BUTTON_CONTENT_VECTORS,r as SPLIT_BUTTON_DIRECTION_VECTORS,u as SPLIT_BUTTON_DROPDOWN_VECTORS,l as SPLIT_BUTTON_MENU_ACTIVATION_VECTORS,s as SPLIT_BUTTON_MENU_PARSE_VECTORS,o as SPLIT_BUTTON_ROOT_STATE_VECTORS,t as SPLIT_BUTTON_STYLE_CLASS_VECTORS,n as SPLIT_BUTTON_TOOLTIP_VECTORS};
|
|
1
|
+
const e=[{name:`icon-name (test_adw_split_button_icon_name, tests/test-split-button.c:17-55)`,steps:[{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`first icon on an empty button notifies icon-name only (:31-32)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!1,notified:[],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:"same icon again is a no-op — `if (!g_strcmp0 …) return` (:34-36 / c:756-757)"},{op:`icon-name`,value:`edit-find-symbolic`,changed:!0,notified:[`child`,`icon-name`],mode:`icon`,label:null,iconName:`edit-find-symbolic`,styleClasses:[`image-button`],rule:`icon→icon still notifies child: the internal GtkImage is non-NULL (:38-40 / c:762-763)`},{op:`label`,value:`Open`,changed:!0,notified:[`icon-name`,`child`,`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`setting the label CLEARS the icon — get_icon_name() is NULL after (:42-44)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`label`,`child`,`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`and back: setting the icon CLEARS the label (:46-48)`},{op:`child`,value:`child1`,changed:!0,notified:[`icon-name`,`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`a child clears both, and carries neither style class (:50-52)`}]},{name:`label (test_adw_split_button_label, tests/test-split-button.c:57-95)`,steps:[{op:`label`,value:`Open`,changed:!0,notified:[`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`first label on an empty button notifies label only (:71-72)`},{op:`label`,value:`Open`,changed:!1,notified:[],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`same label again is a no-op (:74-76 / c:668-669)`},{op:`label`,value:`Find`,changed:!0,notified:[`child`,`label`],mode:`label`,label:`Find`,iconName:null,styleClasses:[`text-button`],rule:`label→label notifies child: the internal GtkLabel is non-NULL (:78-80 / c:674-675)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`label`,`child`,`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`setting the icon CLEARS the label — get_label() is NULL after (:82-84)`},{op:`label`,value:`Open`,changed:!0,notified:[`icon-name`,`child`,`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`and back again (:86-88)`},{op:`child`,value:`child1`,changed:!0,notified:[`label`,`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`a child clears the label (:90-92)`}]},{name:`child (test_adw_split_button_child, tests/test-split-button.c:125-170)`,steps:[{op:`child`,value:null,changed:!1,notified:[],mode:`empty`,label:null,iconName:null,styleClasses:[],rule:`clearing an already-empty button is a no-op (:143-144 / c:806-807)`},{op:`child`,value:`child1`,changed:!0,notified:[`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`first child notifies child only (:146-148)`},{op:`child`,value:`child2`,changed:!0,notified:[`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`child→child notifies once; neither label nor icon was set (:150-152)`},{op:`label`,value:`Open`,changed:!0,notified:[`child`,`label`],mode:`label`,label:`Open`,iconName:null,styleClasses:[`text-button`],rule:`the label replaces the app child — get_child() is no longer it (:154-159)`},{op:`child`,value:`child3`,changed:!0,notified:[`label`,`child`],mode:`child`,label:null,iconName:null,styleClasses:[],rule:`a child clears the label back out (:161-163)`},{op:`icon-name`,value:`document-open-symbolic`,changed:!0,notified:[`child`,`icon-name`],mode:`icon`,label:null,iconName:`document-open-symbolic`,styleClasses:[`image-button`],rule:`the icon replaces the app child (:165-167)`}]},{name:`empty + whitespace labels (derived from adw-split-button.c:151-159, not asserted upstream)`,steps:[{op:`label`,value:``,changed:!0,notified:[`label`],mode:`label`,label:``,iconName:null,styleClasses:[],rule:"an empty label is SET (non-NULL) but `label[0]` is NUL — no text-button class (c:156)"},{op:`icon-name`,value:``,changed:!0,notified:[`label`,`child`,`icon-name`],mode:`icon`,label:null,iconName:``,styleClasses:[],rule:`the empty label is still a non-NULL pointer, so it is notified as cleared (c:760-761)`},{op:`label`,value:` `,changed:!0,notified:[`icon-name`,`child`,`label`],mode:`label`,label:` `,iconName:null,styleClasses:[`text-button`],rule:"whitespace is a valid label: nothing trims, and `label[0]` is a space (c:156-159)"},{op:`label`,value:` `,changed:!1,notified:[],mode:`label`,label:` `,iconName:null,styleClasses:[`text-button`],rule:`g_strcmp0 is a byte compare — the same two spaces are the same label`},{op:`label`,value:`Änderungen speichern…`,changed:!0,notified:[`child`,`label`],mode:`label`,label:`Änderungen speichern…`,iconName:null,styleClasses:[`text-button`],rule:`non-ASCII is stored verbatim — no normalisation, no escaping (c:661-682)`}]}],t=[{label:`Open`,iconName:null,classes:[`text-button`],rule:`a label gives text-button (c:156-159)`},{label:null,iconName:`document-open-symbolic`,classes:[`image-button`],rule:`an icon gives image-button (c:151-154)`},{label:``,iconName:null,classes:[],rule:"`label[0]` is NUL — an empty label carries NO class"},{label:null,iconName:``,classes:[],rule:"`icon_name[0]` is NUL — an empty icon name carries NO class"},{label:` `,iconName:null,classes:[`text-button`],rule:`two spaces are a non-empty label — no trimming`},{label:` `,iconName:null,classes:[`text-button`],rule:`any non-NUL first byte counts, tab included`},{label:null,iconName:null,classes:[],rule:`a child (or nothing) carries neither class (c:145-165)`},{label:`Open`,iconName:`document-open-symbolic`,classes:[`image-button`,`text-button`],rule:`the two branches are independent and evaluated icon-first (c:151-159)`}],n=[{tooltip:``,text:`More Options`,markup:!1,rule:`unset/cleared restores the translated default as TEXT`},{tooltip:`Some tooltip`,text:`Some tooltip`,markup:!0,rule:`a set tooltip is markup (c:1046-1047)`},{tooltip:`Some <b>tooltip</b>`,text:`Some <b>tooltip</b>`,markup:!0,rule:`Pango markup passes through unescaped (c:428)`},{tooltip:` `,text:` `,markup:!0,rule:"`*tooltip` is a space — non-NUL, so it is a real tooltip"}],r=[{direction:`down`,arrowIcon:`pan-down-symbolic`,popupDirection:`down`,rule:"the default (c:420); glyph from `menubutton arrow.down`, not overridden (_buttons.scss:457-459)"},{direction:`up`,arrowIcon:`pan-up-symbolic`,popupDirection:`up`,rule:"`menubutton arrow.up`, not overridden (_buttons.scss:460-462)"},{direction:`left`,arrowIcon:`pan-start-symbolic`,popupDirection:`left`,rule:`left uses pan-START, not pan-left (_buttons.scss:463-465)`},{direction:`right`,arrowIcon:`pan-end-symbolic`,popupDirection:`right`,rule:`right uses pan-END (_buttons.scss:466-468)`},{direction:`none`,arrowIcon:`pan-down-symbolic`,popupDirection:`down`,rule:"WINNING selector `splitbutton > menubutton > button > arrow.none` (_buttons.scss:621-623) OVERRIDES `menubutton arrow.none` (:454-456): inside a split button `none` draws pan-down, NOT open-menu — and pops down (c:415), so it is indistinguishable from `down`"}],i=[{direction:`none`,arrowIcon:`open-menu-symbolic`,popupDirection:`down`,rule:"`menubutton arrow.none` (_buttons.scss:454-456) — the hamburger, unopposed here; placement still down (c:415 via the shared GtkMenuButton, c:971/:997)"},{direction:`down`,arrowIcon:`pan-down-symbolic`,popupDirection:`down`,rule:"`menubutton arrow.down` (_buttons.scss:457-459) — identical to the split button row"},{direction:`up`,arrowIcon:`pan-up-symbolic`,popupDirection:`up`,rule:"`menubutton arrow.up` (_buttons.scss:460-462)"},{direction:`left`,arrowIcon:`pan-start-symbolic`,popupDirection:`left`,rule:"`menubutton arrow.left` (_buttons.scss:463-465)"},{direction:`right`,arrowIcon:`pan-end-symbolic`,popupDirection:`right`,rule:"`menubutton arrow.right` (_buttons.scss:466-468)"}],a={active:!1,checked:!1,keyboardActivating:!1},o=[{action:a,dropdown:a,active:!1,checked:!1,rule:`idle folds to idle`},{action:{...a,active:!0},dropdown:a,active:!0,checked:!1,rule:`a pressed action half makes the WHOLE control active (c:134-137)`},{action:a,dropdown:{...a,active:!0},active:!0,checked:!1,rule:`so does a pressed dropdown half — the flags are OR-ed (c:127-128)`},{action:a,dropdown:{...a,checked:!0},active:!1,checked:!0,rule:`an open menu checks the arrow half, and the root with it (c:139-142)`},{action:{...a,keyboardActivating:!0},dropdown:a,active:!0,checked:!1,rule:`the keyboard-activating CSS class counts as ACTIVE (c:130-135)`},{action:{...a,active:!0},dropdown:{...a,checked:!0},active:!0,checked:!0,rule:`active and checked are independent folds`}],s=[{kind:`item`,label:`Copy`,action:`app.copy`},{kind:`item`,label:`Copy`,action:`app.copy-special`},{kind:`submenu`,label:`More`,items:[{kind:`item`,label:`Copy`,action:`app.copy-as`}]}],c=[{model:s,path:[1],activated:{kind:`item`,label:`Copy`,action:`app.copy-special`},rule:`the SECOND of two identically labelled entries — the indexOf bug`},{model:s,path:[0],activated:{kind:`item`,label:`Copy`,action:`app.copy`},rule:`position 0`},{model:s,path:[2,0],activated:{kind:`item`,label:`Copy`,action:`app.copy-as`},rule:`a THIRD entry with the same label, inside a submenu: only a path tells it from the other two`},{model:s,path:[2],activated:null,rule:`a submenu is not an item — opening it activates nothing`},{model:s,path:[3],activated:null,rule:`a position past n_items has no item`},{model:s,path:[-1],activated:null,rule:`a negative position has no item`},{model:s,path:[.5],activated:null,rule:`a fractional position is not a position`},{model:s,path:[],activated:null,rule:`the empty path names the model, not an item`},{model:s,path:[0,0],activated:null,rule:`an item has no children to descend into`},{model:[],path:[0],activated:null,rule:`no menu model → nothing to activate`}],l=[{model:[],popover:!1,enabled:!1,canOpen:!1,rule:`neither → insensitive dropdown; an empty entry list is the renderers’ spelling of "no menu", so a menu-less button must not open an empty popover`},{model:[{kind:`item`,label:`Save as…`,action:`app.save-as`}],popover:!1,enabled:!0,canOpen:!0,rule:`a menu model makes the dropdown live`},{model:[],popover:!0,enabled:!0,canOpen:!0,rule:`so does a popover on its own`},{model:[{kind:`item`,label:`Save as…`}],popover:!0,enabled:!0,canOpen:!0,rule:`setting one dissociates the other, but the dropdown stays live (c:390-403)`},{model:[{kind:`section`,items:[]}],popover:!1,enabled:!0,canOpen:!0,rule:`a model with a node but nothing to DRAW is still a menu — the answer GTK gives for the same empty GMenu section`}];export{i as MENU_BUTTON_DIRECTION_VECTORS,e as SPLIT_BUTTON_CONTENT_VECTORS,r as SPLIT_BUTTON_DIRECTION_VECTORS,l as SPLIT_BUTTON_DROPDOWN_VECTORS,c as SPLIT_BUTTON_MENU_ACTIVATION_VECTORS,o as SPLIT_BUTTON_ROOT_STATE_VECTORS,t as SPLIT_BUTTON_STYLE_CLASS_VECTORS,n as SPLIT_BUTTON_TOOLTIP_VECTORS};
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gStrStrip as e,glibClamp as t,stringIsNotEmpty as n,stripMnemonic as r}from"./glib.js";import{ADW_ABOUT_DIALOG_LABELS as i,ADW_CREDITS_SECTION_TITLES as a,ADW_LICENSES as o,ADW_LICENSE_ALIASES as s,ADW_LICENSE_DEFAULTS as c,ADW_LICENSE_WARRANTY_TEMPLATE as l,ADW_TRANSLATOR_CREDITS_SENTINELS as u,GTK_LICENSE as d,aboutDialogVisibility as f,creditsSections as p,isLicenseType as m,legalSectionVisible as h,licenseText as g,licenseTypeForSpdxId as _,parseCreditPerson as v,setLicense as y,setLicenseType as b,translatorCreditsPeople as x}from"./about-dialog.js";import{ADW_ACCENT_BG_COLORS as S,ADW_ACCENT_COLOR_NAMES as C,ADW_ACCENT_FG_COLOR as w,ADW_DEFAULT_ACCENT_COLOR as T,adwaitaAccent as E,adwaitaAccentBgColor as D,adwaitaAccentColor as O,adwaitaStandaloneColor as k,isAdwAccentColorName as A,onAdwaitaAccentChanged as j,setAdwaitaAccent as M}from"./accent.js";import{ActionRowState as N,BUTTON_ROW_ACTIVATABLE as P,ButtonRowState as F,SwitchRowState as I,WindowTitleState as L,deriveRowLabels as R}from"./action-row.js";import{AVATAR_COLORS as z,AVATAR_COLOR_COUNT as B,avatarColor as V,avatarColorClass as H,avatarFontSize as U,avatarInitials as W,avatarMaxFontSize as G,avatarMode as K,flattenAvatarGradient as q,gStrHash as J,randomAvatarColorClass as Y}from"./avatar.js";import{ADW_BANNER_BUTTON_STYLES as X,ADW_BANNER_BUTTON_STYLE_CLASSES as Z,ADW_BANNER_DEFAULTS as Q,bannerButtonStyleClasses as $,bannerButtonText as ee,bannerButtonVisible as te,bannerRenderState as ne,isBannerButtonStyle as re,parseBannerButtonStyle as ie}from"./banner.js";import{AdwBreakpoint as ae,evaluateBreakpointCondition as oe,parseBreakpointCondition as se}from"./breakpoint.js";import{BreakpointBinState as ce}from"./breakpoint-bin.js";import{ADW_BUTTON_CONTENT_DEFAULTS as le,BUTTON_CONTENT_BOX_SPACING as ue,BUTTON_CONTENT_FALLBACK_ICON as de,BUTTON_CONTENT_STYLE_CLASS as fe,buttonContentEllipsize as pe,buttonContentIconExpands as me,buttonContentIconIsEmpty as he,buttonContentIconName as ge,buttonContentLabelText as _e,buttonContentLabelVisible as ve,buttonContentRenderState as ye,buttonContentStyleTargetIndex as be}from"./button-content.js";import{ADW_BUTTON_STYLE_ALIASES as xe,ADW_BUTTON_STYLE_CLASSES as Se,buttonStyleClass as Ce,buttonStyleClasses as we}from"./button.js";import{ADW_SWIPE_DECELERATION_TOUCH as Te,ADW_SWIPE_DECELERATION_TOUCHPAD as Ee,ADW_SWIPE_DRAG_THRESHOLD as De,ADW_SWIPE_EPSILON as Oe,ADW_SWIPE_HISTORY_THRESHOLD_MS as ke,ADW_SWIPE_PARABOLA_MULTIPLIER as Ae,ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_H as je,ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_V as Me,ADW_SWIPE_VELOCITY_CURVE_THRESHOLD as Ne,ADW_SWIPE_VELOCITY_THRESHOLD_TOUCH as Pe,ADW_SWIPE_VELOCITY_THRESHOLD_TOUCHPAD as Fe,SwipeTracker as Ie,swipeBounds as Le,swipeClosestPointIndex as Re,swipeEndProgress as ze,swipeNextPointIndex as Be,swipePreviousPointIndex as Ve,swipeProjectedPointIndex as He,swipeSlope as Ue,swipeVelocityThreshold as We}from"./swipe.js";import{CAROUSEL_SCROLL_TIMEOUT_MS as Ge,CAROUSEL_SETTLE_EPSILON as Ke,CarouselState as qe,carouselClampPosition as Je,carouselClosestSnapPoint as Ye,carouselNavigateTarget as Xe,carouselPageAllocation as Ze,carouselPageAtPosition as Qe,carouselRange as $e,carouselReorderShift as et,carouselSizesFromSnapPoints as tt,carouselSnapPoints as nt,carouselWheelStep as rt}from"./carousel.js";import{RadioGroupState as it,resolveCheckState as at}from"./checks.js";import{adwLerp as ot,easeInOutSine as st,easeOutCubic as ct,inverseLerp as lt}from"./easing.js";import{ADW_CLAMP_DEFAULTS as ut,ADW_CLAMP_SIZE_CLASSES as dt,ADW_SPINNER_MAX_SIZE as ft,ADW_SPINNER_MIN_SIZE as pt,ADW_TOOLBAR_BAR_CLASSES as mt,ADW_TOOLBAR_VIEW_CLASSES as ht,ADW_TOOLBAR_VIEW_DEFAULTS as gt,clampAllocate as _t,clampChildSize as vt,clampSizeFromChild as yt,clampThresholds as bt,normalizeClampSize as xt,parseToolbarStyle as St,resolveSpinnerSize as Ct,spinnerGeometry as wt,toolbarBarStyleClasses as Tt,toolbarViewAllocate as Et,toolbarViewClasses as Dt,toolbarViewContentForSize as Ot,toolbarViewMeasure as kt}from"./chrome.js";import{DEFAULT_ICON_COLOR as At,DEFAULT_ICON_COLOR_DARK as jt,adwaitaColorScheme as Mt,isThemeIconColor as Nt,onAdwaitaColorSchemeChanged as Pt,setAdwaitaColorScheme as Ft,themeIconColor as It,toggleAdwaitaColorScheme as Lt}from"./color-scheme.js";import{ADW_DATA_GRID_ROW_VARIANTS as Rt,DATA_GRID_CELL_CLASS as zt,DATA_GRID_ROW_CLASS as Bt,dataGridCellText as Vt,dataGridColumnAlign as Ht,dataGridColumnClasses as Ut,dataGridRowInteractive as Wt,dataGridTrackTemplate as Gt,dataGridTracks as Kt,normalizeDataGridColumns as qt,normalizeDataGridVariant as Jt}from"./data-grid.js";import{AdwAlertResponses as Yt,BottomSheetPresentation as Xt,resolveBottomSheetClose as Zt}from"./dialog.js";import{CAPS_LOCK_ICON_NAME as Qt,CAPS_LOCK_TOOLTIP as $t,EMPTY_ANIMATION_DURATION_MS as en,ENTRY_ROW_APPLY_ICON_NAME as tn,ENTRY_ROW_APPLY_TOOLTIP as nn,ENTRY_ROW_EDIT_ICON_NAME as rn,ENTRY_ROW_MAX_LENGTH_LIMIT as an,ENTRY_ROW_TITLE_SPACING as on,EntryRowState as sn,PASSWORD_CONCEAL_ICON_NAME as cn,PASSWORD_CONCEAL_LABEL as ln,PASSWORD_REVEAL_ICON_NAME as un,PASSWORD_REVEAL_LABEL as dn,PasswordEntryRowState as fn,clampEntryText as pn,entryTextLength as mn}from"./entry-row.js";import{HeaderBarState as hn,resolveHeaderBarTitle as gn}from"./header-bar.js";import{AdwToast as _n,AdwToastQueue as vn,DEFAULT_TOAST_TIMEOUT as yn}from"./toast.js";import{ADW_COMBO_NO_SELECTION as bn,ComboState as xn,ExpanderState as Sn,SpinState as Cn,ToggleGroupState as wn,normalizeComboOptions as Tn}from"./rows.js";import{ViewStackState as En,normalizeIconName as Dn,resolvePageTitle as On}from"./view-stack.js";import{BACK_BUTTON_FALLBACK_TOOLTIP as kn,NavigationViewState as An,describeNavigationDiagnostic as jn}from"./navigation-view.js";import{ADW_SIDEBAR_NO_SELECTION as Mn,SidebarState as Nn,adjustSidebarSelection as Pn,clampSidebarSelection as Fn,flattenSidebarItems as In,sidebarHeaders as Ln}from"./sidebar.js";import{ADW_SPINNER_CONTRACT_DISTANCE as Rn,ADW_SPINNER_CYCLES_PER_LOOP as zn,ADW_SPINNER_CYCLE_LENGTH as Bn,ADW_SPINNER_EXTEND_DISTANCE as Vn,ADW_SPINNER_IDLE_DISTANCE as Hn,ADW_SPINNER_MAX_ARC_LENGTH as Un,ADW_SPINNER_MIN_ARC_LENGTH as Wn,ADW_SPINNER_N_CYCLES as Gn,ADW_SPINNER_OVERLAP_DISTANCE as Kn,ADW_SPINNER_SPIN_DURATION_MS as qn,ADW_SPINNER_START_ANGLE as Jn,ADW_SPINNER_STILL_PROGRESS as Yn,ADW_SPINNER_TRACK_OPACITY as Xn,normalizeSpinnerAngle as Zn,spinnerArc as Qn,spinnerArcEnd as $n,spinnerArcStart as er,spinnerProgressAt as tr}from"./spinner.js";import{parseAccelerator as nr,parseShortcutLabel as rr,shortcutKeycaps as ir}from"./shortcut-label.js";import{ADW_LENGTH_UNITS as ar,DEFAULT_DPI as or,adwLengthToPx as sr,normalizeLengthUnit as cr}from"./length-unit.js";import{ADW_SWIPE_BORDER as lr,DEFAULT_MAX_SIDEBAR_WIDTH as ur,DEFAULT_MIN_SIDEBAR_WIDTH as dr,DEFAULT_SIDEBAR_WIDTH_FRACTION as fr,DEFAULT_SIDEBAR_WIDTH_UNIT as pr,INSTANT_SPLIT_VIEW_ANIMATOR as mr,NAVIGATION_SPLIT_VIEW_CRITICALS as hr,NavigationSplitViewState as gr,OverlaySplitViewState as _r,isSidebarAtVisualStart as vr,layoutNavigationSplitView as yr,layoutOverlaySplitView as br,measureSplitViewHorizontal as xr,resolveNaturalSidebarWidth as Sr,resolveNavigationAction as Cr,resolveNavigationSidebarWidth as wr,resolveNavigationStack as Tr,resolveOverlaySidebarWidth as Er,resolveSidebarBounds as Dr,resolveSwipeArea as Or,resolveSwipeRelease as kr,resolveSwipeSnapPoints as Ar,resolveSwipeStart as jr,swipeCancelProgress as Mr,tagsConflict as Nr}from"./split-view.js";import{DEFAULT_DROPDOWN_TOOLTIP as Pr,SPLIT_BUTTON_DISABLED_OPACITY as Fr,SplitButtonState as Ir,isSplitButtonDirection as Lr,menuButtonArrowIcon as Rr,menuButtonPopupDirection as zr,parseMenuEntries as Br,resolveDropdownTooltip as Vr,splitButtonArrowIcon as Hr,splitButtonPopupDirection as Ur,splitButtonRootState as Wr,splitButtonStyleClasses as Gr}from"./split-button.js";import{DEFAULT_INDICATOR_DESCRIPTION_STRINGS as Kr,INLINE_VIEW_SWITCHER_DISPLAY_MODES as qr,VIEW_SWITCHER_BADGE_LIMIT as Jr,VIEW_SWITCHER_DRAG_SWITCH_DELAY as Yr,VIEW_SWITCHER_FALLBACK_ICON as Xr,VIEW_SWITCHER_NO_SELECTION as Zr,VIEW_SWITCHER_POLICIES as Qr,ViewSwitcherBarState as $r,ViewSwitcherDragSwitch as ei,ViewSwitcherState as ti,buildInlineToggles as ni,buildViewSwitcherButtons as ri,createViewSwitcherPage as ii,inlineToggleTooltip as ai,isInlineViewSwitcherDisplayMode as oi,isViewSwitcherButtonVisible as si,isViewSwitcherPolicy as ci,pageIndexForToggle as li,shouldRevealViewSwitcherBar as ui,toggleIndexForPage as di,viewSwitcherBadgeLabel as fi,viewSwitcherButtonOrientation as pi,viewSwitcherIconName as mi,viewSwitcherIndicatorDescription as hi,viewSwitcherLabel as gi,viewSwitcherPageFromStackPage as _i,viewSwitcherPagesFromStack as vi}from"./view-switcher.js";import{DEFAULT_TAB_AUTOHIDE as yi,TabViewState as bi,isDescendantOfPage as xi,successorAfterClose as Si,tabCloseVisible as Ci,tabIconState as wi,tabTooltip as Ti,tabTooltipIsMarkup as Ei,tabsRevealed as Di}from"./tab-view.js";import{UNTITLED_PAGE_LABEL as Oi,collectSearchRows as ki,countVisiblePages as Ai,createSearchRowSubtitle as ji,defaultCaseFolder as Mi,derivePreferencesGroupHeader as Ni,escapeMarkup as Pi,makeComparable as Fi,rowMatchesQuery as Ii,searchPreferences as Li,stripMarkup as Ri}from"./preferences.js";import{ADW_MAX_OVERSHOOT_DISTANCE as zi,ADW_OVERSHOOT_SETTLE_MS as Bi,ADW_UNDERSHOOT_CLASSES as Vi,ADW_UNDERSHOOT_SIZE as Hi,accumulateOvershoot as Ui,isScrolledFromEnd as Wi,isScrolledFromStart as Gi,overshootDistance as Ki,scrollMaxValue as qi,scrollUndershootClasses as Ji}from"./scrolling.js";import{POPOVER_ITEM_RADIUS as Yi,POPOVER_MENU_PADDING as Xi,POPOVER_PADDING as Zi,POPOVER_RADIUS as Qi,PopoverState as $i,resolvePopoverKey as ea}from"./popover.js";import{ADW_WRAP_BOX_DEFAULT_ALIGN as ta,ADW_WRAP_BOX_DEFAULT_JUSTIFY as na,ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE as ra,ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT as ia,ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION as aa,ADW_WRAP_BOX_DEFAULT_SPACING as oa,ADW_WRAP_BOX_DEFAULT_WRAP_POLICY as sa,ADW_WRAP_BOX_JUSTIFY_MODES as ca,ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET as la,ADW_WRAP_BOX_PACK_DIRECTIONS as ua,ADW_WRAP_POLICIES as da,normalizeNaturalLineLength as fa,normalizeWrapBoxAlign as pa,normalizeWrapBoxJustify as ma,normalizeWrapBoxLengthUnit as ha,normalizeWrapBoxPackDirection as ga,normalizeWrapBoxSpacing as _a,normalizeWrapPolicy as va,resolveWrapBoxChildOrder as ya,resolveWrapBoxLine as ba,wrapBoxChildFlex as xa,wrapBoxFlexStyle as Sa,wrapBoxLengthToPx as Ca,wrapPolicyFlexShrink as wa}from"./wrap-box.js";export{i as ADW_ABOUT_DIALOG_LABELS,S as ADW_ACCENT_BG_COLORS,C as ADW_ACCENT_COLOR_NAMES,w as ADW_ACCENT_FG_COLOR,X as ADW_BANNER_BUTTON_STYLES,Z as ADW_BANNER_BUTTON_STYLE_CLASSES,Q as ADW_BANNER_DEFAULTS,le as ADW_BUTTON_CONTENT_DEFAULTS,xe as ADW_BUTTON_STYLE_ALIASES,Se as ADW_BUTTON_STYLE_CLASSES,ut as ADW_CLAMP_DEFAULTS,dt as ADW_CLAMP_SIZE_CLASSES,bn as ADW_COMBO_NO_SELECTION,a as ADW_CREDITS_SECTION_TITLES,Rt as ADW_DATA_GRID_ROW_VARIANTS,T as ADW_DEFAULT_ACCENT_COLOR,ar as ADW_LENGTH_UNITS,o as ADW_LICENSES,s as ADW_LICENSE_ALIASES,c as ADW_LICENSE_DEFAULTS,l as ADW_LICENSE_WARRANTY_TEMPLATE,zi as ADW_MAX_OVERSHOOT_DISTANCE,Bi as ADW_OVERSHOOT_SETTLE_MS,Mn as ADW_SIDEBAR_NO_SELECTION,Rn as ADW_SPINNER_CONTRACT_DISTANCE,zn as ADW_SPINNER_CYCLES_PER_LOOP,Bn as ADW_SPINNER_CYCLE_LENGTH,Vn as ADW_SPINNER_EXTEND_DISTANCE,Hn as ADW_SPINNER_IDLE_DISTANCE,Un as ADW_SPINNER_MAX_ARC_LENGTH,ft as ADW_SPINNER_MAX_SIZE,Wn as ADW_SPINNER_MIN_ARC_LENGTH,pt as ADW_SPINNER_MIN_SIZE,Gn as ADW_SPINNER_N_CYCLES,Kn as ADW_SPINNER_OVERLAP_DISTANCE,qn as ADW_SPINNER_SPIN_DURATION_MS,Jn as ADW_SPINNER_START_ANGLE,Yn as ADW_SPINNER_STILL_PROGRESS,Xn as ADW_SPINNER_TRACK_OPACITY,lr as ADW_SWIPE_BORDER,Te as ADW_SWIPE_DECELERATION_TOUCH,Ee as ADW_SWIPE_DECELERATION_TOUCHPAD,De as ADW_SWIPE_DRAG_THRESHOLD,Oe as ADW_SWIPE_EPSILON,ke as ADW_SWIPE_HISTORY_THRESHOLD_MS,Ae as ADW_SWIPE_PARABOLA_MULTIPLIER,je as ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_H,Me as ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_V,Ne as ADW_SWIPE_VELOCITY_CURVE_THRESHOLD,Pe as ADW_SWIPE_VELOCITY_THRESHOLD_TOUCH,Fe as ADW_SWIPE_VELOCITY_THRESHOLD_TOUCHPAD,mt as ADW_TOOLBAR_BAR_CLASSES,ht as ADW_TOOLBAR_VIEW_CLASSES,gt as ADW_TOOLBAR_VIEW_DEFAULTS,u as ADW_TRANSLATOR_CREDITS_SENTINELS,Vi as ADW_UNDERSHOOT_CLASSES,Hi as ADW_UNDERSHOOT_SIZE,ta as ADW_WRAP_BOX_DEFAULT_ALIGN,na as ADW_WRAP_BOX_DEFAULT_JUSTIFY,ra as ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE,ia as ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT,aa as ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION,oa as ADW_WRAP_BOX_DEFAULT_SPACING,sa as ADW_WRAP_BOX_DEFAULT_WRAP_POLICY,ca as ADW_WRAP_BOX_JUSTIFY_MODES,la as ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET,ua as ADW_WRAP_BOX_PACK_DIRECTIONS,da as ADW_WRAP_POLICIES,z as AVATAR_COLORS,B as AVATAR_COLOR_COUNT,N as ActionRowState,Yt as AdwAlertResponses,ae as AdwBreakpoint,_n as AdwToast,vn as AdwToastQueue,kn as BACK_BUTTON_FALLBACK_TOOLTIP,ue as BUTTON_CONTENT_BOX_SPACING,de as BUTTON_CONTENT_FALLBACK_ICON,fe as BUTTON_CONTENT_STYLE_CLASS,P as BUTTON_ROW_ACTIVATABLE,Xt as BottomSheetPresentation,ce as BreakpointBinState,F as ButtonRowState,Qt as CAPS_LOCK_ICON_NAME,$t as CAPS_LOCK_TOOLTIP,Ge as CAROUSEL_SCROLL_TIMEOUT_MS,Ke as CAROUSEL_SETTLE_EPSILON,qe as CarouselState,xn as ComboState,zt as DATA_GRID_CELL_CLASS,Bt as DATA_GRID_ROW_CLASS,or as DEFAULT_DPI,Pr as DEFAULT_DROPDOWN_TOOLTIP,At as DEFAULT_ICON_COLOR,jt as DEFAULT_ICON_COLOR_DARK,Kr as DEFAULT_INDICATOR_DESCRIPTION_STRINGS,ur as DEFAULT_MAX_SIDEBAR_WIDTH,dr as DEFAULT_MIN_SIDEBAR_WIDTH,fr as DEFAULT_SIDEBAR_WIDTH_FRACTION,pr as DEFAULT_SIDEBAR_WIDTH_UNIT,yi as DEFAULT_TAB_AUTOHIDE,yn as DEFAULT_TOAST_TIMEOUT,en as EMPTY_ANIMATION_DURATION_MS,tn as ENTRY_ROW_APPLY_ICON_NAME,nn as ENTRY_ROW_APPLY_TOOLTIP,rn as ENTRY_ROW_EDIT_ICON_NAME,an as ENTRY_ROW_MAX_LENGTH_LIMIT,on as ENTRY_ROW_TITLE_SPACING,sn as EntryRowState,Sn as ExpanderState,d as GTK_LICENSE,hn as HeaderBarState,qr as INLINE_VIEW_SWITCHER_DISPLAY_MODES,mr as INSTANT_SPLIT_VIEW_ANIMATOR,hr as NAVIGATION_SPLIT_VIEW_CRITICALS,gr as NavigationSplitViewState,An as NavigationViewState,_r as OverlaySplitViewState,cn as PASSWORD_CONCEAL_ICON_NAME,ln as PASSWORD_CONCEAL_LABEL,un as PASSWORD_REVEAL_ICON_NAME,dn as PASSWORD_REVEAL_LABEL,Yi as POPOVER_ITEM_RADIUS,Xi as POPOVER_MENU_PADDING,Zi as POPOVER_PADDING,Qi as POPOVER_RADIUS,fn as PasswordEntryRowState,$i as PopoverState,it as RadioGroupState,Fr as SPLIT_BUTTON_DISABLED_OPACITY,Nn as SidebarState,Cn as SpinState,Ir as SplitButtonState,Ie as SwipeTracker,I as SwitchRowState,bi as TabViewState,wn as ToggleGroupState,Oi as UNTITLED_PAGE_LABEL,Jr as VIEW_SWITCHER_BADGE_LIMIT,Yr as VIEW_SWITCHER_DRAG_SWITCH_DELAY,Xr as VIEW_SWITCHER_FALLBACK_ICON,Zr as VIEW_SWITCHER_NO_SELECTION,Qr as VIEW_SWITCHER_POLICIES,En as ViewStackState,$r as ViewSwitcherBarState,ei as ViewSwitcherDragSwitch,ti as ViewSwitcherState,L as WindowTitleState,f as aboutDialogVisibility,Ui as accumulateOvershoot,Pn as adjustSidebarSelection,sr as adwLengthToPx,ot as adwLerp,E as adwaitaAccent,D as adwaitaAccentBgColor,O as adwaitaAccentColor,Mt as adwaitaColorScheme,k as adwaitaStandaloneColor,V as avatarColor,H as avatarColorClass,U as avatarFontSize,W as avatarInitials,G as avatarMaxFontSize,K as avatarMode,$ as bannerButtonStyleClasses,ee as bannerButtonText,te as bannerButtonVisible,ne as bannerRenderState,ni as buildInlineToggles,ri as buildViewSwitcherButtons,pe as buttonContentEllipsize,me as buttonContentIconExpands,he as buttonContentIconIsEmpty,ge as buttonContentIconName,_e as buttonContentLabelText,ve as buttonContentLabelVisible,ye as buttonContentRenderState,be as buttonContentStyleTargetIndex,Ce as buttonStyleClass,we as buttonStyleClasses,Je as carouselClampPosition,Ye as carouselClosestSnapPoint,Xe as carouselNavigateTarget,Ze as carouselPageAllocation,Qe as carouselPageAtPosition,$e as carouselRange,et as carouselReorderShift,tt as carouselSizesFromSnapPoints,nt as carouselSnapPoints,rt as carouselWheelStep,_t as clampAllocate,vt as clampChildSize,pn as clampEntryText,Fn as clampSidebarSelection,yt as clampSizeFromChild,bt as clampThresholds,ki as collectSearchRows,Ai as countVisiblePages,ji as createSearchRowSubtitle,ii as createViewSwitcherPage,p as creditsSections,Vt as dataGridCellText,Ht as dataGridColumnAlign,Ut as dataGridColumnClasses,Wt as dataGridRowInteractive,Gt as dataGridTrackTemplate,Kt as dataGridTracks,Mi as defaultCaseFolder,Ni as derivePreferencesGroupHeader,R as deriveRowLabels,jn as describeNavigationDiagnostic,st as easeInOutSine,ct as easeOutCubic,mn as entryTextLength,Pi as escapeMarkup,oe as evaluateBreakpointCondition,q as flattenAvatarGradient,In as flattenSidebarItems,J as gStrHash,e as gStrStrip,t as glibClamp,ai as inlineToggleTooltip,lt as inverseLerp,A as isAdwAccentColorName,re as isBannerButtonStyle,xi as isDescendantOfPage,oi as isInlineViewSwitcherDisplayMode,m as isLicenseType,Wi as isScrolledFromEnd,Gi as isScrolledFromStart,vr as isSidebarAtVisualStart,Lr as isSplitButtonDirection,Nt as isThemeIconColor,si as isViewSwitcherButtonVisible,ci as isViewSwitcherPolicy,yr as layoutNavigationSplitView,br as layoutOverlaySplitView,h as legalSectionVisible,g as licenseText,_ as licenseTypeForSpdxId,Fi as makeComparable,xr as measureSplitViewHorizontal,Rr as menuButtonArrowIcon,zr as menuButtonPopupDirection,xt as normalizeClampSize,Tn as normalizeComboOptions,qt as normalizeDataGridColumns,Jt as normalizeDataGridVariant,Dn as normalizeIconName,cr as normalizeLengthUnit,fa as normalizeNaturalLineLength,Zn as normalizeSpinnerAngle,pa as normalizeWrapBoxAlign,ma as normalizeWrapBoxJustify,ha as normalizeWrapBoxLengthUnit,ga as normalizeWrapBoxPackDirection,_a as normalizeWrapBoxSpacing,va as normalizeWrapPolicy,j as onAdwaitaAccentChanged,Pt as onAdwaitaColorSchemeChanged,Ki as overshootDistance,li as pageIndexForToggle,nr as parseAccelerator,ie as parseBannerButtonStyle,se as parseBreakpointCondition,v as parseCreditPerson,Br as parseMenuEntries,rr as parseShortcutLabel,St as parseToolbarStyle,Y as randomAvatarColorClass,Zt as resolveBottomSheetClose,at as resolveCheckState,Vr as resolveDropdownTooltip,gn as resolveHeaderBarTitle,Sr as resolveNaturalSidebarWidth,Cr as resolveNavigationAction,wr as resolveNavigationSidebarWidth,Tr as resolveNavigationStack,Er as resolveOverlaySidebarWidth,On as resolvePageTitle,ea as resolvePopoverKey,Dr as resolveSidebarBounds,Ct as resolveSpinnerSize,Or as resolveSwipeArea,kr as resolveSwipeRelease,Ar as resolveSwipeSnapPoints,jr as resolveSwipeStart,ya as resolveWrapBoxChildOrder,ba as resolveWrapBoxLine,Ii as rowMatchesQuery,qi as scrollMaxValue,Ji as scrollUndershootClasses,Li as searchPreferences,M as setAdwaitaAccent,Ft as setAdwaitaColorScheme,y as setLicense,b as setLicenseType,ir as shortcutKeycaps,ui as shouldRevealViewSwitcherBar,Ln as sidebarHeaders,Qn as spinnerArc,$n as spinnerArcEnd,er as spinnerArcStart,wt as spinnerGeometry,tr as spinnerProgressAt,Hr as splitButtonArrowIcon,Ur as splitButtonPopupDirection,Wr as splitButtonRootState,Gr as splitButtonStyleClasses,n as stringIsNotEmpty,Ri as stripMarkup,r as stripMnemonic,Si as successorAfterClose,Le as swipeBounds,Mr as swipeCancelProgress,Re as swipeClosestPointIndex,ze as swipeEndProgress,Be as swipeNextPointIndex,Ve as swipePreviousPointIndex,He as swipeProjectedPointIndex,Ue as swipeSlope,We as swipeVelocityThreshold,Ci as tabCloseVisible,wi as tabIconState,Ti as tabTooltip,Ei as tabTooltipIsMarkup,Di as tabsRevealed,Nr as tagsConflict,It as themeIconColor,Lt as toggleAdwaitaColorScheme,di as toggleIndexForPage,Tt as toolbarBarStyleClasses,Et as toolbarViewAllocate,Dt as toolbarViewClasses,Ot as toolbarViewContentForSize,kt as toolbarViewMeasure,x as translatorCreditsPeople,fi as viewSwitcherBadgeLabel,pi as viewSwitcherButtonOrientation,mi as viewSwitcherIconName,hi as viewSwitcherIndicatorDescription,gi as viewSwitcherLabel,_i as viewSwitcherPageFromStackPage,vi as viewSwitcherPagesFromStack,xa as wrapBoxChildFlex,Sa as wrapBoxFlexStyle,Ca as wrapBoxLengthToPx,wa as wrapPolicyFlexShrink};
|
|
1
|
+
import{gStrStrip as e,glibClamp as t,stringIsNotEmpty as n,stripMnemonic as r}from"./glib.js";import{ADW_ABOUT_DIALOG_LABELS as i,ADW_CREDITS_SECTION_TITLES as a,ADW_LICENSES as o,ADW_LICENSE_ALIASES as s,ADW_LICENSE_DEFAULTS as c,ADW_LICENSE_WARRANTY_TEMPLATE as l,ADW_TRANSLATOR_CREDITS_SENTINELS as u,GTK_LICENSE as d,aboutDialogVisibility as f,creditsSections as p,isLicenseType as m,legalSectionVisible as h,licenseText as g,licenseTypeForSpdxId as _,parseCreditPerson as v,setLicense as y,setLicenseType as b,translatorCreditsPeople as x}from"./about-dialog.js";import{ADW_ACCENT_BG_COLORS as S,ADW_ACCENT_COLOR_NAMES as C,ADW_ACCENT_FG_COLOR as w,ADW_DEFAULT_ACCENT_COLOR as T,adwaitaAccent as E,adwaitaAccentBgColor as D,adwaitaAccentColor as O,adwaitaStandaloneColor as k,isAdwAccentColorName as A,onAdwaitaAccentChanged as j,setAdwaitaAccent as M}from"./accent.js";import{ActionRowState as N,BUTTON_ROW_ACTIVATABLE as P,ButtonRowState as F,SwitchRowState as I,WindowTitleState as L,deriveRowLabels as R}from"./action-row.js";import{ADW_ADJUSTMENT_DEFAULTS as z,SpinState as B,adjustmentRange as V,clampAdjustmentValue as H,normalizeAdjustment as U,parseAdjustment as W,snapAdjustmentValue as G}from"./adjustment.js";import{AVATAR_COLORS as K,AVATAR_COLOR_COUNT as q,avatarColor as J,avatarColorClass as Y,avatarFontSize as X,avatarIconSize as Z,avatarInitials as Q,avatarMaxFontSize as $,avatarMode as ee,flattenAvatarGradient as te,gStrHash as ne,randomAvatarColorClass as re}from"./avatar.js";import{ADW_BANNER_BUTTON_STYLES as ie,ADW_BANNER_BUTTON_STYLE_CLASSES as ae,ADW_BANNER_DEFAULTS as oe,bannerButtonStyleClasses as se,bannerButtonText as ce,bannerButtonVisible as le,bannerRenderState as ue,isBannerButtonStyle as de,parseBannerButtonStyle as fe}from"./banner.js";import{AdwBreakpoint as pe,evaluateBreakpointCondition as me,parseBreakpointCondition as he}from"./breakpoint.js";import{BreakpointBinState as ge}from"./breakpoint-bin.js";import{ADW_BUTTON_CONTENT_DEFAULTS as _e,BUTTON_CONTENT_BOX_SPACING as ve,BUTTON_CONTENT_FALLBACK_ICON as ye,BUTTON_CONTENT_STYLE_CLASS as be,buttonContentEllipsize as xe,buttonContentIconExpands as Se,buttonContentIconIsEmpty as Ce,buttonContentIconName as we,buttonContentLabelText as Te,buttonContentLabelVisible as Ee,buttonContentRenderState as De,buttonContentStyleTargetIndex as Oe}from"./button-content.js";import{ADW_BUTTON_STYLE_ALIASES as ke,ADW_BUTTON_STYLE_CLASSES as Ae,buttonStyleClass as je,buttonStyleClasses as Me}from"./button.js";import{ADW_SWIPE_DECELERATION_TOUCH as Ne,ADW_SWIPE_DECELERATION_TOUCHPAD as Pe,ADW_SWIPE_DRAG_THRESHOLD as Fe,ADW_SWIPE_EPSILON as Ie,ADW_SWIPE_HISTORY_THRESHOLD_MS as Le,ADW_SWIPE_PARABOLA_MULTIPLIER as Re,ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_H as ze,ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_V as Be,ADW_SWIPE_VELOCITY_CURVE_THRESHOLD as Ve,ADW_SWIPE_VELOCITY_THRESHOLD_TOUCH as He,ADW_SWIPE_VELOCITY_THRESHOLD_TOUCHPAD as Ue,SwipeTracker as We,swipeBounds as Ge,swipeClosestPointIndex as Ke,swipeEndProgress as qe,swipeNextPointIndex as Je,swipePreviousPointIndex as Ye,swipeProjectedPointIndex as Xe,swipeSlope as Ze,swipeVelocityThreshold as Qe}from"./swipe.js";import{CAROUSEL_SCROLL_TIMEOUT_MS as $e,CAROUSEL_SETTLE_EPSILON as et,CarouselState as tt,carouselClampPosition as nt,carouselClosestSnapPoint as rt,carouselNavigateTarget as it,carouselPageAllocation as at,carouselPageAtPosition as ot,carouselRange as st,carouselReorderShift as ct,carouselSizesFromSnapPoints as lt,carouselSnapPoints as ut,carouselWheelStep as dt}from"./carousel.js";import{RadioGroupState as ft,resolveCheckState as pt}from"./checks.js";import{adwLerp as mt,easeInOutSine as ht,easeOutCubic as gt,inverseLerp as _t}from"./easing.js";import{ADW_CLAMP_DEFAULTS as vt,ADW_CLAMP_SIZE_CLASSES as yt,ADW_SPINNER_MAX_SIZE as bt,ADW_SPINNER_MIN_SIZE as xt,ADW_TOOLBAR_BAR_CLASSES as St,ADW_TOOLBAR_VIEW_CLASSES as Ct,ADW_TOOLBAR_VIEW_DEFAULTS as wt,clampAllocate as Tt,clampChildSize as Et,clampSizeFromChild as Dt,clampThresholds as Ot,normalizeClampSize as kt,parseToolbarStyle as At,resolveSpinnerSize as jt,spinnerGeometry as Mt,toolbarBarStyleClasses as Nt,toolbarViewAllocate as Pt,toolbarViewClasses as Ft,toolbarViewContentForSize as It,toolbarViewMeasure as Lt}from"./chrome.js";import{DEFAULT_ICON_COLOR as Rt,DEFAULT_ICON_COLOR_DARK as zt,adwaitaColorScheme as Bt,isThemeIconColor as Vt,onAdwaitaColorSchemeChanged as Ht,setAdwaitaColorScheme as Ut,themeIconColor as Wt,toggleAdwaitaColorScheme as Gt}from"./color-scheme.js";import{ViewStackState as Kt,normalizeIconName as qt,resolvePageTitle as Jt}from"./view-stack.js";import{DEFAULT_TAB_AUTOHIDE as Yt,TabViewState as Xt,isDescendantOfPage as Zt,successorAfterClose as Qt,tabCloseVisible as $t,tabIconState as en,tabTooltip as tn,tabTooltipIsMarkup as nn,tabViewItemsChanged as rn,tabsRevealed as an}from"./tab-view.js";import{ADW_DATA_GRID_ROW_VARIANTS as on,DATA_GRID_CELL_CLASS as sn,DATA_GRID_ROW_CLASS as cn,dataGridCellText as ln,dataGridColumnAlign as un,dataGridColumnClasses as dn,dataGridRowInteractive as fn,dataGridTrackTemplate as pn,dataGridTracks as mn,normalizeDataGridColumns as hn,normalizeDataGridVariant as gn}from"./data-grid.js";import{AdwAlertResponses as _n,BottomSheetPresentation as vn,resolveBottomSheetClose as yn}from"./dialog.js";import{CAPS_LOCK_ICON_NAME as bn,CAPS_LOCK_TOOLTIP as xn,EMPTY_ANIMATION_DURATION_MS as Sn,ENTRY_ROW_APPLY_ICON_NAME as Cn,ENTRY_ROW_APPLY_TOOLTIP as wn,ENTRY_ROW_EDIT_ICON_NAME as Tn,ENTRY_ROW_MAX_LENGTH_LIMIT as En,ENTRY_ROW_TITLE_SPACING as Dn,EntryRowState as On,PASSWORD_CONCEAL_ICON_NAME as kn,PASSWORD_CONCEAL_LABEL as An,PASSWORD_REVEAL_ICON_NAME as jn,PASSWORD_REVEAL_LABEL as Mn,PasswordEntryRowState as Nn,clampEntryText as Pn,entryTextLength as Fn}from"./entry-row.js";import{HeaderBarState as In,resolveHeaderBarTitle as Ln}from"./header-bar.js";import{AdwToast as Rn,AdwToastQueue as zn,DEFAULT_TOAST_TIMEOUT as Bn}from"./toast.js";import{ADW_COMBO_NO_SELECTION as Vn,clampListSelection as Hn,listItemsChanged as Un,normalizeComboOptions as Wn,parseListModel as Gn}from"./list.js";import{ComboState as Kn,ExpanderState as qn,ToggleGroupState as Jn}from"./rows.js";import{BACK_BUTTON_FALLBACK_TOOLTIP as Yn,NavigationViewState as Xn,describeNavigationDiagnostic as Zn}from"./navigation-view.js";import{ADW_SIDEBAR_NO_SELECTION as Qn,SidebarState as $n,adjustSidebarSelection as er,clampSidebarSelection as tr,flattenSidebarItems as nr,sidebarHeaders as rr}from"./sidebar.js";import{ADW_SPINNER_CONTRACT_DISTANCE as ir,ADW_SPINNER_CYCLES_PER_LOOP as ar,ADW_SPINNER_CYCLE_LENGTH as or,ADW_SPINNER_EXTEND_DISTANCE as sr,ADW_SPINNER_IDLE_DISTANCE as cr,ADW_SPINNER_MAX_ARC_LENGTH as lr,ADW_SPINNER_MIN_ARC_LENGTH as ur,ADW_SPINNER_N_CYCLES as dr,ADW_SPINNER_OVERLAP_DISTANCE as fr,ADW_SPINNER_SPIN_DURATION_MS as pr,ADW_SPINNER_START_ANGLE as mr,ADW_SPINNER_STILL_PROGRESS as hr,ADW_SPINNER_TRACK_OPACITY as gr,normalizeSpinnerAngle as _r,spinnerArc as vr,spinnerArcEnd as yr,spinnerArcStart as br,spinnerProgressAt as xr}from"./spinner.js";import{parseAccelerator as Sr,parseShortcutLabel as Cr,shortcutKeycaps as wr}from"./shortcut-label.js";import{ADW_LENGTH_UNITS as Tr,DEFAULT_DPI as Er,adwLengthToPx as Dr,normalizeLengthUnit as Or}from"./length-unit.js";import{ADW_SWIPE_BORDER as kr,DEFAULT_MAX_SIDEBAR_WIDTH as Ar,DEFAULT_MIN_SIDEBAR_WIDTH as jr,DEFAULT_SIDEBAR_WIDTH_FRACTION as Mr,DEFAULT_SIDEBAR_WIDTH_UNIT as Nr,INSTANT_SPLIT_VIEW_ANIMATOR as Pr,NAVIGATION_SPLIT_VIEW_CRITICALS as Fr,NavigationSplitViewState as Ir,OverlaySplitViewState as Lr,isSidebarAtVisualStart as Rr,layoutNavigationSplitView as zr,layoutOverlaySplitView as Br,measureSplitViewHorizontal as Vr,resolveNaturalSidebarWidth as Hr,resolveNavigationAction as Ur,resolveNavigationSidebarWidth as Wr,resolveNavigationStack as Gr,resolveOverlaySidebarWidth as Kr,resolveSidebarBounds as qr,resolveSwipeArea as Jr,resolveSwipeRelease as Yr,resolveSwipeSnapPoints as Xr,resolveSwipeStart as Zr,swipeCancelProgress as Qr,tagsConflict as $r}from"./split-view.js";import{ADW_MENU_SURFACE_NATIVESCRIPT as ei,ADW_MENU_SURFACE_WEB as ti,assertMenuRenderable as ni,flattenMenu as ri,menuItemAt as ii,menuNodeAt as ai,menuRefusals as oi,normalizeMenuModel as si,parseDetailedAction as ci,parseMenuModel as li,resolveMenuItemState as ui}from"./menu.js";import{DEFAULT_DROPDOWN_TOOLTIP as di,SPLIT_BUTTON_DISABLED_OPACITY as fi,SplitButtonState as pi,isSplitButtonDirection as mi,menuButtonArrowIcon as hi,menuButtonPopupDirection as gi,resolveDropdownTooltip as _i,splitButtonArrowIcon as vi,splitButtonPopupDirection as yi,splitButtonRootState as bi,splitButtonStyleClasses as xi}from"./split-button.js";import{DEFAULT_INDICATOR_DESCRIPTION_STRINGS as Si,INLINE_VIEW_SWITCHER_DISPLAY_MODES as Ci,VIEW_SWITCHER_BADGE_LIMIT as wi,VIEW_SWITCHER_DRAG_SWITCH_DELAY as Ti,VIEW_SWITCHER_FALLBACK_ICON as Ei,VIEW_SWITCHER_NO_SELECTION as Di,VIEW_SWITCHER_POLICIES as Oi,ViewSwitcherBarState as ki,ViewSwitcherDragSwitch as Ai,ViewSwitcherState as ji,buildInlineToggles as Mi,buildViewSwitcherButtons as Ni,createViewSwitcherPage as Pi,inlineToggleTooltip as Fi,isInlineViewSwitcherDisplayMode as Ii,isViewSwitcherButtonVisible as Li,isViewSwitcherPolicy as Ri,pageIndexForToggle as zi,shouldRevealViewSwitcherBar as Bi,toggleIndexForPage as Vi,viewSwitcherBadgeLabel as Hi,viewSwitcherButtonOrientation as Ui,viewSwitcherIconName as Wi,viewSwitcherIndicatorDescription as Gi,viewSwitcherLabel as Ki,viewSwitcherPageFromStackPage as qi,viewSwitcherPagesFromStack as Ji}from"./view-switcher.js";import{UNTITLED_PAGE_LABEL as Yi,collectSearchRows as Xi,countVisiblePages as Zi,createSearchRowSubtitle as Qi,defaultCaseFolder as $i,derivePreferencesGroupHeader as ea,escapeMarkup as ta,makeComparable as na,rowMatchesQuery as ra,searchPreferences as ia,stripMarkup as aa}from"./preferences.js";import{ADW_MAX_OVERSHOOT_DISTANCE as oa,ADW_OVERSHOOT_SETTLE_MS as sa,ADW_UNDERSHOOT_CLASSES as ca,ADW_UNDERSHOOT_SIZE as la,accumulateOvershoot as ua,isScrolledFromEnd as da,isScrolledFromStart as fa,overshootDistance as pa,scrollMaxValue as ma,scrollUndershootClasses as ha}from"./scrolling.js";import{POPOVER_ITEM_RADIUS as ga,POPOVER_MENU_PADDING as _a,POPOVER_PADDING as va,POPOVER_RADIUS as ya,PopoverState as ba,resolvePopoverKey as xa}from"./popover.js";import{ADW_WRAP_BOX_DEFAULT_ALIGN as Sa,ADW_WRAP_BOX_DEFAULT_JUSTIFY as Ca,ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE as wa,ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT as Ta,ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION as Ea,ADW_WRAP_BOX_DEFAULT_SPACING as Da,ADW_WRAP_BOX_DEFAULT_WRAP_POLICY as Oa,ADW_WRAP_BOX_JUSTIFY_MODES as ka,ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET as Aa,ADW_WRAP_BOX_PACK_DIRECTIONS as ja,ADW_WRAP_POLICIES as Ma,normalizeNaturalLineLength as Na,normalizeWrapBoxAlign as Pa,normalizeWrapBoxJustify as Fa,normalizeWrapBoxLengthUnit as Ia,normalizeWrapBoxPackDirection as La,normalizeWrapBoxSpacing as Ra,normalizeWrapPolicy as za,resolveWrapBoxChildOrder as Ba,resolveWrapBoxLine as Va,wrapBoxChildFlex as Ha,wrapBoxFlexStyle as Ua,wrapBoxLengthToPx as Wa,wrapPolicyFlexShrink as Ga}from"./wrap-box.js";export{i as ADW_ABOUT_DIALOG_LABELS,S as ADW_ACCENT_BG_COLORS,C as ADW_ACCENT_COLOR_NAMES,w as ADW_ACCENT_FG_COLOR,z as ADW_ADJUSTMENT_DEFAULTS,ie as ADW_BANNER_BUTTON_STYLES,ae as ADW_BANNER_BUTTON_STYLE_CLASSES,oe as ADW_BANNER_DEFAULTS,_e as ADW_BUTTON_CONTENT_DEFAULTS,ke as ADW_BUTTON_STYLE_ALIASES,Ae as ADW_BUTTON_STYLE_CLASSES,vt as ADW_CLAMP_DEFAULTS,yt as ADW_CLAMP_SIZE_CLASSES,Vn as ADW_COMBO_NO_SELECTION,a as ADW_CREDITS_SECTION_TITLES,on as ADW_DATA_GRID_ROW_VARIANTS,T as ADW_DEFAULT_ACCENT_COLOR,Tr as ADW_LENGTH_UNITS,o as ADW_LICENSES,s as ADW_LICENSE_ALIASES,c as ADW_LICENSE_DEFAULTS,l as ADW_LICENSE_WARRANTY_TEMPLATE,oa as ADW_MAX_OVERSHOOT_DISTANCE,ei as ADW_MENU_SURFACE_NATIVESCRIPT,ti as ADW_MENU_SURFACE_WEB,sa as ADW_OVERSHOOT_SETTLE_MS,Qn as ADW_SIDEBAR_NO_SELECTION,ir as ADW_SPINNER_CONTRACT_DISTANCE,ar as ADW_SPINNER_CYCLES_PER_LOOP,or as ADW_SPINNER_CYCLE_LENGTH,sr as ADW_SPINNER_EXTEND_DISTANCE,cr as ADW_SPINNER_IDLE_DISTANCE,lr as ADW_SPINNER_MAX_ARC_LENGTH,bt as ADW_SPINNER_MAX_SIZE,ur as ADW_SPINNER_MIN_ARC_LENGTH,xt as ADW_SPINNER_MIN_SIZE,dr as ADW_SPINNER_N_CYCLES,fr as ADW_SPINNER_OVERLAP_DISTANCE,pr as ADW_SPINNER_SPIN_DURATION_MS,mr as ADW_SPINNER_START_ANGLE,hr as ADW_SPINNER_STILL_PROGRESS,gr as ADW_SPINNER_TRACK_OPACITY,kr as ADW_SWIPE_BORDER,Ne as ADW_SWIPE_DECELERATION_TOUCH,Pe as ADW_SWIPE_DECELERATION_TOUCHPAD,Fe as ADW_SWIPE_DRAG_THRESHOLD,Ie as ADW_SWIPE_EPSILON,Le as ADW_SWIPE_HISTORY_THRESHOLD_MS,Re as ADW_SWIPE_PARABOLA_MULTIPLIER,ze as ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_H,Be as ADW_SWIPE_TOUCHPAD_BASE_DISTANCE_V,Ve as ADW_SWIPE_VELOCITY_CURVE_THRESHOLD,He as ADW_SWIPE_VELOCITY_THRESHOLD_TOUCH,Ue as ADW_SWIPE_VELOCITY_THRESHOLD_TOUCHPAD,St as ADW_TOOLBAR_BAR_CLASSES,Ct as ADW_TOOLBAR_VIEW_CLASSES,wt as ADW_TOOLBAR_VIEW_DEFAULTS,u as ADW_TRANSLATOR_CREDITS_SENTINELS,ca as ADW_UNDERSHOOT_CLASSES,la as ADW_UNDERSHOOT_SIZE,Sa as ADW_WRAP_BOX_DEFAULT_ALIGN,Ca as ADW_WRAP_BOX_DEFAULT_JUSTIFY,wa as ADW_WRAP_BOX_DEFAULT_JUSTIFY_LAST_LINE,Ta as ADW_WRAP_BOX_DEFAULT_LENGTH_UNIT,Ea as ADW_WRAP_BOX_DEFAULT_PACK_DIRECTION,Da as ADW_WRAP_BOX_DEFAULT_SPACING,Oa as ADW_WRAP_BOX_DEFAULT_WRAP_POLICY,ka as ADW_WRAP_BOX_JUSTIFY_MODES,Aa as ADW_WRAP_BOX_NATURAL_LINE_LENGTH_UNSET,ja as ADW_WRAP_BOX_PACK_DIRECTIONS,Ma as ADW_WRAP_POLICIES,K as AVATAR_COLORS,q as AVATAR_COLOR_COUNT,N as ActionRowState,_n as AdwAlertResponses,pe as AdwBreakpoint,Rn as AdwToast,zn as AdwToastQueue,Yn as BACK_BUTTON_FALLBACK_TOOLTIP,ve as BUTTON_CONTENT_BOX_SPACING,ye as BUTTON_CONTENT_FALLBACK_ICON,be as BUTTON_CONTENT_STYLE_CLASS,P as BUTTON_ROW_ACTIVATABLE,vn as BottomSheetPresentation,ge as BreakpointBinState,F as ButtonRowState,bn as CAPS_LOCK_ICON_NAME,xn as CAPS_LOCK_TOOLTIP,$e as CAROUSEL_SCROLL_TIMEOUT_MS,et as CAROUSEL_SETTLE_EPSILON,tt as CarouselState,Kn as ComboState,sn as DATA_GRID_CELL_CLASS,cn as DATA_GRID_ROW_CLASS,Er as DEFAULT_DPI,di as DEFAULT_DROPDOWN_TOOLTIP,Rt as DEFAULT_ICON_COLOR,zt as DEFAULT_ICON_COLOR_DARK,Si as DEFAULT_INDICATOR_DESCRIPTION_STRINGS,Ar as DEFAULT_MAX_SIDEBAR_WIDTH,jr as DEFAULT_MIN_SIDEBAR_WIDTH,Mr as DEFAULT_SIDEBAR_WIDTH_FRACTION,Nr as DEFAULT_SIDEBAR_WIDTH_UNIT,Yt as DEFAULT_TAB_AUTOHIDE,Bn as DEFAULT_TOAST_TIMEOUT,Sn as EMPTY_ANIMATION_DURATION_MS,Cn as ENTRY_ROW_APPLY_ICON_NAME,wn as ENTRY_ROW_APPLY_TOOLTIP,Tn as ENTRY_ROW_EDIT_ICON_NAME,En as ENTRY_ROW_MAX_LENGTH_LIMIT,Dn as ENTRY_ROW_TITLE_SPACING,On as EntryRowState,qn as ExpanderState,d as GTK_LICENSE,In as HeaderBarState,Ci as INLINE_VIEW_SWITCHER_DISPLAY_MODES,Pr as INSTANT_SPLIT_VIEW_ANIMATOR,Fr as NAVIGATION_SPLIT_VIEW_CRITICALS,Ir as NavigationSplitViewState,Xn as NavigationViewState,Lr as OverlaySplitViewState,kn as PASSWORD_CONCEAL_ICON_NAME,An as PASSWORD_CONCEAL_LABEL,jn as PASSWORD_REVEAL_ICON_NAME,Mn as PASSWORD_REVEAL_LABEL,ga as POPOVER_ITEM_RADIUS,_a as POPOVER_MENU_PADDING,va as POPOVER_PADDING,ya as POPOVER_RADIUS,Nn as PasswordEntryRowState,ba as PopoverState,ft as RadioGroupState,fi as SPLIT_BUTTON_DISABLED_OPACITY,$n as SidebarState,B as SpinState,pi as SplitButtonState,We as SwipeTracker,I as SwitchRowState,Xt as TabViewState,Jn as ToggleGroupState,Yi as UNTITLED_PAGE_LABEL,wi as VIEW_SWITCHER_BADGE_LIMIT,Ti as VIEW_SWITCHER_DRAG_SWITCH_DELAY,Ei as VIEW_SWITCHER_FALLBACK_ICON,Di as VIEW_SWITCHER_NO_SELECTION,Oi as VIEW_SWITCHER_POLICIES,Kt as ViewStackState,ki as ViewSwitcherBarState,Ai as ViewSwitcherDragSwitch,ji as ViewSwitcherState,L as WindowTitleState,f as aboutDialogVisibility,ua as accumulateOvershoot,er as adjustSidebarSelection,V as adjustmentRange,Dr as adwLengthToPx,mt as adwLerp,E as adwaitaAccent,D as adwaitaAccentBgColor,O as adwaitaAccentColor,Bt as adwaitaColorScheme,k as adwaitaStandaloneColor,ni as assertMenuRenderable,J as avatarColor,Y as avatarColorClass,X as avatarFontSize,Z as avatarIconSize,Q as avatarInitials,$ as avatarMaxFontSize,ee as avatarMode,se as bannerButtonStyleClasses,ce as bannerButtonText,le as bannerButtonVisible,ue as bannerRenderState,Mi as buildInlineToggles,Ni as buildViewSwitcherButtons,xe as buttonContentEllipsize,Se as buttonContentIconExpands,Ce as buttonContentIconIsEmpty,we as buttonContentIconName,Te as buttonContentLabelText,Ee as buttonContentLabelVisible,De as buttonContentRenderState,Oe as buttonContentStyleTargetIndex,je as buttonStyleClass,Me as buttonStyleClasses,nt as carouselClampPosition,rt as carouselClosestSnapPoint,it as carouselNavigateTarget,at as carouselPageAllocation,ot as carouselPageAtPosition,st as carouselRange,ct as carouselReorderShift,lt as carouselSizesFromSnapPoints,ut as carouselSnapPoints,dt as carouselWheelStep,H as clampAdjustmentValue,Tt as clampAllocate,Et as clampChildSize,Pn as clampEntryText,Hn as clampListSelection,tr as clampSidebarSelection,Dt as clampSizeFromChild,Ot as clampThresholds,Xi as collectSearchRows,Zi as countVisiblePages,Qi as createSearchRowSubtitle,Pi as createViewSwitcherPage,p as creditsSections,ln as dataGridCellText,un as dataGridColumnAlign,dn as dataGridColumnClasses,fn as dataGridRowInteractive,pn as dataGridTrackTemplate,mn as dataGridTracks,$i as defaultCaseFolder,ea as derivePreferencesGroupHeader,R as deriveRowLabels,Zn as describeNavigationDiagnostic,ht as easeInOutSine,gt as easeOutCubic,Fn as entryTextLength,ta as escapeMarkup,me as evaluateBreakpointCondition,te as flattenAvatarGradient,ri as flattenMenu,nr as flattenSidebarItems,ne as gStrHash,e as gStrStrip,t as glibClamp,Fi as inlineToggleTooltip,_t as inverseLerp,A as isAdwAccentColorName,de as isBannerButtonStyle,Zt as isDescendantOfPage,Ii as isInlineViewSwitcherDisplayMode,m as isLicenseType,da as isScrolledFromEnd,fa as isScrolledFromStart,Rr as isSidebarAtVisualStart,mi as isSplitButtonDirection,Vt as isThemeIconColor,Li as isViewSwitcherButtonVisible,Ri as isViewSwitcherPolicy,zr as layoutNavigationSplitView,Br as layoutOverlaySplitView,h as legalSectionVisible,g as licenseText,_ as licenseTypeForSpdxId,Un as listItemsChanged,na as makeComparable,Vr as measureSplitViewHorizontal,hi as menuButtonArrowIcon,gi as menuButtonPopupDirection,ii as menuItemAt,ai as menuNodeAt,oi as menuRefusals,U as normalizeAdjustment,kt as normalizeClampSize,Wn as normalizeComboOptions,hn as normalizeDataGridColumns,gn as normalizeDataGridVariant,qt as normalizeIconName,Or as normalizeLengthUnit,si as normalizeMenuModel,Na as normalizeNaturalLineLength,_r as normalizeSpinnerAngle,Pa as normalizeWrapBoxAlign,Fa as normalizeWrapBoxJustify,Ia as normalizeWrapBoxLengthUnit,La as normalizeWrapBoxPackDirection,Ra as normalizeWrapBoxSpacing,za as normalizeWrapPolicy,j as onAdwaitaAccentChanged,Ht as onAdwaitaColorSchemeChanged,pa as overshootDistance,zi as pageIndexForToggle,Sr as parseAccelerator,W as parseAdjustment,fe as parseBannerButtonStyle,he as parseBreakpointCondition,v as parseCreditPerson,ci as parseDetailedAction,Gn as parseListModel,li as parseMenuModel,Cr as parseShortcutLabel,At as parseToolbarStyle,re as randomAvatarColorClass,yn as resolveBottomSheetClose,pt as resolveCheckState,_i as resolveDropdownTooltip,Ln as resolveHeaderBarTitle,ui as resolveMenuItemState,Hr as resolveNaturalSidebarWidth,Ur as resolveNavigationAction,Wr as resolveNavigationSidebarWidth,Gr as resolveNavigationStack,Kr as resolveOverlaySidebarWidth,Jt as resolvePageTitle,xa as resolvePopoverKey,qr as resolveSidebarBounds,jt as resolveSpinnerSize,Jr as resolveSwipeArea,Yr as resolveSwipeRelease,Xr as resolveSwipeSnapPoints,Zr as resolveSwipeStart,Ba as resolveWrapBoxChildOrder,Va as resolveWrapBoxLine,ra as rowMatchesQuery,ma as scrollMaxValue,ha as scrollUndershootClasses,ia as searchPreferences,M as setAdwaitaAccent,Ut as setAdwaitaColorScheme,y as setLicense,b as setLicenseType,wr as shortcutKeycaps,Bi as shouldRevealViewSwitcherBar,rr as sidebarHeaders,G as snapAdjustmentValue,vr as spinnerArc,yr as spinnerArcEnd,br as spinnerArcStart,Mt as spinnerGeometry,xr as spinnerProgressAt,vi as splitButtonArrowIcon,yi as splitButtonPopupDirection,bi as splitButtonRootState,xi as splitButtonStyleClasses,n as stringIsNotEmpty,aa as stripMarkup,r as stripMnemonic,Qt as successorAfterClose,Ge as swipeBounds,Qr as swipeCancelProgress,Ke as swipeClosestPointIndex,qe as swipeEndProgress,Je as swipeNextPointIndex,Ye as swipePreviousPointIndex,Xe as swipeProjectedPointIndex,Ze as swipeSlope,Qe as swipeVelocityThreshold,$t as tabCloseVisible,en as tabIconState,tn as tabTooltip,nn as tabTooltipIsMarkup,rn as tabViewItemsChanged,an as tabsRevealed,$r as tagsConflict,Wt as themeIconColor,Gt as toggleAdwaitaColorScheme,Vi as toggleIndexForPage,Nt as toolbarBarStyleClasses,Pt as toolbarViewAllocate,Ft as toolbarViewClasses,It as toolbarViewContentForSize,Lt as toolbarViewMeasure,x as translatorCreditsPeople,Hi as viewSwitcherBadgeLabel,Ui as viewSwitcherButtonOrientation,Wi as viewSwitcherIconName,Gi as viewSwitcherIndicatorDescription,Ki as viewSwitcherLabel,qi as viewSwitcherPageFromStackPage,Ji as viewSwitcherPagesFromStack,Ha as wrapBoxChildFlex,Ua as wrapBoxFlexStyle,Wa as wrapBoxLengthToPx,Ga as wrapPolicyFlexShrink};
|
package/lib/esm/list.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";function normalizeComboOptions(e){return Array.isArray(e)?e.map(e=>{if(typeof e==`string`)return{value:e,label:e};let t=e?.value===void 0?String(e?.label??``):String(e.value);return{value:t,label:e?.label===void 0?t:String(e.label)}}):[]}function parseListModel(e){if(!e)return[];try{return normalizeComboOptions(JSON.parse(e))}catch{return[]}}const e=-1;function clampListSelection(e,t){return Number.isFinite(e)&&e>=0&&e<t?e:t===0?-1:0}function sameItem(e,t){return e!==void 0&&t!==void 0&&e.value===t.value&&e.label===t.label}function listItemsChanged(e,t){let n=e??[],r=t??[],i=Math.min(n.length,r.length),a=0;for(;a<i&&sameItem(n[a],r[a]);)a++;let o=0;for(;o<i-a&&sameItem(n[n.length-1-o],r[r.length-1-o]);)o++;let s=n.length-a-o,c=r.length-a-o;return s===0&&c===0?null:{position:a,removed:s,added:c}}export{e as ADW_COMBO_NO_SELECTION,clampListSelection,listItemsChanged,normalizeComboOptions,parseListModel};
|
package/lib/esm/menu.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";const e=[`action-disabled`,`action-missing`,`macos-menubar`],t=[`horizontal-buttons`,`circular-buttons`,`inline-buttons`],n=[`ltr`,`rtl`,`none`],str=e=>typeof e==`string`?e:void 0;function oneOf(e,t){return typeof t==`string`&&e.includes(t)?t:void 0}function put(e,t,n){n!==void 0&&(e[t]=n)}function normalizeMenuModel(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=normalizeEntry(n);e!==null&&t.push(e)}return t}function normalizeEntry(r){if(typeof r==`string`)return{kind:`item`,label:r};if(typeof r!=`object`||!r)return null;let i=r;if(Array.isArray(i.items)&&(i.kind===`section`||i.kind===`submenu`)){let{items:e,kind:t,...n}=i;return normalizeEntry({...n,[t]:e})}if(Array.isArray(i.section)){let e={kind:`section`,items:normalizeMenuModel(i.section)},r=e;return put(r,`label`,str(i.label)),put(r,`displayHint`,oneOf(t,i.displayHint)),put(r,`textDirection`,oneOf(n,i.textDirection)),e}if(Array.isArray(i.submenu)){let e={kind:`submenu`,label:str(i.label)??``,items:normalizeMenuModel(i.submenu)},t=e;return put(t,`icon`,str(i.icon)),put(t,`submenuAction`,str(i.submenuAction)),put(t,`macosSpecial`,str(i.macosSpecial)),e}let a=str(i.label),o={kind:`item`,label:a??``},s=o;return put(s,`action`,str(i.action)||void 0),put(s,`icon`,str(i.icon)),put(s,`verbIcon`,str(i.verbIcon)),put(s,`accel`,str(i.accel)),put(s,`hiddenWhen`,oneOf(e,i.hiddenWhen)),put(s,`custom`,str(i.custom)),put(s,`id`,str(i.id)),i.useMarkup===!0&&(s.useMarkup=!0),a===void 0&&Object.keys(o).length===2?null:o}function parseMenuModel(e){if(!e)return[];let t;try{t=JSON.parse(e)}catch{return[]}return Array.isArray(t)?normalizeMenuModel(t):[]}function menuNodeAt(e,t){if(!Array.isArray(t)||t.length===0)return null;let n=e,r=null;for(let e of t){if(!Number.isInteger(e)||e<0||e>=n.length)return null;r=n[e],n=r.kind===`item`?[]:r.items}return r}function menuItemAt(e,t){let n=menuNodeAt(e,t);return n!==null&&n.kind===`item`?n:null}function flattenMenu(e,t=[]){let n=[],r=!1;return e.forEach((e,i)=>{let a=[...t,i];if(e.kind===`section`){let t=flattenMenu(e.items,a);if(t.length===0)return;n.push({...t[0],separated:n.length>0}),n.push(...t.slice(1)),r=!0;return}n.push({node:e,path:a,separated:r&&n.length>0}),r=!1}),n}function parseDetailedAction(e){if(typeof e!=`string`||e.length===0)return null;let t=e.indexOf(`::`);if(t>0)return{name:e.slice(0,t),target:e.slice(t+2)};let n=e.indexOf(`(`);return n>0&&e.endsWith(`)`)?{name:e.slice(0,n),target:unquote(e.slice(n+1,-1))}:{name:e}}function unquote(e){let t=e[0];if(!(e.length>=2&&(t===`'`||t===`"`)&&e[e.length-1]===t))return e;let n=e.slice(1,-1),r=``;for(let e=0;e<n.length;e+=1){let i=n[e],a=n[e+1];if(i===`\\`&&(a===t||a===`\\`)){r+=a,e+=1;continue}r+=i}return r}function resolveMenuItemState(e,t){let n=parseDetailedAction(e.action);if(t===void 0)return{sensitive:!0,toggled:!1,role:`normal`,visible:visibility(e,!0,!0)};if(n===null)return{sensitive:!0,toggled:!1,role:`normal`,visible:visibility(e,!1,!0)};let r=t?.[n.name];if(r===void 0)return{sensitive:!1,toggled:!1,role:`normal`,visible:visibility(e,!1,!1)};let i=r.enabled!==!1,a=`normal`,o=!1;return n.target!==void 0&&r.state!==void 0?(a=`radio`,o=r.state===n.target):(r.state===`true`||r.state===`false`)&&(a=`check`,o=r.state===`true`),{sensitive:i,toggled:o,role:a,visible:visibility(e,!0,i)}}function visibility(e,t,n){switch(e.hiddenWhen){case`action-missing`:return t;case`action-disabled`:return n;case`macos-menubar`:return!0;default:return!0}}const r={name:`adwaita-web`,custom:!1},i={name:`nativescript`,custom:!1};function menuRefusals(e,t,n=[]){let r=[];return e.forEach((e,i)=>{let a=[...n,i];if(e.kind===`item`){e.custom!==void 0&&!t.custom&&r.push({path:a,what:`custom`,message:`menu item custom="${e.custom}" names an application widget, which ${t.name} cannot host: it has no gtk_popover_menu_add_child. Give the item a label and an action, or keep this menu on GTK.`});return}r.push(...menuRefusals(e.items,t,a))}),r}function assertMenuRenderable(e,t){let n=menuRefusals(e,t);if(n.length===0)return;let r=n.map(e=>` [${e.path.join(`.`)}] ${e.message}`);throw Error(`${t.name} cannot render this menu:\n${r.join(`
|
|
2
|
+
`)}`)}export{i as ADW_MENU_SURFACE_NATIVESCRIPT,r as ADW_MENU_SURFACE_WEB,assertMenuRenderable,flattenMenu,menuItemAt,menuNodeAt,menuRefusals,normalizeMenuModel,parseDetailedAction,parseMenuModel,resolveMenuItemState};
|
package/lib/esm/rows.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";var ExpanderState=class{constructor(){this._expanded=!1,this._listeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_emit(){for(let e of[...this._listeners])e(this._expanded)}get expanded(){return this._expanded}setExpanded(e){let t=!!e;return t===this._expanded?!1:(this._expanded=t,this._emit(),!0)}toggle(){return this.setExpanded(!this._expanded)}expand(){return this.setExpanded(!0)}collapse(){return this.setExpanded(!1)}}
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{SpinState as e}from"./adjustment.js";import{ADW_COMBO_NO_SELECTION as t,clampListSelection as n,listItemsChanged as r,normalizeComboOptions as i}from"./list.js";var ExpanderState=class{constructor(){this._expanded=!1,this._listeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_emit(){for(let e of[...this._listeners])e(this._expanded)}get expanded(){return this._expanded}setExpanded(e){let t=!!e;return t===this._expanded?!1:(this._expanded=t,this._emit(),!0)}toggle(){return this.setExpanded(!this._expanded)}expand(){return this.setExpanded(!0)}collapse(){return this.setExpanded(!1)}},ComboState=class{constructor(){this._options=[],this._selected=0,this._listeners=new Set,this._itemListeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}subscribeItems(e){return this._itemListeners.add(e),()=>{this._itemListeners.delete(e)}}_emit(e){let t={selected:this._selected,value:this.selectedValue,label:this.selectedLabel,interactive:e};for(let e of[...this._listeners])e(t)}_setIndex(e,t){return e===this._selected?!1:(this._selected=e,this._emit(t),!0)}get model(){return this._options.map(e=>({value:e.value,label:e.label}))}setModel(e){let t=this._options,i=Array.isArray(e)?e:[],a=r(t,i);if(this._options=i.map(e=>({value:e.value,label:e.label})),this._selected=n(this._selected,i.length),a)for(let e of[...this._itemListeners])e(a);this._emit(!1)}get selectedIndex(){return this._selected}get presentsChooser(){return this._options.length>1}setSelectedIndex(e){return this._setIndex(Number.isFinite(e)?e:0,!1)}get selectedValue(){return this._options[this._selected]?.value??``}get selectedLabel(){return this._options[this._selected]?.label??``}setSelectedValue(e){let t=this._options.findIndex(t=>t.value===e);return t>=0?this.setSelectedIndex(t):!1}hasIndex(e){return Number.isFinite(e)&&e>=0&&e<this._options.length}select(e){return!this.hasIndex(e)||e===this._selected?!1:this._setIndex(e,!0)}get count(){return this._options.length}},ToggleGroupState=class{constructor(){this._labels=[],this._selected=0,this._listeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_emit(){let e={selected:this._selected,value:this.selectedValue};for(let t of[...this._listeners])t(e)}get labels(){return this._labels}setLabels(e){this._labels=Array.isArray(e)?e:[],this._selected>=this._labels.length&&(this._selected=0)}get selected(){return this._selected}setSelected(e){let t=Number.isFinite(e)?e:0;return t===this._selected||t<0||t>=this._labels.length?!1:(this._selected=t,this._emit(),!0)}get selectedValue(){return this._labels[this._selected]??``}get count(){return this._labels.length}};export{t as ADW_COMBO_NO_SELECTION,ComboState,ExpanderState,e as SpinState,ToggleGroupState,i as normalizeComboOptions};
|
package/lib/esm/split-button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";const
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{menuItemAt as e,normalizeMenuModel as t}from"./menu.js";const n=`More Options`,r=.5,i={none:`open-menu-symbolic`,down:`pan-down-symbolic`,up:`pan-up-symbolic`,left:`pan-start-symbolic`,right:`pan-end-symbolic`},a={...i,none:`pan-down-symbolic`},o=[`none`,`up`,`down`,`left`,`right`];function splitButtonStyleClasses(e,t){let n=[];return t!==null&&t.length>0&&n.push(`image-button`),e!==null&&e.length>0&&n.push(`text-button`),n}function resolveDropdownTooltip(e){return typeof e==`string`&&e.length>0?{text:e,markup:!0}:{text:n,markup:!1}}function menuButtonArrowIcon(e){return i[e]??i.down}function splitButtonArrowIcon(e){return a[e]??a.down}function splitButtonPopupDirection(e){return e===`none`||!o.includes(e)?`down`:e}const s=splitButtonPopupDirection;function isSplitButtonDirection(e){return typeof e==`string`&&o.includes(e)}function splitButtonRootState(e,t){return{active:e.active||t.active||e.keyboardActivating||t.keyboardActivating,checked:e.checked||t.checked}}const menuKey=e=>e===null?``:JSON.stringify(e);function internalContent(e){return Object.freeze({adwInternalContent:e})}function derivedPopover(){return Object.freeze({adwDerivedPopover:!0})}var SplitButtonState=class{constructor(){this._mode=`empty`,this._label=null,this._iconName=null,this._child=null,this._useUnderline=!1,this._menuModel=null,this._popover=null,this._direction=`down`,this._dropdownTooltip=``,this._open=!1,this._listeners=new Set}subscribe(e){return this._listeners.add(e),()=>{this._listeners.delete(e)}}_emit(e,t){let n={mode:this._mode,label:this._label,iconName:this._iconName,child:this._child,styleClasses:this.styleClasses,dropdownEnabled:this.dropdownEnabled,open:this._open,notified:e,interactive:t};for(let e of[...this._listeners])e(n)}get mode(){return this._mode}get label(){return this._label}setLabel(e){if(typeof e!=`string`||e===this._label)return!1;let t=[];return this._iconName!==null&&t.push(`icon-name`),this._child!==null&&t.push(`child`),this._child=this._mode===`label`?this._child:internalContent(`label`),this._mode=`label`,this._label=e,this._iconName=null,t.push(`label`),this._emit(t,!1),!0}get iconName(){return this._iconName}setIconName(e){if(typeof e!=`string`||e===this._iconName)return!1;let t=[];return this._label!==null&&t.push(`label`),this._child!==null&&t.push(`child`),this._child=this._mode===`icon`?this._child:internalContent(`icon`),this._mode=`icon`,this._iconName=e,this._label=null,t.push(`icon-name`),this._emit(t,!1),!0}get child(){return this._child}setChild(e){let t=e??null;if(t===this._child)return!1;let n=[];return this._label!==null&&n.push(`label`),this._iconName!==null&&n.push(`icon-name`),this._mode=t===null?`empty`:`child`,this._child=t,this._label=null,this._iconName=null,n.push(`child`),this._emit(n,!1),!0}get styleClasses(){return splitButtonStyleClasses(this._label,this._iconName)}get useUnderline(){return this._useUnderline}setUseUnderline(e){let t=!!e;return t===this._useUnderline?!1:(this._useUnderline=t,this._emit([`use-underline`],!1),!0)}get menuModel(){return this._menuModel}setMenuModel(e){let n=t(e),r=n.length>0?n:null;if(menuKey(r)===menuKey(this._menuModel))return!1;let i=r===null?null:derivedPopover(),a=[];return i!==this._popover&&a.push(`popover`),a.push(`menu-model`),this._menuModel=r,this._popover=i,this.dropdownEnabled||(this._open=!1),this._emit(a,!1),!0}get popover(){return this._popover}setPopover(e){let t=e??null;if(t===this._popover)return!1;let n=[];return this._menuModel!==null&&n.push(`menu-model`),n.push(`popover`),this._menuModel=null,this._popover=t,this.dropdownEnabled||(this._open=!1),this._emit(n,!1),!0}get dropdownEnabled(){return this._menuModel!==null||this._popover!==null}get direction(){return this._direction}setDirection(e){return!isSplitButtonDirection(e)||e===this._direction?!1:(this._direction=e,this._emit([`direction`],!1),!0)}get arrowIcon(){return splitButtonArrowIcon(this._direction)}get dropdownTooltip(){return this._dropdownTooltip}setDropdownTooltip(e){return typeof e!=`string`||e===this._dropdownTooltip?!1:(this._dropdownTooltip=e,this._emit([`dropdown-tooltip`],!1),!0)}get open(){return this._open}_setOpen(e,t){return e&&!this.dropdownEnabled||e===this._open?!1:(this._open=e,this._emit([],t),!0)}openMenu(){return this._setOpen(!0,!1)}closeMenu(){return this._setOpen(!1,!1)}toggleMenu(){return this._setOpen(!this._open,!0)}activateMenuItem(t){if(this._menuModel===null)return null;let n=e(this._menuModel,t);return n===null?null:(this._setOpen(!1,!0),n)}};export{n as DEFAULT_DROPDOWN_TOOLTIP,r as SPLIT_BUTTON_DISABLED_OPACITY,SplitButtonState,isSplitButtonDirection,menuButtonArrowIcon,s as menuButtonPopupDirection,resolveDropdownTooltip,splitButtonArrowIcon,splitButtonPopupDirection,splitButtonRootState,splitButtonStyleClasses};
|
package/lib/esm/tab-view.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{ViewStackState as e}from"./view-stack.js";const t=!0;function tabsRevealed(e){return e.autohide?e.nPages>1||e.nPinnedPages>=1||e.isTransferringPage:!0}function tabCloseVisible(e){return e.pinned?!1:e.hovering&&e.fullyVisible||e.selected||e.dragging}function tabTooltip(e){return e.tooltip===``?e.title:e.tooltip}function tabTooltipIsMarkup(e){return e.tooltip!==``}function tabIconState(e,t){let n=e.indicatorIcon,r=e.icon;return!e.loading&&e.pinned&&r===null&&(r=t),{icon:r,spinner:e.loading,iconVisible:(r!==null||e.loading)&&(!e.pinned||n===null),indicatorVisible:n!==null}}function isDescendantOfPage(e,t,n){let r=t;for(;r!==null&&r!==n;)r=e.find(e=>e.id===r)?.parentId??null;return r===n}function successorAfterClose(e,t,n){if(t!==n)return n;let r=e.findIndex(e=>e.id===t);if(r<0)return n;let i=e[r].parentId;if(i!==null&&r>0){let t=e[r-1];if(isDescendantOfPage(e,t.id,i))return t.id;let n=e.find(e=>e.id===i);if(n&&t.pinned&&n.pinned)return n.id}return r<e.length-1?e[r+1].id:r>0?e[r-1].id:null}function assertionDiagnostic(e,t){return`${e}: assertion '${t}' failed`}var TabViewState=class{constructor(t={}){this._stack=new e,this._selectionListeners=new Set,this._pagesListeners=new Set,this._diagnostics=[],this._selectedId=null,this._deferSelection=!1,this._deferredSelection=null,this._pagesSource=null,this._pagesView=null,this._handlers=t,this._stack.subscribe(e=>{let t=this._selectedId,n=e.page?.content?.id??null;this._selectedId=n;let r={selectedId:n,selectedIndex:e.index,previousId:t,interactive:e.interactive};this._deferSelection?this._deferredSelection=r:this._emitSelection(r)})}subscribe(e){return this._selectionListeners.add(e),()=>{this._selectionListeners.delete(e)}}subscribePages(e){return this._pagesListeners.add(e),()=>{this._pagesListeners.delete(e)}}_emitSelection(e){for(let t of[...this._selectionListeners])t(e)}_emitPages(e){for(let t of[...this._pagesListeners])t(e)}_flushDeferredSelection(){let e=this._deferredSelection;e&&(this._deferredSelection=null,this._emitSelection(e))}get pages(){let e=this._stack.pages;return(this._pagesSource!==e||this._pagesView===null)&&(this._pagesSource=e,this._pagesView=Object.freeze(e.map(e=>e.content))),this._pagesView}get nPages(){return this._stack.count}get nPinnedPages(){let e=this.pages.findIndex(e=>!e.pinned);return e<0?this.pages.length:e}getNthPage(e){return!Number.isInteger(e)||e<0||e>=this.nPages?null:this.pages[e]}getPagePosition(e){return this._stack.indexOfName(e)}getPage(e){return this._recordOf(e)}isClosing(e){return this._recordOf(e)?.closing??!1}get diagnostics(){return this._diagnostics}get selectedId(){return this._stack.visiblePage?.content?.id??null}get selectedIndex(){return this._stack.visibleIndex}get selectedPage(){return this._stack.visiblePage?.content??null}setSelectedPage(e,t=!0){if(e===null)return this.nPages>0&&this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_selected_page`,`ADW_IS_TAB_PAGE (selected_page)`)),!1;let n=this.getPagePosition(e);return n<0?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_selected_page`,`page_belongs_to_this_view (self, selected_page)`)),!1):this._stack.setVisibleIndex(n,t)}selectNthPage(e){return this._stack.setVisibleIndex(e,!0)}selectPreviousPage(){let e=this.selectedIndex;return e<=0?!1:this._stack.setVisibleIndex(e-1,!0)}selectNextPage(){let e=this.selectedIndex;return e<0||e>=this.nPages-1?!1:this._stack.setVisibleIndex(e+1,!0)}selectFirstPage(){let e=this.selectedPage;if(!e)return!1;let t=e.pinned,n=this.getNthPage(t?0:this.nPinnedPages);return n===e&&!t&&(n=this.getNthPage(0)),!n||n===e?!1:this.setSelectedPage(n.id)}selectLastPage(){let e=this.selectedPage;if(!e)return!1;let t=e.pinned,n=this.getNthPage((t?this.nPinnedPages:this.nPages)-1);return n===e&&t&&(n=this.getNthPage(this.nPages-1)),!n||n===e?!1:this.setSelectedPage(n.id)}cycleNextPage(){return!this.selectedPage||this.nPages<=1?!1:this.selectNextPage()?!0:this._stack.setVisibleIndex(0,!0)}cyclePreviousPage(){return!this.selectedPage||this.nPages<=1?!1:this.selectPreviousPage()?!0:this._stack.setVisibleIndex(this.nPages-1,!0)}addPage(e,t=null){if(t===null)return this._insert(e,this.nPages,!1,null);let n=this.getPagePosition(t);if(n<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_add_page`,`page_belongs_to_this_view (self, parent)`)),-1;let r=this.pages[n].pinned?this.nPinnedPages-1:n;do if(r++,r>=this.nPages)break;while(isDescendantOfPage(this.pages,this.pages[r].id,t));return this._insert(e,r,!1,t)}insertPage(e,t){return!Number.isInteger(t)||t<this.nPinnedPages?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert`,`position >= self->n_pinned_pages`)),-1):t>this.nPages?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert`,`position <= self->n_pages`)),-1):this._insert(e,t,!1,null)}prependPage(e){return this._insert(e,this.nPinnedPages,!1,null)}appendPage(e){return this._insert(e,this.nPages,!1,null)}insertPinnedPage(e,t){return!Number.isInteger(t)||t<0?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert_pinned`,`position >= 0`)),-1):t>this.nPinnedPages?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert_pinned`,`position <= self->n_pinned_pages`)),-1):this._insert(e,t,!0,null)}prependPinnedPage(e){return this._insert(e,0,!0,null)}appendPinnedPage(e){return this._insert(e,this.nPinnedPages,!0,null)}_insert(e,t,n,r){if(this.getPagePosition(e.id)>=0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert`,`page id '${e.id}' is unique`)),-1;let i={id:e.id,title:e.title??``,tooltip:e.tooltip??``,icon:e.icon??null,indicatorIcon:e.indicatorIcon??null,loading:e.loading??!1,needsAttention:e.needsAttention??!1,pinned:n,parentId:r,closing:!1,content:e.content};return this._deferSelection=!0,this._stack.insertPage({name:i.id,content:i},t),this._deferSelection=!1,this._emitPages({kind:`attached`,id:i.id,position:t,previousPosition:-1}),this._flushDeferredSelection(),t}setPagePinned(e,t){let n=this.getPagePosition(e);if(n<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_page_pinned`,`page_belongs_to_this_view (self, page)`)),-1;let r=this._recordAt(n),i=!!t;if(r.pinned===i)return-1;let a=i?this.nPinnedPages:this.nPinnedPages-1;return r.pinned=i,n!==a&&this._stack.movePage(n,a),this._emitPages({kind:`pinned`,id:e,position:a,previousPosition:n}),a}closePage(e){let t=this._recordOf(e);if(!t)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_page`,`page_belongs_to_this_view (self, page)`)),!1;if(t.closing)return!1;t.closing=!0;let n=this._handlers.onClosePage?this._handlers.onClosePage(t):!t.pinned;return n!==`defer`&&this.closePageFinish(e,n),!0}closePageFinish(e,t){let n=this._recordOf(e);return n?n.closing?(n.closing=!1,t?this.detachPage(e)!==null:!1):(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_page_finish`,`page->closing`)),!1):(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_page_finish`,`page_belongs_to_this_view (self, page)`)),!1)}detachPage(e){let t=this.getPagePosition(e);if(t<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_detach_page`,`page_belongs_to_this_view (self, page)`)),null;let n=this._recordAt(t),r=successorAfterClose(this.pages,e,this.selectedId);r!==null&&r!==this.selectedId&&this.setSelectedPage(r,!1);let i=this.selectedId===e;this._stack.removePage(e);for(let t of this._records())t.parentId===e&&(t.parentId=n.parentId);return i&&(this._selectedId=null,this._emitSelection({selectedId:null,selectedIndex:-1,previousId:e,interactive:!1})),this._emitPages({kind:`detached`,id:e,position:t,previousPosition:t}),n}closeOtherPages(e){let t=this.getPagePosition(e);if(t<0){this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_other_pages`,`page_belongs_to_this_view (self, page)`));return}let n=this.pages.map(e=>e.id);for(let e=n.length-1;e>=0;e--)e!==t&&this.closePage(n[e])}closePagesBefore(e){let t=this.getPagePosition(e);if(t<0){this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_pages_before`,`page_belongs_to_this_view (self, page)`));return}let n=this.pages.map(e=>e.id);for(let e=t-1;e>=0;e--)this.closePage(n[e])}closePagesAfter(e){let t=this.getPagePosition(e);if(t<0){this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_pages_after`,`page_belongs_to_this_view (self, page)`));return}let n=this.pages.map(e=>e.id);for(let e=n.length-1;e>t;e--)this.closePage(n[e])}reorderPage(e,t){let n=this.getPagePosition(e);if(n<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_reorder_page`,`page_belongs_to_this_view (self, page)`)),!1;let r=this.pages[n].pinned,i=r?0:this.nPinnedPages,a=r?this.nPinnedPages:this.nPages;return!Number.isInteger(t)||t<i||t>=a?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_reorder_page`,r?`position < self->n_pinned_pages`:`position >= self->n_pinned_pages`)),!1):n===t?!1:(this._stack.movePage(n,t),this._emitPages({kind:`reordered`,id:e,position:t,previousPosition:n}),!0)}reorderBackward(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):t<=(this.pages[t].pinned?0:this.nPinnedPages)?!1:this.reorderPage(e,t-1)}reorderForward(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):t>=(this.pages[t].pinned?this.nPinnedPages:this.nPages)-1?!1:this.reorderPage(e,t+1)}reorderFirst(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):this.reorderPage(e,this.pages[t].pinned?0:this.nPinnedPages)}reorderLast(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):this.reorderPage(e,(this.pages[t].pinned?this.nPinnedPages:this.nPages)-1)}_reorderMissing(e){return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_reorder_page`,`page_belongs_to_this_view (self, '${e}')`)),!1}setPageTitle(e,t){return this._update(e,e=>{let n=t??``;return e.title===n?!1:(e.title=n,!0)})}setPageTooltip(e,t){return this._update(e,e=>{let n=t??``;return e.tooltip===n?!1:(e.tooltip=n,!0)})}setPageIcon(e,t){return this._update(e,e=>e.icon===t?!1:(e.icon=t,!0))}setPageIndicatorIcon(e,t){return this._update(e,e=>e.indicatorIcon===t?!1:(e.indicatorIcon=t,!0))}setPageLoading(e,t){return this._update(e,e=>{let n=!!t;return e.loading===n?!1:(e.loading=n,!0)})}setPageNeedsAttention(e,t){return this._update(e,e=>{let n=!!t;return e.needsAttention===n?!1:(e.needsAttention=n,!0)})}_update(e,t){let n=this.getPagePosition(e);return n<0?(this._diagnostics.push(assertionDiagnostic(`adw_tab_page_set_property`,`ADW_IS_TAB_PAGE (self)`)),!1):t(this._recordAt(n))?(this._emitPages({kind:`updated`,id:e,position:n,previousPosition:n}),!0):!1}_records(){return this._stack.pages.map(e=>e.content)}_recordAt(e){return this._stack.pages[e].content}_recordOf(e){let t=this.getPagePosition(e);return t<0?null:this._recordAt(t)}};export{t as DEFAULT_TAB_AUTOHIDE,TabViewState,isDescendantOfPage,successorAfterClose,tabCloseVisible,tabIconState,tabTooltip,tabTooltipIsMarkup,tabsRevealed};
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{ViewStackState as e}from"./view-stack.js";function tabViewItemsChanged(e){switch(e.kind){case`attached`:return{position:e.position,removed:0,added:1};case`detached`:return{position:e.position,removed:1,added:0};case`updated`:return{position:e.position,removed:1,added:1};default:{let t=Math.min(e.position,e.previousPosition),n=Math.abs(e.position-e.previousPosition)+1;return{position:t,removed:n,added:n}}}}const t=!0;function tabsRevealed(e){return e.autohide?e.nPages>1||e.nPinnedPages>=1||e.isTransferringPage:!0}function tabCloseVisible(e){return e.pinned?!1:e.hovering&&e.fullyVisible||e.selected||e.dragging}function tabTooltip(e){return e.tooltip===``?e.title:e.tooltip}function tabTooltipIsMarkup(e){return e.tooltip!==``}function tabIconState(e,t){let n=e.indicatorIcon,r=e.icon;return!e.loading&&e.pinned&&r===null&&(r=t),{icon:r,spinner:e.loading,iconVisible:(r!==null||e.loading)&&(!e.pinned||n===null),indicatorVisible:n!==null}}function isDescendantOfPage(e,t,n){let r=t;for(;r!==null&&r!==n;)r=e.find(e=>e.id===r)?.parentId??null;return r===n}function successorAfterClose(e,t,n){if(t!==n)return n;let r=e.findIndex(e=>e.id===t);if(r<0)return n;let i=e[r].parentId;if(i!==null&&r>0){let t=e[r-1];if(isDescendantOfPage(e,t.id,i))return t.id;let n=e.find(e=>e.id===i);if(n&&t.pinned&&n.pinned)return n.id}return r<e.length-1?e[r+1].id:r>0?e[r-1].id:null}function assertionDiagnostic(e,t){return`${e}: assertion '${t}' failed`}var TabViewState=class{constructor(t={}){this._stack=new e,this._selectionListeners=new Set,this._pagesListeners=new Set,this._diagnostics=[],this._selectedId=null,this._deferSelection=!1,this._deferredSelection=null,this._pagesSource=null,this._pagesView=null,this._handlers=t,this._stack.subscribe(e=>{let t=this._selectedId,n=e.page?.content?.id??null;this._selectedId=n;let r={selectedId:n,selectedIndex:e.index,previousId:t,interactive:e.interactive};this._deferSelection?this._deferredSelection=r:this._emitSelection(r)})}subscribe(e){return this._selectionListeners.add(e),()=>{this._selectionListeners.delete(e)}}subscribePages(e){return this._pagesListeners.add(e),()=>{this._pagesListeners.delete(e)}}_emitSelection(e){for(let t of[...this._selectionListeners])t(e)}_emitPages(e){for(let t of[...this._pagesListeners])t(e)}_flushDeferredSelection(){let e=this._deferredSelection;e&&(this._deferredSelection=null,this._emitSelection(e))}get pages(){let e=this._stack.pages;return(this._pagesSource!==e||this._pagesView===null)&&(this._pagesSource=e,this._pagesView=Object.freeze(e.map(e=>e.content))),this._pagesView}get nPages(){return this._stack.count}get nPinnedPages(){let e=this.pages.findIndex(e=>!e.pinned);return e<0?this.pages.length:e}getNthPage(e){return!Number.isInteger(e)||e<0||e>=this.nPages?null:this.pages[e]}getPagePosition(e){return this._stack.indexOfName(e)}getPage(e){return this._recordOf(e)}isClosing(e){return this._recordOf(e)?.closing??!1}get diagnostics(){return this._diagnostics}get selectedId(){return this._stack.visiblePage?.content?.id??null}get selectedIndex(){return this._stack.visibleIndex}get selectedPage(){return this._stack.visiblePage?.content??null}setSelectedPage(e,t=!0){if(e!==null&&typeof e!=`string`)return this.pages.includes(e)?this.setSelectedPage(e.id,t):(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_selected_page`,`page_belongs_to_this_view (self, selected_page)`)),!1);let n=e;if(n===null)return this.nPages>0&&this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_selected_page`,`ADW_IS_TAB_PAGE (selected_page)`)),!1;let r=this.getPagePosition(n);return r<0?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_selected_page`,`page_belongs_to_this_view (self, selected_page)`)),!1):this._stack.setVisibleIndex(r,t)}selectNthPage(e){return this._stack.setVisibleIndex(e,!0)}selectPreviousPage(){let e=this.selectedIndex;return e<=0?!1:this._stack.setVisibleIndex(e-1,!0)}selectNextPage(){let e=this.selectedIndex;return e<0||e>=this.nPages-1?!1:this._stack.setVisibleIndex(e+1,!0)}selectFirstPage(){let e=this.selectedPage;if(!e)return!1;let t=e.pinned,n=this.getNthPage(t?0:this.nPinnedPages);return n===e&&!t&&(n=this.getNthPage(0)),!n||n===e?!1:this.setSelectedPage(n.id)}selectLastPage(){let e=this.selectedPage;if(!e)return!1;let t=e.pinned,n=this.getNthPage((t?this.nPinnedPages:this.nPages)-1);return n===e&&t&&(n=this.getNthPage(this.nPages-1)),!n||n===e?!1:this.setSelectedPage(n.id)}cycleNextPage(){return!this.selectedPage||this.nPages<=1?!1:this.selectNextPage()?!0:this._stack.setVisibleIndex(0,!0)}cyclePreviousPage(){return!this.selectedPage||this.nPages<=1?!1:this.selectPreviousPage()?!0:this._stack.setVisibleIndex(this.nPages-1,!0)}addPage(e,t=null){if(t===null)return this._insert(e,this.nPages,!1,null);let n=this.getPagePosition(t);if(n<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_add_page`,`page_belongs_to_this_view (self, parent)`)),-1;let r=this.pages[n].pinned?this.nPinnedPages-1:n;do if(r++,r>=this.nPages)break;while(isDescendantOfPage(this.pages,this.pages[r].id,t));return this._insert(e,r,!1,t)}insertPage(e,t){return!Number.isInteger(t)||t<this.nPinnedPages?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert`,`position >= self->n_pinned_pages`)),-1):t>this.nPages?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert`,`position <= self->n_pages`)),-1):this._insert(e,t,!1,null)}prependPage(e){return this._insert(e,this.nPinnedPages,!1,null)}appendPage(e){return this._insert(e,this.nPages,!1,null)}insertPinnedPage(e,t){return!Number.isInteger(t)||t<0?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert_pinned`,`position >= 0`)),-1):t>this.nPinnedPages?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert_pinned`,`position <= self->n_pinned_pages`)),-1):this._insert(e,t,!0,null)}prependPinnedPage(e){return this._insert(e,0,!0,null)}appendPinnedPage(e){return this._insert(e,this.nPinnedPages,!0,null)}_insert(e,t,n,r){if(this.getPagePosition(e.id)>=0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_insert`,`page id '${e.id}' is unique`)),-1;let i={id:e.id,title:e.title??``,tooltip:e.tooltip??``,icon:e.icon??null,indicatorIcon:e.indicatorIcon??null,loading:e.loading??!1,needsAttention:e.needsAttention??!1,pinned:n,parentId:r,closing:!1,content:e.content};return this._deferSelection=!0,this._stack.insertPage({name:i.id,content:i},t),this._deferSelection=!1,this._emitPages({kind:`attached`,id:i.id,position:t,previousPosition:-1}),this._flushDeferredSelection(),t}setPagePinned(e,t){let n=this.getPagePosition(e);if(n<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_set_page_pinned`,`page_belongs_to_this_view (self, page)`)),-1;let r=this._recordAt(n),i=!!t;if(r.pinned===i)return-1;let a=i?this.nPinnedPages:this.nPinnedPages-1;return r.pinned=i,n!==a&&this._stack.movePage(n,a),this._emitPages({kind:`pinned`,id:e,position:a,previousPosition:n}),a}closePage(e){let t=this._recordOf(e);if(!t)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_page`,`page_belongs_to_this_view (self, page)`)),!1;if(t.closing)return!1;t.closing=!0;let n=this._handlers.onClosePage?this._handlers.onClosePage(t):!t.pinned;return n!==`defer`&&this.closePageFinish(e,n),!0}closePageFinish(e,t){let n=this._recordOf(e);return n?n.closing?(n.closing=!1,t?this.detachPage(e)!==null:!1):(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_page_finish`,`page->closing`)),!1):(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_page_finish`,`page_belongs_to_this_view (self, page)`)),!1)}detachPage(e){let t=this.getPagePosition(e);if(t<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_detach_page`,`page_belongs_to_this_view (self, page)`)),null;let n=this._recordAt(t),r=successorAfterClose(this.pages,e,this.selectedId);r!==null&&r!==this.selectedId&&this.setSelectedPage(r,!1);let i=this.selectedId===e;this._stack.removePage(e);for(let t of this._records())t.parentId===e&&(t.parentId=n.parentId);return i&&(this._selectedId=null,this._emitSelection({selectedId:null,selectedIndex:-1,previousId:e,interactive:!1})),this._emitPages({kind:`detached`,id:e,position:t,previousPosition:t}),n}closeOtherPages(e){let t=this.getPagePosition(e);if(t<0){this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_other_pages`,`page_belongs_to_this_view (self, page)`));return}let n=this.pages.map(e=>e.id);for(let e=n.length-1;e>=0;e--)e!==t&&this.closePage(n[e])}closePagesBefore(e){let t=this.getPagePosition(e);if(t<0){this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_pages_before`,`page_belongs_to_this_view (self, page)`));return}let n=this.pages.map(e=>e.id);for(let e=t-1;e>=0;e--)this.closePage(n[e])}closePagesAfter(e){let t=this.getPagePosition(e);if(t<0){this._diagnostics.push(assertionDiagnostic(`adw_tab_view_close_pages_after`,`page_belongs_to_this_view (self, page)`));return}let n=this.pages.map(e=>e.id);for(let e=n.length-1;e>t;e--)this.closePage(n[e])}reorderPage(e,t){let n=this.getPagePosition(e);if(n<0)return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_reorder_page`,`page_belongs_to_this_view (self, page)`)),!1;let r=this.pages[n].pinned,i=r?0:this.nPinnedPages,a=r?this.nPinnedPages:this.nPages;return!Number.isInteger(t)||t<i||t>=a?(this._diagnostics.push(assertionDiagnostic(`adw_tab_view_reorder_page`,r?`position < self->n_pinned_pages`:`position >= self->n_pinned_pages`)),!1):n===t?!1:(this._stack.movePage(n,t),this._emitPages({kind:`reordered`,id:e,position:t,previousPosition:n}),!0)}reorderBackward(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):t<=(this.pages[t].pinned?0:this.nPinnedPages)?!1:this.reorderPage(e,t-1)}reorderForward(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):t>=(this.pages[t].pinned?this.nPinnedPages:this.nPages)-1?!1:this.reorderPage(e,t+1)}reorderFirst(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):this.reorderPage(e,this.pages[t].pinned?0:this.nPinnedPages)}reorderLast(e){let t=this.getPagePosition(e);return t<0?this._reorderMissing(e):this.reorderPage(e,(this.pages[t].pinned?this.nPinnedPages:this.nPages)-1)}_reorderMissing(e){return this._diagnostics.push(assertionDiagnostic(`adw_tab_view_reorder_page`,`page_belongs_to_this_view (self, '${e}')`)),!1}setPageTitle(e,t){return this._update(e,e=>{let n=t??``;return e.title===n?!1:(e.title=n,!0)})}setPageTooltip(e,t){return this._update(e,e=>{let n=t??``;return e.tooltip===n?!1:(e.tooltip=n,!0)})}setPageIcon(e,t){return this._update(e,e=>e.icon===t?!1:(e.icon=t,!0))}setPageIndicatorIcon(e,t){return this._update(e,e=>e.indicatorIcon===t?!1:(e.indicatorIcon=t,!0))}setPageLoading(e,t){return this._update(e,e=>{let n=!!t;return e.loading===n?!1:(e.loading=n,!0)})}setPageNeedsAttention(e,t){return this._update(e,e=>{let n=!!t;return e.needsAttention===n?!1:(e.needsAttention=n,!0)})}_update(e,t){let n=this.getPagePosition(e);return n<0?(this._diagnostics.push(assertionDiagnostic(`adw_tab_page_set_property`,`ADW_IS_TAB_PAGE (self)`)),!1):t(this._recordAt(n))?(this._emitPages({kind:`updated`,id:e,position:n,previousPosition:n}),!0):!1}_records(){return this._stack.pages.map(e=>e.content)}_recordAt(e){return this._stack.pages[e].content}_recordOf(e){let t=this.getPagePosition(e);return t<0?null:this._recordAt(t)}};export{t as DEFAULT_TAB_AUTOHIDE,TabViewState,isDescendantOfPage,successorAfterClose,tabCloseVisible,tabIconState,tabTooltip,tabTooltipIsMarkup,tabViewItemsChanged,tabsRevealed};
|