@gjsify/adwaita-nativescript 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/lib/esm/index.js +1 -1
  2. package/lib/esm/widgets/adw-action-row.js +1 -1
  3. package/lib/esm/widgets/adw-avatar.js +1 -1
  4. package/lib/esm/widgets/adw-banner.js +1 -1
  5. package/lib/esm/widgets/adw-bottom-sheet.js +1 -1
  6. package/lib/esm/widgets/adw-button-content.js +1 -1
  7. package/lib/esm/widgets/adw-button-row.js +1 -1
  8. package/lib/esm/widgets/adw-carousel.js +1 -1
  9. package/lib/esm/widgets/adw-clamp.js +1 -1
  10. package/lib/esm/widgets/adw-combo-row.js +1 -1
  11. package/lib/esm/widgets/adw-data-grid.js +1 -0
  12. package/lib/esm/widgets/adw-drop-down.js +1 -0
  13. package/lib/esm/widgets/adw-entry-row.js +1 -1
  14. package/lib/esm/widgets/adw-entry.js +1 -0
  15. package/lib/esm/widgets/adw-expander-row.js +1 -1
  16. package/lib/esm/widgets/adw-header-bar.js +1 -1
  17. package/lib/esm/widgets/adw-inline-view-switcher.js +1 -1
  18. package/lib/esm/widgets/adw-navigation-split-view.js +1 -1
  19. package/lib/esm/widgets/adw-navigation-view.js +1 -1
  20. package/lib/esm/widgets/adw-overlay-split-view.js +1 -1
  21. package/lib/esm/widgets/adw-password-entry-row.js +1 -1
  22. package/lib/esm/widgets/adw-preferences-dialog.js +1 -1
  23. package/lib/esm/widgets/adw-preferences-group.js +1 -1
  24. package/lib/esm/widgets/adw-preferences-page.js +1 -1
  25. package/lib/esm/widgets/adw-sidebar.js +1 -1
  26. package/lib/esm/widgets/adw-spin-row.js +1 -1
  27. package/lib/esm/widgets/adw-spinner.js +1 -1
  28. package/lib/esm/widgets/adw-split-button.js +1 -1
  29. package/lib/esm/widgets/adw-status-page.js +1 -1
  30. package/lib/esm/widgets/adw-switch-row.js +1 -1
  31. package/lib/esm/widgets/adw-tab-view.js +1 -1
  32. package/lib/esm/widgets/adw-toolbar-view.js +1 -1
  33. package/lib/esm/widgets/adw-view-stack.js +1 -1
  34. package/lib/esm/widgets/adw-view-switcher-bar.js +1 -1
  35. package/lib/esm/widgets/adw-window-title.js +1 -1
  36. package/lib/esm/widgets/adw-wrap-box.js +1 -1
  37. package/lib/esm/widgets/avatar-color.js +1 -0
  38. package/lib/esm/widgets/bottom-sheet-state.js +1 -0
  39. package/lib/esm/widgets/button-content.js +1 -0
  40. package/lib/esm/widgets/carousel-state.js +1 -0
  41. package/lib/esm/widgets/chrome.js +1 -0
  42. package/lib/esm/widgets/data-grid-model.js +1 -0
  43. package/lib/esm/widgets/entry-row-view.js +1 -0
  44. package/lib/esm/widgets/icon-path.js +2 -2
  45. package/lib/esm/widgets/icons.ios.js +1 -0
  46. package/lib/esm/widgets/index.js +1 -1
  47. package/lib/esm/widgets/navigation-stack.js +1 -0
  48. package/lib/esm/widgets/preferences-group-state.js +1 -0
  49. package/lib/esm/widgets/preferences-search.js +1 -0
  50. package/lib/esm/widgets/row-state.js +1 -0
  51. package/lib/esm/widgets/sidebar-model.js +1 -0
  52. package/lib/esm/widgets/split-button.js +1 -0
  53. package/lib/esm/widgets/split-view-base.js +1 -1
  54. package/lib/esm/widgets/split-view-state.js +1 -0
  55. package/lib/esm/widgets/split-view-width.js +1 -0
  56. package/lib/esm/widgets/status-page-content.js +1 -0
  57. package/lib/esm/widgets/svg-path.js +2 -0
  58. package/lib/esm/widgets/tab-view-state.js +1 -0
  59. package/lib/esm/widgets/view-stack-state.js +1 -0
  60. package/lib/esm/widgets/view-switcher-base.js +1 -1
  61. package/lib/esm/widgets/view-switcher-model.js +1 -0
  62. package/lib/esm/widgets/wrap-box-layout.js +1 -0
  63. package/lib/types/banner.spec.d.ts +2 -0
  64. package/lib/types/bottom-sheet.spec.d.ts +2 -0
  65. package/lib/types/button-content.spec.d.ts +2 -0
  66. package/lib/types/carousel.spec.d.ts +1 -0
  67. package/lib/types/chrome.spec.d.ts +2 -0
  68. package/lib/types/data-grid.spec.d.ts +2 -0
  69. package/lib/types/drop-down.spec.d.ts +2 -0
  70. package/lib/types/entry-rows.spec.d.ts +2 -0
  71. package/lib/types/entry.spec.d.ts +2 -0
  72. package/lib/types/index.d.ts +2 -2
  73. package/lib/types/navigation-view.spec.d.ts +2 -0
  74. package/lib/types/preferences.spec.d.ts +2 -0
  75. package/lib/types/row-state.spec.d.ts +2 -0
  76. package/lib/types/sidebar.spec.d.ts +1 -0
  77. package/lib/types/split-button.spec.d.ts +1 -0
  78. package/lib/types/split-view-state.spec.d.ts +2 -0
  79. package/lib/types/split-view-width.spec.d.ts +2 -0
  80. package/lib/types/status-page.spec.d.ts +2 -0
  81. package/lib/types/svg-path.spec.d.ts +2 -0
  82. package/lib/types/tab-view.spec.d.ts +2 -0
  83. package/lib/types/view-stack.spec.d.ts +2 -0
  84. package/lib/types/view-switcher.spec.d.ts +1 -0
  85. package/lib/types/widgets/adw-action-row.d.ts +63 -7
  86. package/lib/types/widgets/adw-avatar.d.ts +2 -7
  87. package/lib/types/widgets/adw-banner.d.ts +26 -7
  88. package/lib/types/widgets/adw-bottom-sheet.d.ts +29 -11
  89. package/lib/types/widgets/adw-button-content.d.ts +41 -6
  90. package/lib/types/widgets/adw-button-row.d.ts +31 -9
  91. package/lib/types/widgets/adw-carousel.d.ts +70 -15
  92. package/lib/types/widgets/adw-clamp.d.ts +21 -4
  93. package/lib/types/widgets/adw-data-grid.d.ts +73 -0
  94. package/lib/types/widgets/adw-drop-down.d.ts +45 -0
  95. package/lib/types/widgets/adw-entry-row.d.ts +98 -2
  96. package/lib/types/widgets/adw-entry.d.ts +43 -0
  97. package/lib/types/widgets/adw-expander-row.d.ts +3 -0
  98. package/lib/types/widgets/adw-header-bar.d.ts +11 -2
  99. package/lib/types/widgets/adw-inline-view-switcher.d.ts +26 -0
  100. package/lib/types/widgets/adw-navigation-split-view.d.ts +2 -1
  101. package/lib/types/widgets/adw-navigation-view.d.ts +71 -16
  102. package/lib/types/widgets/adw-overlay-split-view.d.ts +29 -2
  103. package/lib/types/widgets/adw-password-entry-row.d.ts +33 -3
  104. package/lib/types/widgets/adw-preferences-dialog.d.ts +18 -0
  105. package/lib/types/widgets/adw-preferences-group.d.ts +56 -8
  106. package/lib/types/widgets/adw-preferences-page.d.ts +32 -1
  107. package/lib/types/widgets/adw-sidebar.d.ts +49 -7
  108. package/lib/types/widgets/adw-spinner.d.ts +8 -3
  109. package/lib/types/widgets/adw-split-button.d.ts +48 -13
  110. package/lib/types/widgets/adw-status-page.d.ts +5 -10
  111. package/lib/types/widgets/adw-switch-row.d.ts +21 -1
  112. package/lib/types/widgets/adw-tab-view.d.ts +129 -15
  113. package/lib/types/widgets/adw-toolbar-view.d.ts +39 -0
  114. package/lib/types/widgets/adw-view-stack.d.ts +30 -27
  115. package/lib/types/widgets/adw-view-switcher-bar.d.ts +22 -10
  116. package/lib/types/widgets/adw-window-title.d.ts +12 -8
  117. package/lib/types/widgets/adw-wrap-box.d.ts +21 -4
  118. package/lib/types/widgets/avatar-color.d.ts +14 -0
  119. package/lib/types/widgets/bottom-sheet-state.d.ts +73 -0
  120. package/lib/types/widgets/button-content.d.ts +43 -0
  121. package/lib/types/widgets/carousel-state.d.ts +85 -0
  122. package/lib/types/widgets/chrome.d.ts +159 -0
  123. package/lib/types/widgets/data-grid-model.d.ts +104 -0
  124. package/lib/types/widgets/entry-row-view.d.ts +88 -0
  125. package/lib/types/widgets/icon-path.d.ts +20 -0
  126. package/lib/types/widgets/icons.ios.d.ts +13 -0
  127. package/lib/types/widgets/index.d.ts +20 -5
  128. package/lib/types/widgets/navigation-stack.d.ts +153 -0
  129. package/lib/types/widgets/preferences-group-state.d.ts +52 -0
  130. package/lib/types/widgets/preferences-search.d.ts +68 -0
  131. package/lib/types/widgets/row-state.d.ts +71 -0
  132. package/lib/types/widgets/sidebar-model.d.ts +18 -0
  133. package/lib/types/widgets/split-button.d.ts +55 -0
  134. package/lib/types/widgets/split-view-base.d.ts +55 -12
  135. package/lib/types/widgets/split-view-state.d.ts +196 -0
  136. package/lib/types/widgets/split-view-width.d.ts +76 -0
  137. package/lib/types/widgets/status-page-content.d.ts +23 -0
  138. package/lib/types/widgets/svg-path.d.ts +28 -0
  139. package/lib/types/widgets/tab-view-state.d.ts +74 -0
  140. package/lib/types/widgets/view-stack-state.d.ts +35 -0
  141. package/lib/types/widgets/view-switcher-base.d.ts +61 -32
  142. package/lib/types/widgets/view-switcher-model.d.ts +114 -0
  143. package/lib/types/widgets/wrap-box-layout.d.ts +43 -0
  144. package/lib/types/wrap-box.spec.d.ts +2 -0
  145. package/package.json +7 -7
  146. package/src/theme/adwaita.css +393 -8
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{ADW_BANNER_BUTTON_STYLE_CLASSES as e,ADW_BANNER_DEFAULTS as t,ADW_CLAMP_DEFAULTS as n,ADW_CLAMP_SIZE_CLASSES as r,ADW_SPINNER_MIN_SIZE as i,ADW_TOOLBAR_BAR_CLASSES as a,ADW_TOOLBAR_VIEW_CLASSES as o,ADW_TOOLBAR_VIEW_DEFAULTS as s,bannerButtonStyleClasses as c,clampAllocate as l,normalizeClampSize as u,resolveSpinnerSize as d,spinnerGeometry as f,stripMarkup as p,toolbarViewClasses as m}from"@gjsify/adwaita-core";const h=n.maximumSize,g=n.tighteningThreshold;function defaultClampProps(){return{maximumSize:h,tighteningThreshold:g}}function normalizeClampProp(e,t){return u(e,t)}function clampAllocationFor(e,t){if(!(e>0))return{width:`auto`,sizeClass:null};let{childSize:n,sizeClass:r}=l(e,{maximumSize:t.maximumSize,tighteningThreshold:t.tighteningThreshold,childMin:0,childNat:0});return{width:n,sizeClass:r}}const _=i;function spinnerDiameter(e){let t=d(e);return f(t,t).diameter}function defaultToolbarViewProps(){return{topBarStyle:s.topBarStyle,bottomBarStyle:s.bottomBarStyle,extendContentToTopEdge:s.extendContentToTopEdge,extendContentToBottomEdge:s.extendContentToBottomEdge}}function replaceClasses(e,t,n){let r=e.split(/\s+/).filter(e=>e.length>0&&!t.includes(e));for(let e of n)r.includes(e)||r.push(e);return r.join(` `)}function clampChildClassName(e,t){return replaceClasses(e,r,t?[t]:[])}function defaultBannerProps(){return{...t}}function bannerTitleText(e,t){return t?p(e)??e:e}function bannerVisibility(e){return e?`visible`:`collapse`}function bannerButtonClassName(t,n){return replaceClasses(t,e,c(n))}function toolbarViewClassNames(e,t,n){let r=m({...t,...n});return{view:replaceClasses(e.view,o,r.view),topBar:replaceClasses(e.topBar,a,r.topBar),bottomBar:replaceClasses(e.bottomBar,a,r.bottomBar)}}export{e as ADW_BANNER_BUTTON_STYLE_CLASSES,t as ADW_BANNER_DEFAULTS,r as ADW_CLAMP_SIZE_CLASSES,i as ADW_SPINNER_MIN_SIZE,a as ADW_TOOLBAR_BAR_CLASSES,o as ADW_TOOLBAR_VIEW_CLASSES,s as ADW_TOOLBAR_VIEW_DEFAULTS,h as DEFAULT_CLAMP_MAX_SIZE,g as DEFAULT_CLAMP_TIGHTENING_THRESHOLD,_ as DEFAULT_SPINNER_SIZE,bannerButtonClassName,bannerTitleText,bannerVisibility,clampAllocationFor,clampChildClassName,defaultBannerProps,defaultClampProps,defaultToolbarViewProps,normalizeClampProp,replaceClasses,spinnerDiameter,toolbarViewClassNames};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{DATA_GRID_CELL_CLASS as e,DATA_GRID_ROW_CLASS as t}from"@gjsify/adwaita-core";const n=`${t} header`,r=`${e} align-start section-cell`,i=`header-cell`;function parseDataGridWidth(e){let t=/^\s*(\d+(?:\.\d+)?)(?:px)?\s*$/.exec(e);if(t===null)return null;let n=Number(t[1]);return Number.isFinite(n)?n:null}function dataGridItemSpec(e){switch(e.kind){case`slack`:return{value:1,type:`star`};case`flex`:return Number.isFinite(e.weight)&&e.weight>0?{value:e.weight,type:`star`}:{value:0,type:`pixel`};case`fixed`:{let t=parseDataGridWidth(e.css);return t===null?{value:1,type:`auto`}:{value:t,type:`pixel`}}case`auto`:return{value:1,type:`auto`}}}function dataGridTracksKey(e){return e.map(e=>{switch(e.kind){case`fixed`:return`fixed:${e.css}`;case`flex`:return`flex:${e.weight}`;case`slack`:return`slack`;case`auto`:return`auto`}}).join(`|`)}function dataGridShapeKey(e,t){return`${e}x${t}`}function dataGridRowClass(e,n){let r=[t,`variant-${e}`];return n&&r.push(`interactive`),r.join(` `)}function dataGridCellClass(e,t){return(t===`normal`?[...e]:[...e,`variant-${t}`]).join(` `)}export{i as DATA_GRID_HEADER_CELL_CLASS,n as DATA_GRID_HEADER_ROW_CLASS,r as DATA_GRID_SECTION_CELL_CLASS,dataGridCellClass,dataGridItemSpec,dataGridRowClass,dataGridShapeKey,dataGridTracksKey,parseDataGridWidth};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{viewConcealSymbolic as e,viewRevealSymbolic as t}from"@gjsify/adwaita-icons/actions";const n=`adw-row adw-action-row adw-entry-row`,r=`${n} adw-password-entry-row`,i=`adw-icon adw-entry-edit`,a=`adw-insensitive`,o=.4;function nsVisibility(e){return e?`visible`:`collapse`}function entryRowClassName(e,t){let n=e;return t.editing&&(n+=` focused`),t.empty&&(n+=` empty`),n}function applyEntryRowState(e,t,n){e.row.className=entryRowClassName(n,t),e.field.text!==t.text&&(e.field.text=t.text),e.field.editable=t.editable,e.emptyTitle.visibility=nsVisibility(t.emptyTarget===0),e.title.visibility=nsVisibility(t.emptyTarget===1),e.editIcon.visibility=nsVisibility(t.editIconVisible),e.editIcon.className=t.editIconSensitive?i:`${i} ${a}`,e.editIcon.opacity=t.editIconSensitive?1:o,e.indicator.visibility=nsVisibility(t.indicatorVisible),e.applyButton.visibility=nsVisibility(t.applyButtonVisible)}function peekIconSvg(n){return n===`view-conceal-symbolic`?e:t}function applyPasswordEntryRowState(e,t){e.field.secure=!t.revealed,e.peekButton.icon=peekIconSvg(t.peekIconName)}export{i as NS_EDIT_ICON_CLASS,n as NS_ENTRY_ROW_CLASS,a as NS_INSENSITIVE_CLASS,o as NS_INSENSITIVE_OPACITY,r as NS_PASSWORD_ENTRY_ROW_CLASS,applyEntryRowState,applyPasswordEntryRowState,entryRowClassName,nsVisibility,peekIconSvg};
@@ -1,2 +1,2 @@
1
- import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16;function extractIconPaths(e){let t=[],n=/<path\b[^>]*>/g,r;for(;(r=n.exec(e))!==null;){let e=/\bd="([^"]*)"/.exec(r[0])?.[1]?.trim();if(!e)continue;let n=/\bfill-opacity="([^"]*)"/.exec(r[0])?.[1],i=n===void 0?1:Number.parseFloat(n);t.push({d:normalizeArcFlags(e),opacity:Number.isFinite(i)?Math.min(1,Math.max(0,i)):1})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
2
- `||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,extractIconPaths,extractPathData,normalizeArcFlags};
1
+ import"../_virtual/_rolldown/runtime.js";import{DEFAULT_ICON_COLOR as e,DEFAULT_ICON_COLOR_DARK as t}from"@gjsify/adwaita-core";const n=16;function extractIconPaths(e){let t=[],n=/<path\b[^>]*>/g,r;for(;(r=n.exec(e))!==null;){let e=/\bd="([^"]*)"/.exec(r[0])?.[1]?.trim();if(!e)continue;let n=/\bfill-opacity="([^"]*)"/.exec(r[0])?.[1],i=n===void 0?1:Number.parseFloat(n);t.push({d:normalizeArcFlags(e),opacity:Number.isFinite(i)?Math.min(1,Math.max(0,i)):1})}return t}function extractPathData(e){return extractIconPaths(e).map(e=>e.d).join(` `)}function parseHexColor(e){let t={red:0,green:0,blue:0,alpha:1},n=e.trim().replace(/^#/,``);if(!/^[0-9a-fA-F]+$/.test(n))return t;let r=255,i,a,o;if(n.length===3)i=Number.parseInt(n[0]+n[0],16),a=Number.parseInt(n[1]+n[1],16),o=Number.parseInt(n[2]+n[2],16);else if(n.length===6)i=Number.parseInt(n.slice(0,2),16),a=Number.parseInt(n.slice(2,4),16),o=Number.parseInt(n.slice(4,6),16);else if(n.length===8)r=Number.parseInt(n.slice(0,2),16),i=Number.parseInt(n.slice(2,4),16),a=Number.parseInt(n.slice(4,6),16),o=Number.parseInt(n.slice(6,8),16);else return t;return{red:i/255,green:a/255,blue:o/255,alpha:r/255}}function normalizeArcFlags(e){if(e.indexOf(`a`)===-1&&e.indexOf(`A`)===-1)return e;let t=e.length,isWs=e=>e===` `||e===`,`||e===` `||e===`
2
+ `||e===`\r`,isNumStart=e=>e>=`0`&&e<=`9`||e===`.`||e===`+`||e===`-`,n=0,r=``,skipWs=()=>{for(;n<t&&isWs(e[n]);)n++},readNumber=()=>{let r=n;for((e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`.`)for(n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;if(e[n]===`e`||e[n]===`E`)for(n++,(e[n]===`+`||e[n]===`-`)&&n++;n<t&&e[n]>=`0`&&e[n]<=`9`;)n++;return e.slice(r,n)};for(;n<t;){let i=e[n];if(i===`a`||i===`A`)for(r+=i,n++;skipWs(),!(n>=t||!isNumStart(e[n]));)r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+e[n++],skipWs(),r+=` `+e[n++],skipWs(),r+=` `+readNumber(),skipWs(),r+=` `+readNumber();else r+=i,n++}return r}export{n as ADWAITA_ICON_GRID,e as DEFAULT_ICON_COLOR,t as DEFAULT_ICON_COLOR_DARK,extractIconPaths,extractPathData,normalizeArcFlags,parseHexColor};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{ADWAITA_ICON_GRID as e,DEFAULT_ICON_COLOR as t,DEFAULT_ICON_COLOR_DARK as n,extractIconPaths as r,extractPathData as i,parseHexColor as a}from"./icon-path.js";import{parseSvgPath as o}from"./svg-path.js";import{ImageSource as s,Screen as c}from"@nativescript/core";function renderSymbolicIcon(e,n){if(!UIBezierPath||!UIColor||!CGPointMake||!CGSizeMake||!CGAffineTransformMakeScale||!UIGraphicsBeginImageContextWithOptions||!UIGraphicsGetImageFromCurrentImageContext||!UIGraphicsEndImageContext)return null;let i=r(e);if(i.length===0)return null;let l=n?.size??16,u=c.mainScreen?.scale||1,d=l/16,{red:f,green:p,blue:m,alpha:h}=a(n?.color??t);UIGraphicsBeginImageContextWithOptions(CGSizeMake(l,l),!1,u);let g=!1;try{for(let{d:e,opacity:t}of i){let n=o(e);if(n.length===0)continue;let r=UIBezierPath.bezierPath();for(let e of n)switch(e.type){case`M`:r.moveToPoint(CGPointMake(e.x,e.y));break;case`L`:r.addLineToPoint(CGPointMake(e.x,e.y));break;case`C`:r.addCurveToPointControlPoint1ControlPoint2(CGPointMake(e.x,e.y),CGPointMake(e.x1,e.y1),CGPointMake(e.x2,e.y2));break;case`Z`:r.closePath();break}r.applyTransform(CGAffineTransformMakeScale(d,d)),UIColor.colorWithRedGreenBlueAlpha(f,p,m,h*t).setFill(),r.fill(),g=!0}if(!g)return null;let e=UIGraphicsGetImageFromCurrentImageContext();return e?new s(e):null}finally{UIGraphicsEndImageContext()}}export{e as ADWAITA_ICON_GRID,t as DEFAULT_ICON_COLOR,n as DEFAULT_ICON_COLOR_DARK,r as extractIconPaths,i as extractPathData,renderSymbolicIcon};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{AdwEntryRow as a,NOTIFY_TEXT as o}from"./adw-entry-row.js";import{adwaitaColorScheme as s,isThemeIconColor as ee,onAdwaitaColorSchemeChanged as te,setAdwaitaColorScheme as ne,themeIconColor as re,toggleAdwaitaColorScheme as ie}from"./color-scheme.js";import{ADWAITA_ICON_GRID as ae,DEFAULT_ICON_COLOR as oe,DEFAULT_ICON_COLOR_DARK as se,extractIconPaths as c,extractPathData as l}from"./icon-path.js";import{renderSymbolicIcon as u}from"./icons.js";import{attachRowPressFeedback as d}from"./row-press.js";import{AdwImageButton as f,DEFAULT_ICON_BUTTON_ICON_SIZE as p}from"./adw-image-button.js";import{AdwPasswordEntryRow as m}from"./adw-password-entry-row.js";import{AdwIcon as h,DEFAULT_ADW_ICON_SIZE as ce}from"./adw-icon.js";import{AdwComboRow as g,ComboState as le,NOTIFY_SELECTED as ue}from"./adw-combo-row.js";import{AdwSpinRow as _,NOTIFY_VALUE as de,SpinState as fe}from"./adw-spin-row.js";import{AdwSliderRow as v,NOTIFY_SLIDER_VALUE as pe}from"./adw-slider-row.js";import{AdwExpanderRow as y,ExpanderState as me,NOTIFY_EXPANDED as he}from"./adw-expander-row.js";import{AdwButton as b}from"./adw-button.js";import{AdwMenuButton as x,MENU_ITEM_ACTIVATED as ge}from"./adw-menu-button.js";import{AdwBanner as S,BUTTON_CLICKED as _e}from"./adw-banner.js";import{AdwAvatar as C,DEFAULT_AVATAR_SIZE as ve,avatarInitials as ye}from"./adw-avatar.js";import{AdwWindowTitle as w}from"./adw-window-title.js";import{AdwClamp as T,DEFAULT_CLAMP_MAX_SIZE as E}from"./adw-clamp.js";import{AdwHeaderBar as D}from"./adw-header-bar.js";import{AdwToolbarView as O}from"./adw-toolbar-view.js";import{AdwWrapBox as k}from"./adw-wrap-box.js";import{AdwSpinner as A,DEFAULT_SPINNER_SIZE as j}from"./adw-spinner.js";import{AdwStatusPage as M}from"./adw-status-page.js";import{ACTIVATED as N,AdwButtonRow as P}from"./adw-button-row.js";import{AdwButtonContent as F}from"./adw-button-content.js";import{AdwSplitButton as I,CLICKED as be,MENU_TAPPED as xe}from"./adw-split-button.js";import{AdwToggleGroup as L,NOTIFY_SELECTED as Se,ToggleGroupState as Ce}from"./adw-toggle-group.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as we}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Te,NOTIFY_SELECTED as Ee}from"./view-switcher-base.js";import{AdwViewSwitcher as z}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as B}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as V}from"./adw-inline-view-switcher.js";import{AdwTabView as H}from"./adw-tab-view.js";import{AdwCarousel as U,DEFAULT_CAROUSEL_PAGE_WIDTH as De,NOTIFY_POSITION as Oe}from"./adw-carousel.js";import{AdwNavigationView as W,NOTIFY_VISIBLE_PAGE as ke}from"./adw-navigation-view.js";import{AdwSplitViewBase as Ae,DEFAULT_SIDEBAR_WIDTH as je,NOTIFY_SHOW_SIDEBAR as Me}from"./split-view-base.js";import{AdwNavigationSplitView as G}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as K}from"./adw-overlay-split-view.js";import{AdwSidebar as q,NOTIFY_SELECTED as Ne}from"./adw-sidebar.js";import{AdwBottomSheet as J,NOTIFY_OPEN as Pe}from"./adw-bottom-sheet.js";import{AdwToast as Fe,AdwToastOverlay as Y,AdwToastQueue as Ie,DEFAULT_TOAST_TIMEOUT as Le,TOAST_BUTTON_CLICKED as X}from"./adw-toast-overlay.js";import{AdwAlertDialog as Re,AdwAlertResponses as ze,NOTIFY_RESPONSE as Be}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Ve}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as He}from"./adw-preferences-dialog.js";import{AdwBreakpoint as Ue,addBreakpoints as We,evaluateBreakpointCondition as Ge,parseBreakpointCondition as Ke}from"./breakpoint.js";const qe={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:a,AdwPasswordEntryRow:m,AdwComboRow:g,AdwSpinRow:_,AdwSliderRow:v,AdwExpanderRow:y,AdwButton:b,AdwImageButton:f,AdwMenuButton:x,AdwIcon:h,AdwBanner:S,AdwAvatar:C,AdwWindowTitle:w,AdwClamp:T,AdwHeaderBar:D,AdwToolbarView:O,AdwWrapBox:k,AdwSpinner:A,AdwStatusPage:M,AdwButtonRow:P,AdwButtonContent:F,AdwSplitButton:I,AdwToggleGroup:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,AdwTabView:H,AdwCarousel:U,AdwNavigationView:W,AdwNavigationSplitView:G,AdwOverlaySplitView:K,AdwSidebar:q,AdwBottomSheet:J,AdwToastOverlay:Y,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(qe))registerElement(e,()=>t);$=!0}}export{Ve as ABOUT_CLOSED,N as ACTIVATED,ae as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Re as AdwAlertDialog,ze as AdwAlertResponses,C as AdwAvatar,S as AdwBanner,J as AdwBottomSheet,Ue as AdwBreakpoint,b as AdwButton,F as AdwButtonContent,P as AdwButtonRow,U as AdwCarousel,T as AdwClamp,g as AdwComboRow,a as AdwEntryRow,y as AdwExpanderRow,D as AdwHeaderBar,h as AdwIcon,f as AdwImageButton,V as AdwInlineViewSwitcher,x as AdwMenuButton,G as AdwNavigationSplitView,W as AdwNavigationView,K as AdwOverlaySplitView,m as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,q as AdwSidebar,v as AdwSliderRow,_ as AdwSpinRow,A as AdwSpinner,I as AdwSplitButton,Ae as AdwSplitViewBase,M as AdwStatusPage,r as AdwSwitchRow,H as AdwTabView,Fe as AdwToast,Y as AdwToastOverlay,Ie as AdwToastQueue,L as AdwToggleGroup,O as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Te as AdwViewSwitcherBase,w as AdwWindowTitle,k as AdwWrapBox,_e as BUTTON_CLICKED,be as CLICKED,le as ComboState,ce as DEFAULT_ADW_ICON_SIZE,ve as DEFAULT_AVATAR_SIZE,De as DEFAULT_CAROUSEL_PAGE_WIDTH,E as DEFAULT_CLAMP_MAX_SIZE,p as DEFAULT_ICON_BUTTON_ICON_SIZE,oe as DEFAULT_ICON_COLOR,se as DEFAULT_ICON_COLOR_DARK,je as DEFAULT_SIDEBAR_WIDTH,j as DEFAULT_SPINNER_SIZE,Le as DEFAULT_TOAST_TIMEOUT,me as ExpanderState,ge as MENU_ITEM_ACTIVATED,xe as MENU_TAPPED,i as NOTIFY_ACTIVE,he as NOTIFY_EXPANDED,Pe as NOTIFY_OPEN,Oe as NOTIFY_POSITION,Be as NOTIFY_RESPONSE,ue as NOTIFY_SELECTED,Me as NOTIFY_SHOW_SIDEBAR,Ne as NOTIFY_SIDEBAR_SELECTED,pe as NOTIFY_SLIDER_VALUE,o as NOTIFY_TEXT,Se as NOTIFY_TOGGLE_SELECTED,de as NOTIFY_VALUE,Ee as NOTIFY_VIEW_SELECTED,we as NOTIFY_VISIBLE_CHILD,ke as NOTIFY_VISIBLE_PAGE,He as PREFERENCES_CLOSED,fe as SpinState,X as TOAST_BUTTON_CLICKED,Ce as ToggleGroupState,We as addBreakpoints,s as adwaitaColorScheme,d as attachRowPressFeedback,ye as avatarInitials,Ge as evaluateBreakpointCondition,c as extractIconPaths,l as extractPathData,ee as isThemeIconColor,te as onAdwaitaColorSchemeChanged,Ke as parseBreakpointCondition,registerAdwaitaElements,u as renderSymbolicIcon,ne as setAdwaitaColorScheme,re as themeIconColor,ie as toggleAdwaitaColorScheme};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwPreferencesPage as e}from"./adw-preferences-page.js";import{AdwPreferencesGroup as t}from"./adw-preferences-group.js";import{ACTIVATED as ee,AdwActionRow as n}from"./adw-action-row.js";import{AdwSwitchRow as r,NOTIFY_ACTIVE as i}from"./adw-switch-row.js";import{adwaitaColorScheme as a,isThemeIconColor as te,onAdwaitaColorSchemeChanged as ne,setAdwaitaColorScheme as re,themeIconColor as ie,toggleAdwaitaColorScheme as ae}from"./color-scheme.js";import{ADWAITA_ICON_GRID as oe,DEFAULT_ICON_COLOR as se,DEFAULT_ICON_COLOR_DARK as ce,extractIconPaths as le,extractPathData as ue}from"./icon-path.js";import{renderSymbolicIcon as o}from"./icons.js";import{AdwIcon as s,DEFAULT_ADW_ICON_SIZE as c}from"./adw-icon.js";import{attachRowPressFeedback as l}from"./row-press.js";import{AdwImageButton as u,DEFAULT_ICON_BUTTON_ICON_SIZE as de}from"./adw-image-button.js";import{AdwEntryRow as d,NOTIFY_TEXT as fe}from"./adw-entry-row.js";import{AdwPasswordEntryRow as f}from"./adw-password-entry-row.js";import{ACTIVATE as pe,AdwEntry as p,NOTIFY_TEXT as me}from"./adw-entry.js";import{AdwComboRow as m,ComboState as he,NOTIFY_SELECTED as ge}from"./adw-combo-row.js";import{AdwDropDown as h,NOTIFY_SELECTED as _e}from"./adw-drop-down.js";import{AdwSpinRow as g,NOTIFY_VALUE as ve,SpinState as ye}from"./adw-spin-row.js";import{AdwSliderRow as _,NOTIFY_SLIDER_VALUE as be}from"./adw-slider-row.js";import{AdwExpanderRow as v,ExpanderState as xe,NOTIFY_EXPANDED as Se}from"./adw-expander-row.js";import{AdwButton as y}from"./adw-button.js";import{AdwMenuButton as b,MENU_ITEM_ACTIVATED as Ce}from"./adw-menu-button.js";import{DEFAULT_CLAMP_MAX_SIZE as we,DEFAULT_SPINNER_SIZE as Te}from"./chrome.js";import{AdwBanner as x,BUTTON_CLICKED as S}from"./adw-banner.js";import{avatarInitials as C}from"./avatar-color.js";import{AdwAvatar as w,DEFAULT_AVATAR_SIZE as T}from"./adw-avatar.js";import{AdwWindowTitle as E}from"./adw-window-title.js";import{AdwClamp as D}from"./adw-clamp.js";import{AdwHeaderBar as O}from"./adw-header-bar.js";import{AdwToolbarView as k}from"./adw-toolbar-view.js";import{AdwWrapBox as A}from"./adw-wrap-box.js";import{DATA_GRID_HEADER_CELL_CLASS as Ee,DATA_GRID_HEADER_ROW_CLASS as De,DATA_GRID_SECTION_CELL_CLASS as Oe,dataGridCellClass as ke,dataGridItemSpec as Ae,dataGridRowClass as je,dataGridShapeKey as Me,dataGridTracksKey as Ne,parseDataGridWidth as Pe}from"./data-grid-model.js";import{AdwDataGrid as j,ROW_ACTIVATED as Fe}from"./adw-data-grid.js";import{AdwSpinner as M}from"./adw-spinner.js";import{AdwStatusPage as N}from"./adw-status-page.js";import{AdwButtonRow as P}from"./adw-button-row.js";import{AdwButtonContent as F}from"./adw-button-content.js";import{AdwSplitButton as I,CLICKED as Ie,MENU_TAPPED as Le}from"./adw-split-button.js";import{AdwToggleGroup as L,NOTIFY_SELECTED as Re,ToggleGroupState as ze}from"./adw-toggle-group.js";import{AdwViewStack as R,NOTIFY_VISIBLE_CHILD as Be}from"./adw-view-stack.js";import{AdwViewSwitcherBase as Ve,NOTIFY_SELECTED as He}from"./view-switcher-base.js";import{AdwViewSwitcher as z}from"./adw-view-switcher.js";import{AdwViewSwitcherBar as B}from"./adw-view-switcher-bar.js";import{AdwInlineViewSwitcher as V}from"./adw-inline-view-switcher.js";import{applyTabViewVisibility as H,createTabViewState as Ue,tabBarVisibility as We,tabCloseVisibilities as Ge,tabLabelText as Ke,tabPageVisibilities as qe,tabTooltipText as Je,tabViewNotifyPayload as Ye}from"./tab-view-state.js";import{AdwTabView as U,CLOSE_PAGE as Xe,NOTIFY_SELECTED_PAGE as Ze,PAGES_CHANGED as Qe}from"./adw-tab-view.js";import{CarouselScrollSync as $e,DEFAULT_CAROUSEL_PAGE_WIDTH as et,applyCarouselDots as tt,carouselDotClasses as nt,carouselNotifyPayload as rt,carouselPositionAtOffset as it,carouselScrollOffset as at,createCarouselState as ot,normalizeCarouselPageWidth as st}from"./carousel-state.js";import{AdwCarousel as W,NOTIFY_N_PAGES as ct,NOTIFY_POSITION as lt,PAGE_CHANGED as ut}from"./adw-carousel.js";import{NOTIFY_VISIBLE_PAGE as dt}from"./navigation-stack.js";import{AdwNavigationView as G}from"./adw-navigation-view.js";import{AdwSplitViewBase as ft,NOTIFY_SHOW_SIDEBAR as pt}from"./split-view-base.js";import{NsNavigationSplitViewState as mt,NsOverlaySplitViewState as ht,splitViewColumns as gt}from"./split-view-state.js";import{AdwNavigationSplitView as K}from"./adw-navigation-split-view.js";import{AdwOverlaySplitView as q}from"./adw-overlay-split-view.js";import{AdwSidebar as J,NOTIFY_SELECTED as _t}from"./adw-sidebar.js";import{CLOSE_ATTEMPT as vt,NOTIFY_OPEN as yt,SHEET_CLOSE as bt}from"./bottom-sheet-state.js";import{AdwBottomSheet as Y}from"./adw-bottom-sheet.js";import{AdwToast as xt,AdwToastOverlay as X,AdwToastQueue as St,DEFAULT_TOAST_TIMEOUT as Ct,TOAST_BUTTON_CLICKED as wt}from"./adw-toast-overlay.js";import{AdwAlertDialog as Tt,AdwAlertResponses as Et,NOTIFY_RESPONSE as Dt}from"./adw-alert-dialog.js";import{AdwAboutDialog as Z,CLOSED as Ot}from"./adw-about-dialog.js";import{AdwPreferencesDialog as Q,CLOSED as kt}from"./adw-preferences-dialog.js";import{AdwBreakpoint as At,addBreakpoints as jt,evaluateBreakpointCondition as Mt,parseBreakpointCondition as Nt}from"./breakpoint.js";const Pt={AdwPreferencesPage:e,AdwPreferencesGroup:t,AdwActionRow:n,AdwSwitchRow:r,AdwEntryRow:d,AdwPasswordEntryRow:f,AdwEntry:p,AdwComboRow:m,AdwDropDown:h,AdwSpinRow:g,AdwSliderRow:_,AdwExpanderRow:v,AdwButton:y,AdwImageButton:u,AdwMenuButton:b,AdwIcon:s,AdwBanner:x,AdwAvatar:w,AdwWindowTitle:E,AdwClamp:D,AdwHeaderBar:O,AdwToolbarView:k,AdwWrapBox:A,AdwDataGrid:j,AdwSpinner:M,AdwStatusPage:N,AdwButtonRow:P,AdwButtonContent:F,AdwSplitButton:I,AdwToggleGroup:L,AdwViewStack:R,AdwViewSwitcher:z,AdwViewSwitcherBar:B,AdwInlineViewSwitcher:V,AdwTabView:U,AdwCarousel:W,AdwNavigationView:G,AdwNavigationSplitView:K,AdwOverlaySplitView:q,AdwSidebar:J,AdwBottomSheet:Y,AdwToastOverlay:X,AdwAboutDialog:Z,AdwPreferencesDialog:Q};let $=!1;function registerAdwaitaElements(){if(!$&&typeof registerElement==`function`){for(let[e,t]of Object.entries(Pt))registerElement(e,()=>t);$=!0}}export{Ot as ABOUT_CLOSED,ee as ACTIVATED,oe as ADWAITA_ICON_GRID,Z as AdwAboutDialog,n as AdwActionRow,Tt as AdwAlertDialog,Et as AdwAlertResponses,w as AdwAvatar,x as AdwBanner,Y as AdwBottomSheet,At as AdwBreakpoint,y as AdwButton,F as AdwButtonContent,P as AdwButtonRow,W as AdwCarousel,D as AdwClamp,m as AdwComboRow,j as AdwDataGrid,h as AdwDropDown,p as AdwEntry,d as AdwEntryRow,v as AdwExpanderRow,O as AdwHeaderBar,s as AdwIcon,u as AdwImageButton,V as AdwInlineViewSwitcher,b as AdwMenuButton,K as AdwNavigationSplitView,G as AdwNavigationView,q as AdwOverlaySplitView,f as AdwPasswordEntryRow,Q as AdwPreferencesDialog,t as AdwPreferencesGroup,e as AdwPreferencesPage,J as AdwSidebar,_ as AdwSliderRow,g as AdwSpinRow,M as AdwSpinner,I as AdwSplitButton,ft as AdwSplitViewBase,N as AdwStatusPage,r as AdwSwitchRow,U as AdwTabView,xt as AdwToast,X as AdwToastOverlay,St as AdwToastQueue,L as AdwToggleGroup,k as AdwToolbarView,R as AdwViewStack,z as AdwViewSwitcher,B as AdwViewSwitcherBar,Ve as AdwViewSwitcherBase,E as AdwWindowTitle,A as AdwWrapBox,S as BUTTON_CLICKED,Ie as CLICKED,vt as CLOSE_ATTEMPT,Xe as CLOSE_PAGE,$e as CarouselScrollSync,he as ComboState,Ee as DATA_GRID_HEADER_CELL_CLASS,De as DATA_GRID_HEADER_ROW_CLASS,Oe as DATA_GRID_SECTION_CELL_CLASS,c as DEFAULT_ADW_ICON_SIZE,T as DEFAULT_AVATAR_SIZE,et as DEFAULT_CAROUSEL_PAGE_WIDTH,we as DEFAULT_CLAMP_MAX_SIZE,de as DEFAULT_ICON_BUTTON_ICON_SIZE,se as DEFAULT_ICON_COLOR,ce as DEFAULT_ICON_COLOR_DARK,Te as DEFAULT_SPINNER_SIZE,Ct as DEFAULT_TOAST_TIMEOUT,pe as ENTRY_ACTIVATE,xe as ExpanderState,Ce as MENU_ITEM_ACTIVATED,Le as MENU_TAPPED,i as NOTIFY_ACTIVE,_e as NOTIFY_DROP_DOWN_SELECTED,me as NOTIFY_ENTRY_TEXT,Se as NOTIFY_EXPANDED,ct as NOTIFY_N_PAGES,yt as NOTIFY_OPEN,lt as NOTIFY_POSITION,Dt as NOTIFY_RESPONSE,ge as NOTIFY_SELECTED,Ze as NOTIFY_SELECTED_PAGE,pt as NOTIFY_SHOW_SIDEBAR,_t as NOTIFY_SIDEBAR_SELECTED,be as NOTIFY_SLIDER_VALUE,fe as NOTIFY_TEXT,Re as NOTIFY_TOGGLE_SELECTED,ve as NOTIFY_VALUE,He as NOTIFY_VIEW_SELECTED,Be as NOTIFY_VISIBLE_CHILD,dt as NOTIFY_VISIBLE_PAGE,mt as NsNavigationSplitViewState,ht as NsOverlaySplitViewState,Qe as PAGES_CHANGED,ut as PAGE_CHANGED,kt as PREFERENCES_CLOSED,Fe as ROW_ACTIVATED,bt as SHEET_CLOSE,ye as SpinState,wt as TOAST_BUTTON_CLICKED,ze as ToggleGroupState,jt as addBreakpoints,a as adwaitaColorScheme,tt as applyCarouselDots,H as applyTabViewVisibility,l as attachRowPressFeedback,C as avatarInitials,nt as carouselDotClasses,rt as carouselNotifyPayload,it as carouselPositionAtOffset,at as carouselScrollOffset,ot as createCarouselState,Ue as createTabViewState,ke as dataGridCellClass,Ae as dataGridItemSpec,je as dataGridRowClass,Me as dataGridShapeKey,Ne as dataGridTracksKey,Mt as evaluateBreakpointCondition,le as extractIconPaths,ue as extractPathData,te as isThemeIconColor,st as normalizeCarouselPageWidth,ne as onAdwaitaColorSchemeChanged,Nt as parseBreakpointCondition,Pe as parseDataGridWidth,registerAdwaitaElements,o as renderSymbolicIcon,re as setAdwaitaColorScheme,gt as splitViewColumns,We as tabBarVisibility,Ge as tabCloseVisibilities,Ke as tabLabelText,qe as tabPageVisibilities,Je as tabTooltipText,Ye as tabViewNotifyPayload,ie as themeIconColor,ae as toggleAdwaitaColorScheme};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{NavigationViewState as e}from"@gjsify/adwaita-core";const t=`notify::visible-page`,n=`pushed`,r=`popped`,i=`replaced`,a=`adw-navigation-page`;function navigationPageClassName(e){return`${e??``} ${a}`.trim()}var NsNavigationStack=class{_state;_host;_attached=new Set;_onDiagnostic;_pending=null;constructor(t,n={}){this._host=t,this._onDiagnostic=n.onDiagnostic,this._state=new e({onDiagnostic:n.onDiagnostic}),this._state.subscribe(e=>{this._pending=e})}get visiblePage(){return this._state.visiblePage}get visiblePageTag(){return this._state.visiblePageTag}get depth(){return this._state.depth}get stack(){return this._state.stack}get pages(){return this._state.pages}get animateTransitions(){return this._state.animateTransitions}get popOnEscape(){return this._state.popOnEscape}isRegistered(e){return this._state.isRegistered(e)}tagOf(e){return this._state.tagOf(e)}titleOf(e){return this._state.titleOf(e)}canPopOf(e){return this._state.canPopOf(e)}findPage(e){return this._state.findPage(e)}getPreviousPage(e){return this._state.getPreviousPage(e)}canGoBack(){return this._state.canGoBack()}backButtonTooltip(e){return this._state.backButtonTooltip(e)}add(e,t=null,n={}){let r=this._state.add(e,{...n,tag:t});return this._flush(),r}remove(e){let t=this._state.remove(e);return this._flush(),t}push(e,t={}){if(typeof e==`string`)return this.pushByTag(e);let n=this._state.push(e,t);return this._flush(),n}pushByTag(e){let t=this._state.pushByTag(e);return this._flush(),t}pop(){let e=this._state.pop();return this._flush(),e}popToPage(e){let t=this._state.popToPage(e);return this._flush(),t}popToTag(e){let t=this._state.popToTag(e);return this._flush(),t}replace(e,t){let n=e.map(e=>{if(typeof e!=`string`)return e??null;let t=this._state.findPage(e);return t===null&&this._onDiagnostic?.({code:`tag-not-found`,tag:e}),t});this._state.replace(n,t),this._flush()}replaceWithTags(e){this._state.replaceWithTags(e),this._flush()}setTag(e,t){return this._state.setTag(e,t)}setTitle(e,t){return this._state.setTitle(e,t)}setCanPop(e,t){return this._state.setCanPop(e,t)}setAnimateTransitions(e){return this._state.setAnimateTransitions(e)}setPopOnEscape(e){return this._state.setPopOnEscape(e)}popFromShortcut(){let e=this._state.popFromShortcut();return this._flush(),e}popFromEscape(){let e=this._state.popFromEscape();return this._flush(),e}finishTransition(){let e=this._state.finishTransition();return this._sync(),e}_flush(){let e=this._pending;this._pending=null,this._sync(),e!==null&&this._emit(e),this._state.finishTransition().length>0&&this._sync()}_emit(e){if(e.reason===`add`||e.reason===`push`)this._notify(n,e.visiblePage);else if(e.reason===`pop`)for(let t of e.popped)this._notify(r,t);else this._notify(i,null);e.previousVisiblePage!==e.visiblePage&&this._notify(t,e.visiblePage)}_notify(e,t){this._host.emit({name:e,page:t,tag:t===null?null:this._state.tagOf(t),depth:this._state.depth})}_sync(){for(let e of this._state.pages)this._attached.has(e)||(this._attached.add(e),this._host.attachPage(e));for(let e of[...this._attached])this._state.isRegistered(e)||(this._attached.delete(e),this._host.detachPage(e));let e=this._state.visiblePage;for(let t of this._attached)this._host.setPageVisibility(t,t===e?`visible`:`collapse`)}};export{t as NOTIFY_VISIBLE_PAGE,a as NS_NAVIGATION_PAGE_CLASS,NsNavigationStack,r as POPPED,n as PUSHED,i as REPLACED,navigationPageClassName};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{derivePreferencesGroupHeader as e}from"@gjsify/adwaita-core";const t=`adw-preferences-group-header`,n=`single-line`;function preferencesGroupHeaderState(t){return e({...t,useMarkup:!1})}function preferencesGroupVisuals(e){let r=preferencesGroupHeaderState(e),visibility=e=>e?`visible`:`collapse`;return{titleVisibility:visibility(r.titleVisible),descriptionVisibility:visibility(r.descriptionVisible),headerVisibility:visibility(r.headerVisible),headerClassName:r.singleLine?`${t} ${n}`:t,listboxVisibility:visibility(r.listboxVisible)}}export{t as PREFERENCES_GROUP_HEADER_CLASS,n as PREFERENCES_GROUP_SINGLE_LINE_CLASS,preferencesGroupHeaderState,preferencesGroupVisuals};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{searchPreferences as e}from"@gjsify/adwaita-core";function isNsVisible(e){return e===void 0||e===`visible`}function describeRow(e){return{title:e.title??``,subtitle:e.subtitle??``,visible:isNsVisible(e.visibility),isActionRow:e.isActionRow===!0,useMarkup:!1,useUnderline:!1,ref:e}}function describeGroup(e){return{title:e.title??``,visible:isNsVisible(e.visibility),rows:e.searchRows().map(describeRow),ref:e}}function describeNsPreferencesPages(e){return e.map(e=>({name:e.name??``,title:e.title??``,useUnderline:e.useUnderline===!0,visible:isNsVisible(e.visibility),groups:e.searchGroups().map(describeGroup),ref:e}))}function searchNsPreferences(t,n,r){return e(describeNsPreferencesPages(t),n,r)}export{describeNsPreferencesPages,isNsVisible,searchNsPreferences};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{ActionRowState as e,ButtonRowState as t,SwitchRowState as n,WindowTitleState as r,deriveRowLabels as i}from"@gjsify/adwaita-core";function nsVisibility(e){return e?`visible`:`collapse`}function rowLabelVisuals(e){return toLabelVisuals(i(e))}function toLabelVisuals(e){return{title:e.title,titleVisibility:nsVisibility(e.titleVisible),subtitle:e.subtitle,subtitleVisibility:nsVisibility(e.subtitleVisible)}}function buttonRowIconVisuals(e){return{startIcon:e.startIconName,startIconVisibility:nsVisibility(e.startIconVisible),endIcon:e.endIconName,endIconVisibility:nsVisibility(e.endIconVisible)}}function isViewSensitive(e){return e?e.isUserInteractionEnabled!==!1:!0}export{e as ActionRowState,t as ButtonRowState,n as SwitchRowState,r as WindowTitleState,buttonRowIconVisuals,isViewSensitive,nsVisibility,rowLabelVisuals,toLabelVisuals};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{SidebarState as e}from"@gjsify/adwaita-core";function sidebarSectionsFromLabels(e){return[{items:e.map(e=>({title:e}))}]}function sidebarRowClassName(e,t){return e&&t?`adw-sidebar-row active`:`adw-sidebar-row`}export{e as SidebarState,sidebarRowClassName,sidebarSectionsFromLabels};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{splitButtonArrowIcon as e}from"@gjsify/adwaita-core";import{openMenuSymbolic as t}from"@gjsify/adwaita-icons/actions";import{panDownSymbolic as n,panEndSymbolic as r,panStartSymbolic as i,panUpSymbolic as a}from"@gjsify/adwaita-icons/ui";const o=`Cancel`,s={"open-menu-symbolic":t,"pan-down-symbolic":n,"pan-up-symbolic":a,"pan-start-symbolic":i,"pan-end-symbolic":r};function toMenuEntries(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)typeof n==`string`?t.push({label:n}):typeof n==`object`&&n&&typeof n.label==`string`&&t.push({...n});return t}function menuSheetActions(e,t=o){let n=new Set([t]),r=[];for(let t of e){let e=t.label;for(;n.has(e);)e+=`​`;n.add(e),r.push(e)}return r}function resolveMenuChoice(e,t){return typeof t==`string`?e.indexOf(t):-1}function splitButtonArrowSvg(t){return s[e(t)]}function setActionIcon(e,t){let n=t??``;n.length>0?e.setIconName(n):e.mode===`icon`&&e.setChild(null)}export{s as ARROW_SVGS,o as MENU_CANCEL_LABEL,menuSheetActions,resolveMenuChoice,setActionIcon,splitButtonArrowSvg,toMenuEntries};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{GridLayout as e,ItemSpec as t}from"@nativescript/core";const n=`notify::show-sidebar`,r=240;var AdwSplitViewBase=class extends e{_sidebar=null;_content=null;_collapsed=!1;_showSidebar=!0;_sidebarWidth=240;_sidebarPosition=`start`;constructor(e){super(),this.className=e,this.addRow(new t(1,`star`)),this._syncColumns()}_syncColumns(){this.removeColumns(),this._sidebarPosition===`end`?(this.addColumn(new t(1,`star`)),this.addColumn(new t(1,`auto`))):(this.addColumn(new t(1,`auto`)),this.addColumn(new t(1,`star`)))}_transitionSidebar(){this._applyLayout()}_pending=[];_shouldAnimate(){return typeof(this._sidebar??this._content??this).animate==`function`&&this.isLoaded===!0}_track(e){return this._pending.push(e),e}_cancelPending(){for(let e of this._pending)try{e.cancel()}catch{}this._pending=[]}_isChild(e){for(let t=0;t<this.getChildrenCount();t++)if(this.getChildAt(t)===e)return!0;return!1}setSidebar(e){this._sidebar&&this.removeChild(this._sidebar),this._sidebar=e,e&&(e.className=`${e.className??``} adw-split-view-sidebar`.trim(),e.width=this._sidebarWidth,this.addChild(e)),this._applyLayout()}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-split-view-content`.trim(),this.addChild(e)),this._applyLayout()}showSidebarPane(){this.showSidebar=!0}hideSidebarPane(){this.showSidebar=!1}get collapsed(){return this._collapsed}set collapsed(e){this._collapsed=!!e,this._applyLayout()}get showSidebar(){return this._showSidebar}set showSidebar(e){let t=!!e;if(t===this._showSidebar)return;this._showSidebar=t,this._transitionSidebar();let r={eventName:n,object:this,showSidebar:t,collapsed:this._collapsed};this.notify(r)}get sidebarWidth(){return this._sidebarWidth}set sidebarWidth(e){this._sidebarWidth=Number.isFinite(e)&&e>0?e:240,this._sidebar&&(this._sidebar.width=this._sidebarWidth)}get sidebarPosition(){return this._sidebarPosition}set sidebarPosition(e){this._sidebarPosition=e===`end`?`end`:`start`,this._syncColumns(),this._applyLayout()}get sidebar(){return this._sidebar}get content(){return this._content}};export{AdwSplitViewBase,r as DEFAULT_SIDEBAR_WIDTH,n as NOTIFY_SHOW_SIDEBAR};
1
+ import"../_virtual/_rolldown/runtime.js";import{appliesDerivedSidebarWidth as e,defaultSidebarWidthProps as t,normalizeWidthFraction as n,normalizeWidthProp as r,sidebarWidthFor as i}from"./split-view-width.js";import{GridLayout as a,ItemSpec as o}from"@nativescript/core";const s=`notify::show-sidebar`;var AdwSplitViewBase=class extends a{_widthRule;_state;_sidebar=null;_content=null;_widthProps=t();_measuredWidth=0;_sidebarWidthOverride=null;constructor(e,t,n){super(),this._widthRule=t,this._state=n,this.className=e,this.addRow(new o(1,`star`)),this._state.bind({applyLayout:()=>this._applyLayout(),transitionSidebar:()=>this._transitionSidebar(),notifyShowSidebar:e=>this._emitShowSidebar(e)}),this.addEventListener(`layoutChanged`,()=>this._applySidebarWidth()),this._syncColumns()}_syncColumns(){this.removeColumns(),this._state.sidebarPosition===`end`?(this.addColumn(new o(1,`star`)),this.addColumn(new o(1,`auto`))):(this.addColumn(new o(1,`auto`)),this.addColumn(new o(1,`star`)))}_emitShowSidebar(e){let t={eventName:s,object:this,showSidebar:e.showSidebar,collapsed:e.collapsed};this.notify(t)}_transitionSidebar(){this._applyLayout()}_pending=[];_shouldAnimate(){return typeof(this._sidebar??this._content??this).animate==`function`&&this.isLoaded===!0}_track(e){return this._pending.push(e),e}_cancelPending(){for(let e of this._pending)try{e.cancel()}catch{}this._pending=[]}_isChild(e){for(let t=0;t<this.getChildrenCount();t++)if(this.getChildAt(t)===e)return!0;return!1}setSidebar(e){this._sidebar&&this.removeChild(this._sidebar),this._sidebar=e,e&&(e.className=`${e.className??``} adw-split-view-sidebar`.trim(),e.width=this.sidebarWidth,this.addChild(e)),this._state.setPaneMounted(`sidebar`,e!==null),this._applyLayout()}setContent(e){this._content&&this.removeChild(this._content),this._content=e,e&&(e.className=`${e.className??``} adw-split-view-content`.trim(),this.addChild(e)),this._state.setPaneMounted(`content`,e!==null),this._applyLayout()}showSidebarPane(){this.showSidebar=!0}hideSidebarPane(){this.showSidebar=!1}get collapsed(){return this._state.collapsed}set collapsed(e){this._state.setCollapsed(!!e)}get showSidebar(){return this._state.showSidebar}set showSidebar(e){this._state.setShowSidebar(!!e)}get sidebarWidth(){return this._sidebarWidthOverride??i(this._measuredWidth,this._widthProps,this._widthRule,{collapsed:this._state.collapsed})}set sidebarWidth(e){this._sidebarWidthOverride=Number.isFinite(e)&&e>0?e:null,this._applySidebarWidth()}get minSidebarWidth(){return this._widthProps.minSidebarWidth}set minSidebarWidth(e){this._widthProps.minSidebarWidth=r(e,t().minSidebarWidth),this._applySidebarWidth()}get maxSidebarWidth(){return this._widthProps.maxSidebarWidth}set maxSidebarWidth(e){this._widthProps.maxSidebarWidth=r(e,t().maxSidebarWidth),this._applySidebarWidth()}get sidebarWidthFraction(){return this._widthProps.sidebarWidthFraction}set sidebarWidthFraction(e){this._widthProps.sidebarWidthFraction=n(e),this._applySidebarWidth()}_applySidebarWidth(){let t=this.getActualSize?.();t&&t.width>0&&(this._measuredWidth=t.width),this._sidebar&&e(this._state.collapsed,this._widthRule)&&(this._sidebar.width=this.sidebarWidth)}get sidebarPosition(){return this._state.sidebarPosition}set sidebarPosition(e){this._state.setSidebarPosition(e===`end`?`end`:`start`)&&(this._syncColumns(),this._applyLayout())}get sidebar(){return this._sidebar}get content(){return this._content}};export{AdwSplitViewBase,s as NOTIFY_SHOW_SIDEBAR};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{NavigationSplitViewState as e,OverlaySplitViewState as t}from"@gjsify/adwaita-core";function splitViewColumns(e){return e===`end`?{sidebar:1,content:0}:{sidebar:0,content:1}}var NsOverlaySplitViewState=class{_state;_host=null;_coupling=!1;constructor(e={}){this._state=new t(e),this._state.subscribe(e=>this._apply(e))}bind(e){this._host=e}get collapsed(){return this._state.collapsed}get showSidebar(){return this._state.showSidebar}get pinSidebar(){return this._state.pinSidebar}get sidebarPosition(){return this._state.sidebarPosition}get showProgress(){return this._state.showProgress}get shieldVisible(){return this._state.shieldVisible}get sidebarFocusable(){return this._state.sidebarFocusable}get contentFocusable(){return this._state.contentFocusable}setCollapsed(e){this._coupling=!0;try{return this._state.setCollapsed(e)}finally{this._coupling=!1}}setShowSidebar(e){return this._state.setShowSidebar(e)}setPinSidebar(e){return this._state.setPinSidebar(e)}setSidebarPosition(e){return this._state.setSidebarPosition(e)}setPaneMounted(e,t){return!1}dismissShield(){return this._state.dismissShield()}_apply(e){let t=this._host;if(t!==null){if(e.property===`show-sidebar`){this._coupling||t.transitionSidebar(),t.notifyShowSidebar({showSidebar:e.showSidebar,collapsed:e.collapsed});return}e.property===`collapsed`&&t.applyLayout()}}},NsNavigationSplitViewState=class{_state;_markers={sidebar:{},content:{}};_host=null;_plan;constructor(t={}){this._state=new e(t),this._plan=this._state.stack,this._state.subscribe(e=>this._apply(e))}bind(e){this._host=e}get collapsed(){return this._state.collapsed}get showSidebar(){return!this._state.showContent}get sidebarPosition(){return this._state.sidebarPosition}get stack(){return this._state.stack.stack}get visiblePane(){return this._state.visiblePane}isVisible(e){return this.visiblePane===e}get transition(){return this._plan.transition}setCollapsed(e){return this._state.setCollapsed(e)}setShowSidebar(e){return this._state.setShowContent(!e)}setSidebarPosition(e){return this._state.setSidebarPosition(e)}setPaneMounted(e,t){let n=t?this._markers[e]:null;return e===`sidebar`?this._state.setSidebar(n):this._state.setContent(n)}_apply(e){this._plan=e.plan;let t=this._host;if(t!==null){if(e.property===`show-content`){e.plan.transition===`replace`?t.applyLayout():t.transitionSidebar(),t.notifyShowSidebar({showSidebar:this.showSidebar,collapsed:this.collapsed});return}e.property===`collapsed`&&t.applyLayout()}}};export{NsNavigationSplitViewState,NsOverlaySplitViewState,splitViewColumns};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{DEFAULT_MAX_SIDEBAR_WIDTH as e,DEFAULT_MIN_SIDEBAR_WIDTH as t,DEFAULT_SIDEBAR_WIDTH_FRACTION as n,resolveNavigationSidebarWidth as r,resolveOverlaySidebarWidth as i}from"@gjsify/adwaita-core";function defaultSidebarWidthProps(){return{minSidebarWidth:t,maxSidebarWidth:e,sidebarWidthFraction:n}}function sidebarWidthFor(e,t,n=`overlay`,a={}){if(!(e>0))return Math.max(t.minSidebarWidth,0);let o={totalWidth:e,minSidebarWidth:t.minSidebarWidth,maxSidebarWidth:t.maxSidebarWidth,sidebarWidthFraction:t.sidebarWidthFraction,contentMin:a.contentMin??0,sidebarChildMin:a.sidebarChildMin??0};return n===`navigation`?r(o):i({...o,collapsed:a.collapsed??!1})}function appliesDerivedSidebarWidth(e,t){return!(e&&t===`navigation`)}function normalizeWidthProp(e,t){return Number.isFinite(e)&&e>=0?e:t}function normalizeWidthFraction(e){return Number.isFinite(e)?Math.min(1,Math.max(0,e)):n}export{e as DEFAULT_MAX_SIDEBAR_WIDTH,t as DEFAULT_MIN_SIDEBAR_WIDTH,n as DEFAULT_SIDEBAR_WIDTH_FRACTION,appliesDerivedSidebarWidth,defaultSidebarWidthProps,normalizeWidthFraction,normalizeWidthProp,sidebarWidthFor};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";function statusPageLabelVisibility(e){return e?`visible`:`collapse`}function statusPageIconVisibility(e){return e?`visible`:`collapse`}export{statusPageIconVisibility,statusPageLabelVisibility};
@@ -0,0 +1,2 @@
1
+ import"../_virtual/_rolldown/runtime.js";const e=`MmLlHhVvCcSsQqTtAaZz`,t={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};function tokenize(n){let r=[],i=0,isWs=e=>e===` `||e===`,`||e===` `||e===`
2
+ `||e===`\r`||e===`\f`,skipWs=()=>{for(;i<n.length&&isWs(n[i]);)i++},isDigit=e=>e!==void 0&&e>=`0`&&e<=`9`,readNumber=()=>{skipWs();let e=i;for((n[i]===`+`||n[i]===`-`)&&i++;isDigit(n[i]);)i++;if(n[i]===`.`)for(i++;isDigit(n[i]);)i++;if(n[i]===`e`||n[i]===`E`){let e=i;if(i++,(n[i]===`+`||n[i]===`-`)&&i++,isDigit(n[i]))for(;isDigit(n[i]);)i++;else i=e}if(i===e)return null;let t=Number.parseFloat(n.slice(e,i));return Number.isFinite(t)?t:null},readFlag=()=>{skipWs();let e=n[i];return e!==`0`&&e!==`1`?null:(i++,+(e===`1`))};for(;i<n.length&&(skipWs(),!(i>=n.length));){let a=n[i];if(!e.includes(a)){i++;continue}if(i++,a===`Z`||a===`z`){r.push({command:a,args:[]});continue}let o=t[a.toUpperCase()],s=a===`A`||a===`a`;for(;;){let t=[],c=!0;for(let e=0;e<o;e++){let n=s&&(e===3||e===4)?readFlag():readNumber();if(n===null){c=!1;break}t.push(n)}if(!c)break;r.push({command:a,args:t}),skipWs();let l=n[i];if(l===void 0||e.includes(l))break}}return r}function unitArcSegment(e,t){let n=4/3*Math.tan(t/4),r=Math.cos(e),i=Math.sin(e),a=Math.cos(e+t),o=Math.sin(e+t);return[r-n*i,i+n*r,a+n*o,o-n*a,a,o]}function arcToCubics(e,t,n,r,i,a,o,s,c){if(e===s&&t===c)return[];let l=Math.abs(n),u=Math.abs(r);if(l===0||u===0)return[{type:`L`,x:s,y:c}];let d=i*Math.PI/180,f=Math.cos(d),p=Math.sin(d),m=(e-s)/2,h=(t-c)/2,g=f*m+p*h,_=-p*m+f*h,v=g*g/(l*l)+_*_/(u*u);if(v>1){let e=Math.sqrt(v);l*=e,u*=e}let y=Math.max(0,l*l*u*u-l*l*_*_-u*u*g*g),b=l*l*_*_+u*u*g*g,x=(a===o?-1:1)*Math.sqrt(b===0?0:y/b),S=l*_*x/u,C=x*-(u*g)/l,w=f*S-p*C+(e+s)/2,T=p*S+f*C+(t+c)/2,E=(g-S)/l,D=(_-C)/u,O=(-g-S)/l,k=(-_-C)/u,A=Math.atan2(D,E),j=Math.atan2(k,O)-A;o===0&&j>0&&(j-=2*Math.PI),o===1&&j<0&&(j+=2*Math.PI);let M=Math.max(1,Math.ceil(Math.abs(j)/(Math.PI/2))),N=j/M,map=(e,t)=>[w+l*e*f-u*t*p,T+l*e*p+u*t*f],P=[];for(let e=0;e<M;e++){let[t,n,r,i,a,o]=unitArcSegment(A+e*N,N),[s,c]=map(t,n),[l,u]=map(r,i),[d,f]=map(a,o);P.push({type:`C`,x1:s,y1:c,x2:l,y2:u,x:d,y:f})}let F=P[P.length-1];return F&&F.type===`C`&&(F.x=s,F.y=c),P}function parseSvgPath(e){let t=[],n=0,r=0,i=0,a=0,o=0,s=0,c=0,l=0,u=``,quadraticToCubic=(e,i,a,u)=>{t.push({type:`C`,x1:n+2/3*(e-n),y1:r+2/3*(i-r),x2:a+2/3*(e-a),y2:u+2/3*(i-u),x:a,y:u}),c=e,l=i,o=a+2/3*(e-a),s=u+2/3*(i-u),n=a,r=u};for(let{command:d,args:f}of tokenize(e)){let e=d>=`a`&&d<=`z`,p=d.toUpperCase(),m=e?n:0,h=e?r:0;switch(p){case`M`:{let e=f[0]+m,o=f[1]+h;t.push({type:`M`,x:e,y:o}),n=e,r=o,i=e,a=o;break}case`L`:{let e=f[0]+m,i=f[1]+h;t.push({type:`L`,x:e,y:i}),n=e,r=i;break}case`H`:{let e=f[0]+m;t.push({type:`L`,x:e,y:r}),n=e;break}case`V`:{let e=f[0]+h;t.push({type:`L`,x:n,y:e}),r=e;break}case`C`:{let e=f[0]+m,i=f[1]+h,a=f[2]+m,c=f[3]+h,l=f[4]+m,u=f[5]+h;t.push({type:`C`,x1:e,y1:i,x2:a,y2:c,x:l,y:u}),o=a,s=c,n=l,r=u;break}case`S`:{let e=u===`C`||u===`S`,i=e?2*n-o:n,a=e?2*r-s:r,c=f[0]+m,l=f[1]+h,d=f[2]+m,p=f[3]+h;t.push({type:`C`,x1:i,y1:a,x2:c,y2:l,x:d,y:p}),o=c,s=l,n=d,r=p;break}case`Q`:quadraticToCubic(f[0]+m,f[1]+h,f[2]+m,f[3]+h);break;case`T`:{let e=u===`Q`||u===`T`;quadraticToCubic(e?2*n-c:n,e?2*r-l:r,f[0]+m,f[1]+h);break}case`A`:{let e=f[5]+m,i=f[6]+h;t.push(...arcToCubics(n,r,f[0],f[1],f[2],f[3],f[4],e,i)),n=e,r=i;break}case`Z`:t.push({type:`Z`}),n=i,r=a;break}u=p}return t}export{parseSvgPath};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{TabViewState as e,tabCloseVisible as t,tabTooltip as n,tabsRevealed as r}from"@gjsify/adwaita-core";function createTabViewState(t){return new e(t)}function tabPageVisibilities(e){let t=e.selectedIndex;return e.pages.map((e,n)=>n===t?`visible`:`collapse`)}function applyTabViewVisibility(e){let t=tabPageVisibilities(e);e.pages.forEach((e,n)=>{e.content&&(e.content.visibility=t[n])})}function tabCloseVisibilities(e){let n=e.selectedId;return e.pages.map(e=>t({hovering:!1,fullyVisible:!0,selected:e.id===n,dragging:!1,pinned:e.pinned})?`visible`:`collapse`)}function tabBarVisibility(e,t){return r({autohide:t,nPages:e.nPages,nPinnedPages:e.nPinnedPages,isTransferringPage:!1})?`visible`:`collapse`}function tabLabelText(e){return e.pinned?``:e.title}function tabTooltipText(e){return n(e)}function tabViewNotifyPayload(e){return{selectedId:e.selectedId,selectedIndex:e.selectedIndex,previousId:e.previousId,interactive:e.interactive}}export{applyTabViewVisibility,createTabViewState,tabBarVisibility,tabCloseVisibilities,tabLabelText,tabPageVisibilities,tabTooltipText,tabViewNotifyPayload};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{ViewStackState as e}from"@gjsify/adwaita-core";function createViewStackState(){return new e}function pageVisibilities(e){let t=e.visibleIndex;return e.pages.map((e,n)=>n===t?`visible`:`collapse`)}function applyViewStackVisibility(e){let t=pageVisibilities(e);e.pages.forEach((e,n)=>{e.content&&(e.content.visibility=t[n])})}function viewStackNotifyPayload(e){return{index:e.index,name:e.name,title:e.title,interactive:e.interactive}}export{applyViewStackVisibility,createViewStackState,pageVisibilities,viewStackNotifyPayload};
@@ -1 +1 @@
1
- import"../_virtual/_rolldown/runtime.js";import{attachRowPressFeedback as e}from"./row-press.js";import{AdwIcon as t}from"./adw-icon.js";import{GridLayout as n,ItemSpec as r,Label as i,StackLayout as a}from"@nativescript/core";const o=`notify::selected`;var AdwViewSwitcherBase=class extends n{_bar;_contentArea;_pages=[];_buttons=[];_selected=0;constructor(e){super(),this.className=e,this.addColumn(new r(1,`star`)),this.addRow(new r(1,`auto`)),this.addRow(new r(1,`star`));let t=new a;t.orientation=`horizontal`,t.horizontalAlignment=`center`,n.setRow(t,0),this.addChild(t),this._bar=t;let i=new n;i.addColumn(new r(1,`star`)),i.addRow(new r(1,`star`)),n.setRow(i,1),this.addChild(i),this._contentArea=i}_initClasses(){this._bar.className=this.barClass}setViews(r){for(let e of this._buttons)this._bar.removeChild(e);this._buttons.length=0;for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0;for(let o of r){this._pages.push(o);let r=this._buttons.length,s=new a;if(s.orientation=`horizontal`,s.className=this.buttonClass,s.horizontalAlignment=`center`,o.icon){let e=new t;e.className=`${e.className} ${this.buttonClass}-icon`.trim(),e.verticalAlignment=`middle`,e.icon=o.icon,s.addChild(e)}let c=new i;c.text=o.title,c.className=`${this.buttonClass}-label`,c.verticalAlignment=`middle`,s.addChild(c),this._buildButtonExtras(s,o,r),e(s),s.addEventListener(`tap`,()=>{this.selected=r}),this._bar.addChild(s),this._buttons.push(s),n.setColumn(o.content,0),n.setRow(o.content,0),this._contentArea.addChild(o.content)}this._selected>=this._pages.length&&(this._selected=0),this._applySelection()}_applySelection(){this._pages.forEach((e,t)=>{e.content.visibility=t===this._selected?`visible`:`collapse`}),this._buttons.forEach((e,t)=>{let n=t===this._selected;e.className=n?`${this.buttonClass} active`:this.buttonClass,this._applyButtonState(e,t,n)})}_buildButtonExtras(e,t,n){}_applyButtonState(e,t,n){}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._selected}set selected(e){let t=Number.isFinite(e)?e:0;if(t===this._selected||t<0||t>=this._pages.length)return;this._selected=t,this._applySelection();let n={eventName:o,object:this,selected:t,title:this._pages[t]?.title??``};this.notify(n)}};export{AdwViewSwitcherBase,o as NOTIFY_SELECTED};
1
+ import"../_virtual/_rolldown/runtime.js";import{AdwIcon as e}from"./adw-icon.js";import{attachRowPressFeedback as t}from"./row-press.js";import{applyViewSwitcherVisibility as n,createViewSwitcherState as r,nsIconSvg as i,switcherButtonVisible as a,viewSwitcherNotifyPayload as o,viewSwitcherPageSpecs as s}from"./view-switcher-model.js";import{GridLayout as c,ItemSpec as l,Label as u,StackLayout as d}from"@nativescript/core";import{buildViewSwitcherButtons as f}from"@gjsify/adwaita-core";const p=`notify::selected`;var AdwViewSwitcherBase=class extends c{_bar;_contentArea;_pages=[];_state=r();_nodes=[];get policy(){return`wide`}get buttonDisplayMode(){return`both`}constructor(e){super(),this.className=e,this.addColumn(new l(1,`star`)),this.addRow(new l(1,`auto`)),this.addRow(new l(1,`star`));let t=new d;t.orientation=`horizontal`,t.horizontalAlignment=`center`,c.setRow(t,0),this.addChild(t),this._bar=t;let n=new c;n.addColumn(new l(1,`star`)),n.addRow(new l(1,`star`)),c.setRow(n,1),this.addChild(n),this._contentArea=n,this._state.subscribe(e=>{this._applySelection();let t={eventName:p,object:this,...o(e)};this.notify(t)})}_initClasses(){this._bar.className=this.barClass}setViews(e){for(let e of this._nodes)this._bar.removeChild(e.button);this._nodes=[];for(let e of this._pages)this._contentArea.removeChild(e.content);this._pages.length=0,this._pages.push(...e);for(let[e,t]of this._pages.entries())this._nodes.push(this._buildButton(e)),c.setColumn(t.content,0),c.setRow(t.content,0),this._contentArea.addChild(t.content);this._state.setPages(s(this._pages)),this._applySelection()}_buildButton(n){let r=new d;r.orientation=`horizontal`,r.className=this.buttonClass,r.horizontalAlignment=`center`;let i=new e;i.className=`${i.className} ${this.buttonClass}-icon`.trim(),i.verticalAlignment=`middle`,r.addChild(i);let a=new u;a.className=`${this.buttonClass}-label`,a.verticalAlignment=`middle`,r.addChild(a);let o=new u;return o.className=`${this.buttonClass}-badge`,o.verticalAlignment=`middle`,r.addChild(o),t(r),r.addEventListener(`tap`,()=>{this._state.setSelected(n)}),this._bar.addChild(r),{button:r,icon:i,label:a,badge:o}}get switcherKind(){return`switcher`}_applySelection(){n(this._pages,this._state.selected);let e=this.buttonDisplayMode!==`labels`,t=this.buttonDisplayMode!==`icons`;f(this._state.pages,this._state.selected,this.policy).forEach((n,r)=>{let o=this._nodes[r];if(!o)return;let s=this._state.pages[r]?.visible??!1;o.button.visibility=a(this.switcherKind,n.visible,s)?`visible`:`collapse`,o.button.orientation=n.orientation===`horizontal`?`horizontal`:`vertical`,o.button.className=n.selected?`${this.buttonClass} active`:this.buttonClass,o.icon.icon=i(n.iconName),o.icon.visibility=e?`visible`:`collapse`,o.label.text=n.label,o.label.visibility=t?`visible`:`collapse`,o.badge.text=n.badgeLabel,o.badge.visibility=n.badgeLabel.length>0||n.needsAttention?`visible`:`collapse`,n.badgeLabel.length===0&&n.needsAttention?o.badge.className=`${this.buttonClass}-badge needs-attention`:o.badge.className=`${this.buttonClass}-badge`})}get views(){return this._pages}set views(e){this.setViews(Array.isArray(e)?e:[])}get selected(){return this._state.selected}set selected(e){this._state.setSelected(e)}get selectedName(){return this._state.selectedName}setPageVisible(e,t){let n=this._state.setPageVisible(e,t);return this._applySelection(),n}};export{AdwViewSwitcherBase,p as NOTIFY_SELECTED};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";import{VIEW_SWITCHER_FALLBACK_ICON as e,ViewSwitcherBarState as t,ViewSwitcherState as n}from"@gjsify/adwaita-core";import{imageMissingSymbolic as r}from"@gjsify/adwaita-icons/status";function createViewSwitcherState(){return new n}function createViewSwitcherBarState(){return new t}function viewSwitcherPageSpec(e,t){return{name:e.name??String(t),title:e.title??null,iconName:e.icon??null,visible:e.visible??!0,useUnderline:e.useUnderline??!1,badgeNumber:e.badgeNumber??0,needsAttention:e.needsAttention??!1}}function viewSwitcherPageSpecs(e){return e.map((e,t)=>viewSwitcherPageSpec(e,t))}function nsIconSvg(t){return t===e?r:t}function pageVisibilities(e,t){return e.map((e,n)=>n===t?`visible`:`collapse`)}function applyViewSwitcherVisibility(e,t){let n=pageVisibilities(e,t);e.forEach((e,t)=>{e.content.visibility=n[t]})}function switcherButtonVisible(e,t,n){return e===`inline`?n:t}function viewSwitcherNotifyPayload(e){return{selected:e.selected,name:e.name,title:e.title,interactive:e.interactive}}export{applyViewSwitcherVisibility,createViewSwitcherBarState,createViewSwitcherState,nsIconSvg,pageVisibilities,switcherButtonVisible,viewSwitcherNotifyPayload,viewSwitcherPageSpec,viewSwitcherPageSpecs};
@@ -0,0 +1 @@
1
+ import"../_virtual/_rolldown/runtime.js";const e=0;function normalizeWrapBoxSpacing(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return!Number.isFinite(t)||t<0?0:t}function wrapBoxSpacingChanges(e,t){return normalizeWrapBoxSpacing(t)!==normalizeWrapBoxSpacing(e)}function wrapBoxChildMargin(e,t){let n=normalizeWrapBoxSpacing(e)/2,r=normalizeWrapBoxSpacing(t)/2;return`${r} ${n} ${r} ${n}`}export{e as DEFAULT_WRAP_BOX_SPACING,normalizeWrapBoxSpacing,wrapBoxChildMargin,wrapBoxSpacingChanges};
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const AdwBottomSheetNsTest: () => Promise<void>;
2
+ export default AdwBottomSheetNsTest;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const AdwCarouselNsTest: () => Promise<void>;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export declare const AdwDataGridNsTest: () => Promise<void>;
2
+ export default AdwDataGridNsTest;
@@ -0,0 +1,2 @@
1
+ export declare const AdwDropDownNsTest: () => Promise<void>;
2
+ export default AdwDropDownNsTest;
@@ -0,0 +1,2 @@
1
+ export declare const AdwEntryRowsNsTest: () => Promise<void>;
2
+ export default AdwEntryRowsNsTest;
@@ -0,0 +1,2 @@
1
+ export declare const AdwEntryNsTest: () => Promise<void>;
2
+ export default AdwEntryNsTest;
@@ -1,6 +1,6 @@
1
1
  export { assertNativeScript, isNativeScript, isAndroid, isIOS } from '@gjsify/native-platform';
2
- export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, AdwComboRow, ComboState, NOTIFY_SELECTED, AdwSpinRow, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED, AdwButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, AdwMenuButton, MENU_ITEM_ACTIVATED, AdwIcon, DEFAULT_ADW_ICON_SIZE, AdwBanner, BUTTON_CLICKED, AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials, AdwWindowTitle, AdwClamp, DEFAULT_CLAMP_MAX_SIZE, AdwHeaderBar, AdwToolbarView, AdwWrapBox, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, AdwInlineViewSwitcher, AdwTabView, AdwCarousel, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, AdwNavigationView, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, DEFAULT_SIDEBAR_WIDTH, NOTIFY_SHOW_SIDEBAR, AdwNavigationSplitView, AdwOverlaySplitView, AdwSidebar, NOTIFY_SIDEBAR_SELECTED, AdwBottomSheet, NOTIFY_OPEN, AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE, AdwAboutDialog, ABOUT_CLOSED, AdwPreferencesDialog, PREFERENCES_CLOSED, attachRowPressFeedback, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
3
- export type { NotifyActiveEventData, NotifyTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, NotifyResponseEventData, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
2
+ export { AdwPreferencesPage, AdwPreferencesGroup, AdwActionRow, AdwSwitchRow, NOTIFY_ACTIVE, AdwEntryRow, NOTIFY_TEXT, AdwPasswordEntryRow, AdwEntry, ENTRY_ACTIVATE, NOTIFY_ENTRY_TEXT, AdwComboRow, ComboState, NOTIFY_SELECTED, AdwDropDown, NOTIFY_DROP_DOWN_SELECTED, AdwSpinRow, SpinState, NOTIFY_VALUE, AdwSliderRow, NOTIFY_SLIDER_VALUE, AdwExpanderRow, ExpanderState, NOTIFY_EXPANDED, AdwButton, AdwImageButton, DEFAULT_ICON_BUTTON_ICON_SIZE, AdwMenuButton, MENU_ITEM_ACTIVATED, AdwIcon, DEFAULT_ADW_ICON_SIZE, AdwBanner, BUTTON_CLICKED, AdwAvatar, DEFAULT_AVATAR_SIZE, avatarInitials, AdwWindowTitle, AdwClamp, DEFAULT_CLAMP_MAX_SIZE, AdwHeaderBar, AdwToolbarView, AdwWrapBox, AdwDataGrid, ROW_ACTIVATED, dataGridCellClass, dataGridItemSpec, dataGridRowClass, dataGridShapeKey, dataGridTracksKey, parseDataGridWidth, DATA_GRID_HEADER_CELL_CLASS, DATA_GRID_HEADER_ROW_CLASS, DATA_GRID_SECTION_CELL_CLASS, AdwSpinner, DEFAULT_SPINNER_SIZE, AdwStatusPage, AdwButtonRow, ACTIVATED, AdwButtonContent, AdwSplitButton, CLICKED, MENU_TAPPED, AdwToggleGroup, ToggleGroupState, NOTIFY_TOGGLE_SELECTED, AdwViewStack, NOTIFY_VISIBLE_CHILD, AdwViewSwitcherBase, NOTIFY_VIEW_SELECTED, AdwViewSwitcher, AdwViewSwitcherBar, AdwInlineViewSwitcher, AdwTabView, AdwCarousel, DEFAULT_CAROUSEL_PAGE_WIDTH, NOTIFY_POSITION, AdwNavigationView, NOTIFY_VISIBLE_PAGE, AdwSplitViewBase, NOTIFY_SHOW_SIDEBAR, AdwNavigationSplitView, AdwOverlaySplitView, NsNavigationSplitViewState, NsOverlaySplitViewState, splitViewColumns, AdwSidebar, NOTIFY_SIDEBAR_SELECTED, AdwBottomSheet, NOTIFY_OPEN, AdwToast, AdwToastOverlay, AdwToastQueue, DEFAULT_TOAST_TIMEOUT, TOAST_BUTTON_CLICKED, AdwAlertDialog, AdwAlertResponses, NOTIFY_RESPONSE, AdwAboutDialog, ABOUT_CLOSED, AdwPreferencesDialog, PREFERENCES_CLOSED, attachRowPressFeedback, renderSymbolicIcon, extractIconPaths, extractPathData, ADWAITA_ICON_GRID, DEFAULT_ICON_COLOR, DEFAULT_ICON_COLOR_DARK, adwaitaColorScheme, isThemeIconColor, onAdwaitaColorSchemeChanged, setAdwaitaColorScheme, themeIconColor, toggleAdwaitaColorScheme, AdwBreakpoint, addBreakpoints, evaluateBreakpointCondition, parseBreakpointCondition, registerAdwaitaElements, } from './widgets/index.js';
3
+ export type { NotifyActiveEventData, NotifyTextEventData, NotifyEntryTextEventData, AdwComboOption, ComboStateChange, ComboStateListener, NotifySelectedEventData, NotifyDropDownSelectedEventData, NotifyValueEventData, SpinStateChange, SpinStateListener, NotifySliderValueEventData, NotifyExpandedEventData, ExpanderStateListener, AdwButtonVariant, AdwMenuItem, MenuItemActivatedEventData, MenuTappedEventData, RowActivatedEventData, DataGridItemSpec, NotifyToggleSelectedEventData, ToggleGroupStateChange, ToggleGroupStateListener, AdwViewStackPage, NotifyVisibleChildEventData, AdwViewPage, NotifyViewSelectedEventData, NotifyPositionEventData, NotifyVisiblePageEventData, NotifyShowSidebarEventData, NsShowSidebarNotification, NsSplitViewHost, NsSplitViewState, NotifySidebarSelectedEventData, NotifyOpenEventData, AdwToastOptions, AdwToastQueueHandlers, AdwToastQueueOptions, ToastScheduler, ToastTimerHandle, NotifyResponseEventData, AdwAlertResponse, AdwResponseAppearance, AdwResponseOptions, OrderedConfirmResponses, SymbolicIconOptions, IconPath, AdwColorScheme, AdwBreakpointHandlers, BreakpointBound, BreakpointConditionGroup, BreakpointConditionLeaf, BreakpointConditionNode, BreakpointDimension, BreakpointSize, } from './widgets/index.js';
4
4
  export { ADWAITA_SANS_FONT_FAMILY, ADWAITA_SANS_TTF_FILES, adwaitaFontInstallInstructions, hasAdwaitaSans, } from './fonts.js';
5
5
  /**
6
6
  * One-call convenience setup for the Adwaita NativeScript layer.
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const AdwSidebarNsTest: () => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const AdwSplitButtonNsTest: () => Promise<void>;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Promise<void>;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export declare const AdwViewSwitcherNsTest: () => Promise<void>;
@@ -1,12 +1,29 @@
1
1
  import { GridLayout, StackLayout, Label, View } from '@nativescript/core';
2
+ import { ActionRowState } from './row-state.js';
3
+ /** Event name emitted when the row is activated. Mirrors `Adw.ActionRow::activated`. */
4
+ export declare const ACTIVATED = "activated";
2
5
  export declare class AdwActionRow extends GridLayout {
6
+ /**
7
+ * Whether libadwaita would answer `ADW_IS_ACTION_ROW` for this row — which
8
+ * is what decides whether the preferences SEARCH consults its subtitle
9
+ * (`filter_search_results`, adw-preferences-dialog.c:140-146).
10
+ *
11
+ * A declared property, not an `instanceof` test, because this port's class
12
+ * tree deliberately does NOT match the GObject one: `AdwEntryRow`,
13
+ * `AdwExpanderRow` and `AdwButtonRow` extend this class here to reuse the
14
+ * row chrome, while in C all three derive from `AdwPreferencesRow`
15
+ * (adw-entry-row.c:90, adw-expander-row.c:72, adw-button-row.c:74). They
16
+ * override this to `false`, so the search behaves as GTK does.
17
+ */
18
+ readonly isActionRow: boolean;
3
19
  /** The text/value column (column 1). */
4
20
  protected readonly _textStack: StackLayout;
5
21
  /** The title label. */
6
22
  protected readonly _titleLabel: Label;
7
- /** The subtitle label (created lazily — only added to the tree when set). */
23
+ /** The subtitle label. */
8
24
  protected readonly _subtitleLabel: Label;
9
- private _hasSubtitle;
25
+ /** The headless labels + activatable-widget coupling (ADR 0004). */
26
+ protected readonly _rowState: ActionRowState<View>;
10
27
  /** The currently-installed prefix view (column 0), if any. */
11
28
  private _prefix;
12
29
  /** The currently-installed suffix view (column 2), if any. */
@@ -19,21 +36,60 @@ export declare class AdwActionRow extends GridLayout {
19
36
  setPrefix(view: View | null): void;
20
37
  /** The currently-installed prefix view, or `null`. */
21
38
  get prefix(): View | null;
22
- /** The row title (column 0, top line). */
39
+ /** The row title (column 1, top line). */
23
40
  get title(): string;
24
41
  set title(value: string);
25
42
  /**
26
- * The row subtitle (column 0, dim second line). Setting a non-empty value
27
- * adds the subtitle label to the tree; setting empty removes it again so an
28
- * empty subtitle leaves no blank gap — matching `Adw.ActionRow`.
43
+ * The row subtitle (column 1, dim second line). An empty subtitle collapses
44
+ * its label so it leaves no blank gap — `string_is_not_empty`, the same rule
45
+ * the title now follows.
29
46
  */
30
47
  get subtitle(): string;
31
48
  set subtitle(value: string);
32
49
  /**
33
- * Install a suffix widget in column 1 (e.g. a `Switch`, `Button`, or icon).
50
+ * Install a suffix widget in column 2 (e.g. a `Switch`, `Button`, or icon).
34
51
  * Replaces any previously-installed suffix. Pass `null` to clear it.
35
52
  */
36
53
  setSuffix(view: View | null): void;
37
54
  /** The currently-installed suffix view, or `null`. */
38
55
  get suffix(): View | null;
56
+ /** `Adw.ActionRow:activatable-widget` — the widget this row activates. */
57
+ get activatableWidget(): View | null;
58
+ /**
59
+ * Set the activatable widget. Its sensitivity is copied into `activatable`
60
+ * (adw-action-row.c:729-732); clearing it LEAVES the row activatable
61
+ * (C:709). Call {@link syncActivatableWidgetSensitivity} when the widget's
62
+ * `isUserInteractionEnabled` changes — NativeScript has no property-change
63
+ * notification a plain `View` write goes through, so the live half of the
64
+ * binding has to be driven, not observed.
65
+ */
66
+ set activatableWidget(widget: View | null);
67
+ /** Re-read the activatable widget's sensitivity — the live half of the binding. */
68
+ syncActivatableWidgetSensitivity(): void;
69
+ /** `GtkListBoxRow:activatable` — whether a tap activates this row at all. */
70
+ get activatable(): boolean;
71
+ set activatable(value: boolean);
72
+ /**
73
+ * `adw_action_row_activate` (adw-action-row.h:90): forward to the activatable
74
+ * widget, then emit `activated` (C:297-307). A no-op while unactivatable,
75
+ * because a tap on a non-activatable `GtkListBoxRow` never reaches here.
76
+ *
77
+ * FORWARDING IS SUBCLASS BUSINESS in this port. GTK sends
78
+ * `mnemonic-activate` and every widget knows what that means for itself;
79
+ * NativeScript has no such primitive on `View`, so {@link AdwSwitchRow}
80
+ * overrides this to toggle its slider and a plain action row only emits.
81
+ */
82
+ activate(): void;
83
+ /**
84
+ * Whether this row's own title visibility follows `string_is_not_empty`.
85
+ *
86
+ * `AdwEntryRow` sets it `false`: its two titles are the endpoints of
87
+ * libadwaita's empty↔filled CROSS-FADE (adw-entry-row.c:433-439), so which
88
+ * of them shows is decided by `emptyTarget`, not by whether the string is
89
+ * empty. Without the opt-out, setting a title on an entry row would reveal
90
+ * the small floating label on top of the large placeholder.
91
+ */
92
+ protected _managesTitleVisibility: boolean;
93
+ /** Push the derived label text + visibility onto the two `Label`s. */
94
+ protected _applyLabels(): void;
39
95
  }
@@ -1,13 +1,8 @@
1
1
  import { GridLayout, Label } from '@nativescript/core';
2
+ import { avatarColor, avatarInitials } from './avatar-color.js';
2
3
  /** Default avatar diameter in DIPs (Adwaita's common avatar size). */
3
4
  export declare const DEFAULT_AVATAR_SIZE = 48;
4
- /** The flat fill + initials colour `Adw.Avatar` would pick for `text`. */
5
- export declare function avatarColor(text: string): {
6
- fill: string;
7
- fg: string;
8
- };
9
- /** Derive up to two-letter initials from a name (`"Ada Lovelace"` → `"AL"`). */
10
- export declare function avatarInitials(text: string): string;
5
+ export { avatarColor, avatarInitials };
11
6
  export declare class AdwAvatar extends GridLayout {
12
7
  /** The centered initials label. */
13
8
  protected readonly _label: Label;
@@ -1,25 +1,44 @@
1
1
  import { Button, GridLayout, Label } from '@nativescript/core';
2
+ import type { AdwBannerButtonStyle } from '@gjsify/adwaita-core';
2
3
  /** Event name emitted when the banner's action button is tapped. */
3
4
  export declare const BUTTON_CLICKED = "buttonClicked";
4
5
  export declare class AdwBanner extends GridLayout {
5
6
  /** The message label (column 0). */
6
7
  protected readonly _titleLabel: Label;
7
- /** The action button (column 1, created lazily — only in the tree when a label is set). */
8
+ /** The action button (column 1, only in the tree when a label is set). */
8
9
  protected readonly _button: Button;
9
10
  private _hasButton;
10
- private _revealed;
11
+ private readonly _props;
11
12
  constructor();
12
- /** The banner message text. */
13
+ /** The banner message. Pango markup when {@link useMarkup}. */
13
14
  get title(): string;
14
15
  set title(value: string);
15
16
  /**
16
- * The action button label. Setting a non-empty value adds the button to the
17
- * tree; setting empty removes it — so a banner with no button label shows no
18
- * button, matching `Adw.Banner`.
17
+ * Whether {@link title} is Pango markup. Defaults to TRUE, as in libadwaita
18
+ * (:422-425).
19
+ *
20
+ * NS has no inline-markup layer, so markup is reduced to its plain text —
21
+ * closer to what GTK paints than the raw tags would be.
22
+ */
23
+ get useMarkup(): boolean;
24
+ set useMarkup(value: boolean);
25
+ /**
26
+ * The action button label. A non-empty value adds the button to the tree;
27
+ * empty or `null` removes it, matching `label && label[0]` (:663).
28
+ *
29
+ * The template pins the button to `use-underline=True` (adw-banner.ui:33), so
30
+ * the value keeps its mnemonic markers and the PAINTED text drops them.
19
31
  */
20
32
  get buttonLabel(): string;
21
33
  set buttonLabel(value: string);
22
- /** Whether the banner is shown. Toggles the view's `visibility`. */
34
+ /**
35
+ * The button's style class — grey (`'default'`) or `.suggested-action`
36
+ * (:764-774). Since 1.7.
37
+ */
38
+ get buttonStyle(): AdwBannerButtonStyle;
39
+ set buttonStyle(value: AdwBannerButtonStyle);
40
+ /** Whether the banner is shown. Defaults to FALSE (:456-459). */
23
41
  get revealed(): boolean;
24
42
  set revealed(value: boolean);
43
+ private _renderTitle;
25
44
  }
@@ -1,28 +1,46 @@
1
- import { GridLayout, StackLayout, View, type EventData } from '@nativescript/core';
2
- /** Event name emitted when {@link AdwBottomSheet.open} changes. Mirrors GObject `notify::open`. */
3
- export declare const NOTIFY_OPEN = "notify::open";
4
- /** Payload of the `notify::open` event. */
5
- export interface NotifyOpenEventData extends EventData {
6
- /** Whether the sheet is now open. */
7
- open: boolean;
8
- }
1
+ import { GridLayout, StackLayout, View } from '@nativescript/core';
2
+ import type { BottomSheetCloseOutcome, BottomSheetCloseSource } from '@gjsify/adwaita-core';
3
+ import { CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE, type NotifyOpenEventData } from './bottom-sheet-state.js';
4
+ export { CLOSE_ATTEMPT, NOTIFY_OPEN, SHEET_CLOSE };
5
+ export type { NotifyOpenEventData };
9
6
  export declare class AdwBottomSheet extends GridLayout {
10
7
  /** The always-visible content layer. */
11
8
  private _content;
12
9
  /** The bottom sheet panel wrapper (drag handle + sheet child). */
13
10
  protected readonly _sheetPanel: StackLayout;
14
11
  private _sheetChild;
15
- private _open;
12
+ /** The shared open/can-close model — the single source of truth for both. */
13
+ private readonly _state;
16
14
  constructor();
17
15
  /** Set (or replace) the always-visible content layer (painted under the sheet). */
18
16
  setContent(view: View | null): void;
19
17
  /** Set (or replace) the sheet panel's child (shown when open). */
20
18
  setSheet(view: View | null): void;
21
- /** Open the sheet. */
19
+ /** Open the sheet programmatically. */
22
20
  open(): void;
23
- /** Close the sheet. */
21
+ /**
22
+ * Close the sheet programmatically. Like `AdwBottomSheet:open` this ignores
23
+ * `can-close`; a user-driven dismissal belongs in {@link requestClose}.
24
+ */
24
25
  close(): void;
25
26
  /** Whether the sheet is open. Toggling shows/hides the panel + emits `notify::open`. */
26
27
  get openState(): boolean;
27
28
  set openState(value: boolean);
29
+ /**
30
+ * Whether the user may dismiss the sheet (`AdwBottomSheet:can-close`). When
31
+ * off, a refused dismissal emits `close-attempt` instead of closing.
32
+ */
33
+ get canClose(): boolean;
34
+ set canClose(value: boolean);
35
+ /**
36
+ * Route a dismissal affordance through the shared gate and act on the
37
+ * verdict: close, emit `close-attempt`, emit `sheet.close` for the host to
38
+ * forward, or do nothing.
39
+ *
40
+ * NativeScript has no Escape key and no widget-level back handling, so the
41
+ * HOST routes what it has here — typically Android's back button as
42
+ * `requestClose('escape')` and an in-sheet close button as
43
+ * `requestClose('close-button')`.
44
+ */
45
+ requestClose(source: BottomSheetCloseSource): BottomSheetCloseOutcome;
28
46
  }