@rdlabo/ionic-theme-ios27 1.1.0 → 1.2.0-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 (93) hide show
  1. package/README.md +8 -1
  2. package/dist/css/components/ion-list.css +1 -1
  3. package/dist/css/components/ion-menu.css +1 -1
  4. package/dist/css/ionic-theme-ios27.css +1 -1
  5. package/dist/css/vertical-bars.css +1 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +15 -8
  8. package/dist/native/components/index.d.ts +1 -0
  9. package/dist/native/components/index.d.ts.map +1 -1
  10. package/dist/native/components/index.js +8 -3
  11. package/dist/native/components/ion-back-button.d.ts.map +1 -1
  12. package/dist/native/components/ion-back-button.js +5 -2
  13. package/dist/native/components/ion-button.d.ts.map +1 -1
  14. package/dist/native/components/ion-button.js +10 -2
  15. package/dist/native/components/ion-buttons.d.ts.map +1 -1
  16. package/dist/native/components/ion-buttons.js +12 -4
  17. package/dist/native/components/ion-fab.js +4 -4
  18. package/dist/native/components/ion-menu-button.d.ts.map +1 -1
  19. package/dist/native/components/ion-menu-button.js +5 -4
  20. package/dist/native/components/searchable-tabs.d.ts.map +1 -1
  21. package/dist/native/components/searchable-tabs.js +4 -1
  22. package/dist/native/definitions.d.ts +29 -3
  23. package/dist/native/definitions.d.ts.map +1 -1
  24. package/dist/native/definitions.js +6 -1
  25. package/dist/native/index.d.ts +6 -2
  26. package/dist/native/index.d.ts.map +1 -1
  27. package/dist/native/index.js +154 -17
  28. package/dist/native/prehide.d.ts +5 -0
  29. package/dist/native/prehide.d.ts.map +1 -0
  30. package/dist/native/prehide.js +246 -0
  31. package/dist/native/runtime.d.ts +1 -1
  32. package/dist/native/runtime.d.ts.map +1 -1
  33. package/dist/native/runtime.js +162 -28
  34. package/dist/native/shared/candidate.d.ts.map +1 -1
  35. package/dist/native/shared/candidate.js +7 -3
  36. package/dist/native/shared/dom.d.ts +33 -2
  37. package/dist/native/shared/dom.d.ts.map +1 -1
  38. package/dist/native/shared/dom.js +171 -10
  39. package/dist/native/vertical-bars-web.d.ts +3 -0
  40. package/dist/native/vertical-bars-web.d.ts.map +1 -0
  41. package/dist/native/vertical-bars-web.js +341 -0
  42. package/dist/native-integration/index.d.ts +3 -2
  43. package/dist/native-integration/index.d.ts.map +1 -1
  44. package/dist/native-integration/index.js +11 -5
  45. package/dist/transition/index.d.ts +2 -2
  46. package/dist/transition/index.d.ts.map +1 -1
  47. package/dist/transition/index.js +1 -1
  48. package/dist/transition/ios.transition.d.ts.map +1 -1
  49. package/dist/transition/ios.transition.js +1 -0
  50. package/dist/utils.d.ts +3 -3
  51. package/dist/utils.d.ts.map +1 -1
  52. package/dist/utils.js +1 -1
  53. package/dist/vertical-bars.d.ts +4 -0
  54. package/dist/vertical-bars.d.ts.map +1 -0
  55. package/dist/vertical-bars.js +2 -0
  56. package/docs/iphone-duo.md +255 -0
  57. package/docs/migration.md +2 -2
  58. package/docs/native-ui-shell.md +15 -3
  59. package/docs/special-markup.md +6 -0
  60. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellSearchController.swift +15 -1
  61. package/ios/Sources/IonicNativeUIShellPlugin/Components/ShellVerticalBars.swift +358 -0
  62. package/ios/Sources/IonicNativeUIShellPlugin/IonicNativeUIShellPlugin.swift +215 -35
  63. package/ios/Sources/IonicNativeUIShellPlugin/Shared/ShellSnapshot.swift +10 -1
  64. package/ios/Tests/IonicNativeUIShellPluginTests/ShellSnapshotTests.swift +29 -0
  65. package/package.json +6 -2
  66. package/src/index.ts +15 -8
  67. package/src/native/components/index.ts +12 -3
  68. package/src/native/components/ion-back-button.ts +8 -2
  69. package/src/native/components/ion-button.ts +12 -2
  70. package/src/native/components/ion-buttons.ts +9 -4
  71. package/src/native/components/ion-fab.ts +4 -4
  72. package/src/native/components/ion-menu-button.ts +5 -4
  73. package/src/native/components/searchable-tabs.ts +9 -1
  74. package/src/native/definitions.ts +40 -3
  75. package/src/native/index.ts +188 -20
  76. package/src/native/prehide.ts +255 -0
  77. package/src/native/runtime.ts +173 -27
  78. package/src/native/shared/candidate.ts +11 -3
  79. package/src/native/shared/dom.ts +212 -11
  80. package/src/native/vertical-bars-web.ts +374 -0
  81. package/src/native-integration/index.ts +13 -8
  82. package/src/styles/components/ion-list.scss +2 -2
  83. package/src/styles/components/ion-menu.scss +2 -2
  84. package/src/styles/ionic-theme-ios27.scss +1 -0
  85. package/src/styles/vertical-bars.scss +342 -0
  86. package/src/transition/index.ts +11 -6
  87. package/src/transition/ios.transition.ts +1 -0
  88. package/src/utils.ts +8 -8
  89. package/src/vertical-bars.ts +3 -0
  90. package/dist/native/lifecycle.d.ts +0 -4
  91. package/dist/native/lifecycle.d.ts.map +0 -1
  92. package/dist/native/lifecycle.js +0 -34
  93. package/src/native/lifecycle.ts +0 -38
@@ -0,0 +1 @@
1
+ @property --ios-theme-split-pane-width{syntax:"<length>";inherits:false;initial-value:320px}ion-split-pane.ios-theme-split-pane-half-open{--ios-theme-split-pane-width: 50vw}ion-app.ios-theme-vertical-bars{--ios-theme-vertical-bars-safe-area-left-resolved: var(--ios-theme-vertical-bars-safe-area-left, 0px);--ios-theme-vertical-bars-safe-area-right-resolved: var( --ios-theme-vertical-bars-safe-area-right, var(--ios-theme-vertical-bars-native-inset, max(80px, env(safe-area-inset-right, 0px))) )}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-left{--ios-theme-vertical-bars-safe-area-left-resolved: var( --ios-theme-vertical-bars-safe-area-left, var(--ios-theme-vertical-bars-native-inset, max(80px, env(safe-area-inset-left, 0px))) );--ios-theme-vertical-bars-safe-area-right-resolved: var(--ios-theme-vertical-bars-safe-area-right, 0px)}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>:is(ion-menu-button,ion-button).ios-theme-vertical-bars-toolbar-projection{--ios26-glass-background-rgb: var(--ion-background-color-rgb, 255, 255, 255);--ios26-glass-border-color-rgb: var(--ion-background-color-rgb, 255, 255, 255);--ios26-glass-box-shadow-color-rgb: var(--ion-text-color-rgb, 0, 0, 0)}ion-app.ios-theme-vertical-bars .ios-transition-shade{clip-path:inset(0 var(--ios-theme-vertical-bars-safe-area-right-resolved) 0 var(--ios-theme-vertical-bars-safe-area-left-resolved))}ion-app.ios-theme-vertical-bars ion-content:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)){--ion-safe-area-left: 0px;--ion-safe-area-right: 0px}ion-app.ios-theme-vertical-bars ion-content:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *))::part(scroll){padding-inline-start:calc(var(--padding-start, 0px) + var(--ios-theme-vertical-bars-safe-area-left-resolved));padding-inline-end:calc(var(--padding-end, 0px) + var(--ios-theme-vertical-bars-safe-area-right-resolved))}ion-app.ios-theme-vertical-bars ion-content:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)):dir(rtl)::part(scroll){padding-inline-start:calc(var(--padding-start, 0px) + var(--ios-theme-vertical-bars-safe-area-right-resolved));padding-inline-end:calc(var(--padding-end, 0px) + var(--ios-theme-vertical-bars-safe-area-left-resolved))}ion-app.ios-theme-vertical-bars ion-toolbar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)){--ion-safe-area-left: 0px;--ion-safe-area-right: 0px}ion-app.ios-theme-vertical-bars ion-toolbar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)):not(:where(ion-header.header-collapse-condense *,ion-footer.footer-collapse-fade *))::part(container){padding-inline-start:calc(var(--padding-start, 0px) + var(--ios-theme-vertical-bars-safe-area-left-resolved));padding-inline-end:calc(var(--padding-end, 0px) + var(--ios-theme-vertical-bars-safe-area-right-resolved))}ion-app.ios-theme-vertical-bars ion-toolbar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)):not(:where(ion-header.header-collapse-condense *,ion-footer.footer-collapse-fade *)):dir(rtl)::part(container){padding-inline-start:calc(var(--padding-start, 0px) + var(--ios-theme-vertical-bars-safe-area-right-resolved));padding-inline-end:calc(var(--padding-end, 0px) + var(--ios-theme-vertical-bars-safe-area-left-resolved))}ion-app.ios-theme-vertical-bars ion-fab:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)){--ion-safe-area-left: 0px;--ion-safe-area-right: 0px;--ios-theme-vertical-bars-fab-edge-gap: 16px;--ios-theme-vertical-bars-fab-start-offset: var(--ios-theme-menu-width, var(--ios26-menu-width, 0px))}ion-app.ios-theme-vertical-bars ion-fab:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)).fab-horizontal-start{inset-inline-start:calc(var(--ios-theme-vertical-bars-fab-edge-gap) + var(--ios-theme-vertical-bars-fab-start-offset) + var(--ios-theme-vertical-bars-safe-area-left-resolved))}ion-app.ios-theme-vertical-bars ion-fab:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)).fab-horizontal-end{inset-inline-end:calc(var(--ios-theme-vertical-bars-fab-edge-gap) + var(--ios-theme-vertical-bars-safe-area-right-resolved))}ion-app.ios-theme-vertical-bars ion-fab:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)):dir(rtl).fab-horizontal-start{inset-inline-start:calc(var(--ios-theme-vertical-bars-fab-edge-gap) + var(--ios-theme-vertical-bars-fab-start-offset) + var(--ios-theme-vertical-bars-safe-area-right-resolved))}ion-app.ios-theme-vertical-bars ion-fab:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)):dir(rtl).fab-horizontal-end{inset-inline-end:calc(var(--ios-theme-vertical-bars-fab-edge-gap) + var(--ios-theme-vertical-bars-safe-area-left-resolved))}ion-app.ios-theme-vertical-bars ion-fab:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)):has(.fab-button-small){--ios-theme-vertical-bars-fab-edge-gap: 10px}ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-end:not(:dir(rtl)):not(.ios-theme-disabled,.ios26-disabled),ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-start:dir(rtl):not(.ios-theme-disabled,.ios26-disabled){--ion-safe-area-right: 0px}ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-end:not(:dir(rtl)):not(.ios-theme-disabled,.ios26-disabled)::part(container),ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-start:dir(rtl):not(.ios-theme-disabled,.ios26-disabled)::part(container){margin-right:var(--ios-theme-vertical-bars-safe-area-right-resolved)}ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-start:not(:dir(rtl)):not(.ios-theme-disabled,.ios26-disabled),ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-end:dir(rtl):not(.ios-theme-disabled,.ios26-disabled){--ion-safe-area-left: 0px}ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-start:not(:dir(rtl)):not(.ios-theme-disabled,.ios26-disabled)::part(container),ion-app.ios-theme-vertical-bars ion-menu:is(.ios,.md).menu-side-end:dir(rtl):not(.ios-theme-disabled,.ios26-disabled)::part(container){margin-left:var(--ios-theme-vertical-bars-safe-area-left-resolved)}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled){--ios-theme-side-tab-bar-width: 50px;--ios-theme-side-tab-bar-gap: 8px;--ios-theme-side-safe-area: var(--ios-theme-vertical-bars-safe-area-right-resolved);contain:layout style;position:absolute;z-index:2;display:flex;flex-direction:column;width:46px;min-width:46px;max-width:46px;height:fit-content;min-height:0;padding:2px;border-radius:25px;left:auto;right:max(4px,(var(--ios-theme-side-safe-area) - var(--ios-theme-side-tab-bar-width))/2);margin:0;top:auto;bottom:calc(var(--ion-safe-area-bottom, 0px) + var(--ios-theme-side-tab-bar-gap))}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled)>ion-tab-button:not(.ion-cloned-element){display:block;flex:none;width:46px;min-width:46px;height:52px;min-height:52px;border-radius:23px}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled)>ion-tab-button:not(.ion-cloned-element)::part(native){justify-content:center}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled)>ion-tab-button:not(.ion-cloned-element) ion-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled)>ion-tab-button:not(.ion-cloned-element) ion-icon{margin:0;font-size:28px}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled)>ion-tab-button:not(.ion-cloned-element)~ion-tab-button:not(.ion-cloned-element){margin-block-start:0;margin-inline-start:0}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):has(>ion-tab-button:is(.ion-activated,:active))>ion-tab-button:not(.ion-cloned-element)::part(native){flex-direction:column;padding-block:4px}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):has(>ion-tab-button:is(.ion-activated,:active))>ion-tab-button:not(.ion-cloned-element) ion-label{position:static;width:auto;height:auto;max-width:44px;padding:0;margin:1px 0 0;overflow:hidden;clip:auto;font-size:.5rem;line-height:1;text-overflow:ellipsis;white-space:nowrap}ion-app.ios-theme-vertical-bars ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):has(>ion-tab-button:is(.ion-activated,:active))>ion-tab-button:not(.ion-cloned-element) ion-icon{margin:0;font-size:22px}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-left ion-tabs:not(:where(ion-menu *,ion-modal *,ion-popover *))>ion-tab-bar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled){--ios-theme-side-safe-area: var(--ios-theme-vertical-bars-safe-area-left-resolved);right:auto;left:max(4px,(var(--ios-theme-side-safe-area) - var(--ios-theme-side-tab-bar-width))/2)}.ios-theme-native-ui-shell-prehidden{position:absolute !important;visibility:hidden !important}html.ios-theme-native-ui-shell-prehide ion-app.ios-theme-vertical-bars ion-back-button:not([icon],[color],.ios-theme-vertical-bars-back-web-owned,.ionic-theme-disabled,.ios-theme-disabled,.ios26-disabled,.ios-theme-vertical-bars-back-button-projection):not(:where(ion-menu *,ion-modal *,ion-popover *,ion-header[collapse] *,ion-footer[collapse] *,ion-buttons.ios-theme-horizontal-only *,.ios-theme-shell-disabled *,.ionic-theme-disabled *,.ios-theme-disabled *,.ios26-disabled *)){position:absolute !important;visibility:hidden !important}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready ion-toolbar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)) ion-back-button:is(.ios,.md)[data-native-ui-shell]:not(.ios-theme-disabled,.ios26-disabled,.ios-theme-vertical-bars-back-button-projection){display:none}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready ion-toolbar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)) ion-buttons:is(.ios,.md)>:is(ion-button,ion-menu-button):is(.ios,.md)[data-native-ui-shell]:not(.ios-theme-disabled,.ios26-disabled,.ios-theme-vertical-bars-toolbar-action){display:none}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready ion-toolbar:is(.ios,.md):not(.ios-theme-disabled,.ios26-disabled):not(:where(ion-menu *,ion-modal *,ion-popover *)) ion-buttons:is(.ios,.md):has(>:is(ion-back-button,ion-button,ion-menu-button)[data-native-ui-shell]):not(:has(>:is(ion-back-button,ion-button,ion-menu-button):not([data-native-ui-shell]))){display:none}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-back-button.ios-theme-vertical-bars-back-button-projection{position:fixed;z-index:1001;top:var(--ios-theme-vertical-bars-toolbar-top, 220px);right:max(4px,(var(--ios-theme-vertical-bars-safe-area-right-resolved) - 46px)/2);display:block;width:46px;height:46px;margin:0}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{position:fixed;z-index:1001;top:calc(var(--ios-theme-vertical-bars-toolbar-top, 220px) + var(--ios-theme-vertical-bars-toolbar-offset, 0px));right:max(4px,(var(--ios-theme-vertical-bars-safe-area-right-resolved) - 46px)/2);width:46px;min-width:46px;height:46px;min-height:46px;margin:0}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection :is(ion-icon,svg){width:22px;height:22px;margin:0;font-size:22px}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-menu-button:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{backdrop-filter:blur(2px) saturate(360%);transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:rgba(var(--ios-theme-glass-background-rgb, var(--ios26-glass-background-rgb)), 0.72);box-shadow:inset 0 1px 2px rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.25),inset 0 -1px 2px rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.3),0 -0.5px 0 rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.65),0 .5px 0 rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.65),0 0 0 .5px rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.22),0 .5px 1px rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08);border:.5px solid rgb(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)));background-image:linear-gradient(180deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 4%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.01) 8%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 16%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.027) 22%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.026) 28%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.018) 36%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 44%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 58%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.008) 80%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.006) 88%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 94%);background-origin:padding-box;background-clip:border-box;border-inline-color:rgba(0,0,0,0)}@supports(background-clip: border-area){ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-menu-button:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{border-color:rgba(0,0,0,0);background-image:linear-gradient(180deg, rgb(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb))), transparent 50%, rgb(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)))),linear-gradient(180deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 4%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.01) 8%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 16%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.027) 22%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.026) 28%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.018) 36%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 44%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 58%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.008) 80%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.006) 88%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 94%),linear-gradient(transparent, transparent);background-origin:border-box,padding-box,border-box;background-clip:border-area,padding-box,border-box}}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-menu-button:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{border-radius:50%}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-button:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{--background: rgba(var(--ios-theme-glass-background-rgb, var(--ios26-glass-background-rgb)), 0.72);--border-radius: 50%;--box-shadow:inset 0 1px 2px rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.25),inset 0 -1px 2px rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.3),0 -0.5px 0 rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.65),0 .5px 0 rgba(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)), 0.65),0 0 0 .5px rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.22),0 .5px 1px rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-button:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection::part(native){backdrop-filter:blur(2px) saturate(360%);transform:translateZ(0);-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden;box-shadow:var(--box-shadow);border:.5px solid rgb(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)));background-image:linear-gradient(180deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 4%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.01) 8%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 16%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.027) 22%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.026) 28%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.018) 36%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 44%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 58%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.008) 80%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.006) 88%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 94%);background-origin:padding-box;background-clip:border-box;border-inline-color:rgba(0,0,0,0)}@supports(background-clip: border-area){ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-button:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection::part(native){border-color:rgba(0,0,0,0);background-image:linear-gradient(180deg, rgb(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb))), transparent 50%, rgb(var(--ios-theme-glass-border-color-rgb, var(--ios26-glass-border-color-rgb)))),linear-gradient(180deg, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 4%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.01) 8%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 16%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.027) 22%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.026) 28%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.018) 36%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 44%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 50%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.024) 58%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.008) 80%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.006) 88%, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0) 94%),linear-gradient(transparent, transparent);background-origin:border-box,padding-box,border-box;background-clip:border-area,padding-box,border-box}}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-buttons:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{display:flex;flex-direction:column;height:auto;min-height:0}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-buttons:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection>:is(ion-button,ion-menu-button):is(.ios,.md).ios-theme-vertical-bars-toolbar-action{display:block;width:44px;min-width:44px;height:46px;min-height:46px;margin:0 1px}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-toolbar-ready>ion-buttons:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection>:is(ion-button,ion-menu-button):is(.ios,.md).ios-theme-vertical-bars-toolbar-action::part(native){margin-inline:auto}ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-left>ion-back-button.ios-theme-vertical-bars-back-button-projection,ion-app.ios-theme-vertical-bars.ios-theme-vertical-bars-left>:is(.ios,.md).ios-theme-vertical-bars-toolbar-projection{right:auto;left:max(4px,(var(--ios-theme-vertical-bars-safe-area-left-resolved) - 46px)/2)}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EACL,wBAAwB,IAAI,qBAAqB,EACjD,wBAAwB,IAAI,qBAAqB,GAClD,MAAM,2BAA2B,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,oBAAoB,GAAI,eAAe,WAAW,KAAG,gBAAgB,GAAG,SAyBpF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EACL,wBAAwB,IAAI,qBAAqB,EACjD,wBAAwB,IAAI,qBAAqB,GAClD,MAAM,2BAA2B,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,eAAO,MAAM,oBAAoB,GAAI,eAAe,WAAW,KAAG,gBAAgB,GAAG,SAgCpF,CAAC"}
package/dist/index.js CHANGED
@@ -10,23 +10,30 @@ export const registerTabBarEffect = (targetElement) => {
10
10
  if (!targetElement.classList.contains('ios') || !win)
11
11
  return undefined;
12
12
  const reducedMotion = win.matchMedia('(prefers-reduced-motion: reduce)');
13
+ const verticalBarsRoot = targetElement.closest('ion-app');
13
14
  let effect;
14
15
  const update = () => {
15
16
  effect?.destroy();
16
- effect = reducedMotion.matches
17
- ? undefined
18
- : registerEffect(targetElement, 'ion-tab-button', 'tab-selected', {
19
- small: 'scale(1.1, 1)',
20
- medium: 'scale(1.2)',
21
- large: 'scale(1.15, 1.4)',
22
- xlarge: 'scale(1.3)',
23
- });
17
+ const isVertical = !!verticalBarsRoot?.classList.contains('ios-theme-vertical-bars') && !targetElement.closest('ion-menu, ion-modal, ion-popover');
18
+ effect =
19
+ reducedMotion.matches || isVertical
20
+ ? undefined
21
+ : registerEffect(targetElement, 'ion-tab-button', 'tab-selected', {
22
+ small: 'scale(1.1, 1)',
23
+ medium: 'scale(1.2)',
24
+ large: 'scale(1.15, 1.4)',
25
+ xlarge: 'scale(1.3)',
26
+ });
24
27
  };
25
28
  update();
26
29
  reducedMotion.addEventListener('change', update);
30
+ const placementObserver = new win.MutationObserver(update);
31
+ if (verticalBarsRoot)
32
+ placementObserver.observe(verticalBarsRoot, { attributes: true, attributeFilter: ['class'] });
27
33
  return {
28
34
  destroy: () => {
29
35
  reducedMotion.removeEventListener('change', update);
36
+ placementObserver.disconnect();
30
37
  effect?.destroy();
31
38
  effect = undefined;
32
39
  },
@@ -11,5 +11,6 @@ export type NativeUIShellComponent = (typeof components)[number]['tag'];
11
11
  export declare const selector: string;
12
12
  export declare const shadowSelector: string;
13
13
  export declare const motionSelector: string;
14
+ export declare const isVerticalBarsCandidate: (element: HTMLElement) => boolean;
14
15
  export declare const readCandidate: (element: HTMLElement, id: Identify) => Candidate | undefined;
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/native/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO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AO,MAAM,cAAc,QAMf,CAAC;AAEb,eAAO,MAAM,uBAAuB,mCAAuB,CAAC;AAE5D,eAAO,MAAM,aAAa,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAc9E,CAAC"}
@@ -5,7 +5,7 @@ import * as menuButton from './ion-menu-button';
5
5
  import * as tabBar from './ion-tab-bar';
6
6
  import * as segment from './ion-segment';
7
7
  import * as fab from './ion-fab';
8
- import { visible } from '../shared/dom';
8
+ import { isDisabledButtonGroupChild, isVerticalBarsSource, visible } from '../shared/dom';
9
9
  export const components = [button, buttons, backButton, menuButton, tabBar, segment, fab];
10
10
  export const selector = components
11
11
  .map((component) => ('selector' in component ? component.selector : component.tag))
@@ -22,11 +22,16 @@ export const motionSelector = [
22
22
  'ion-toolbar',
23
23
  ...components.filter((component) => 'tracksMotion' in component && component.tracksMotion).map((component) => component.tag),
24
24
  ].join(', ');
25
+ export const isVerticalBarsCandidate = isVerticalBarsSource;
25
26
  export const readCandidate = (element, id) => {
26
- if (!element.classList.contains('ios') || !visible(element) || element.closest('ion-modal, ion-popover'))
27
+ const verticalBars = isVerticalBarsCandidate(element);
28
+ if ((!element.classList.contains('ios') && !verticalBars) || !visible(element, verticalBars) || element.closest('ion-modal, ion-popover'))
27
29
  return;
28
30
  const style = getComputedStyle(element);
29
- if (!style.getPropertyValue('--ios-theme-glass-background-rgb').trim() && !style.getPropertyValue('--ios26-glass-background-rgb').trim())
31
+ if (!isDisabledButtonGroupChild(element) &&
32
+ !style.getPropertyValue('--ios-theme-glass-background-rgb').trim() &&
33
+ !style.getPropertyValue('--ios26-glass-background-rgb').trim() &&
34
+ !verticalBars)
30
35
  return;
31
36
  if (element.contains(element.ownerDocument.activeElement))
32
37
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ion-back-button.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-back-button.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,eAAO,MAAM,GAAG,oBAAoB,CAAC;AAErC,eAAO,MAAM,IAAI,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAMrE,CAAC"}
1
+ {"version":3,"file":"ion-back-button.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-back-button.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,eAAO,MAAM,GAAG,oBAAoB,CAAC;AAErC,eAAO,MAAM,IAAI,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAYrE,CAAC"}
@@ -1,9 +1,12 @@
1
1
  import { createCandidate, appendItem } from '../shared/candidate';
2
- import { inFixedToolbar } from '../shared/dom';
2
+ import { inFixedToolbar, isVerticalBarsSource } from '../shared/dom';
3
3
  export const tag = 'ion-back-button';
4
4
  export const read = (element, id) => {
5
5
  const button = element;
6
- if (!inFixedToolbar(element) || button.icon !== undefined || button.color !== undefined || !button.shadowRoot)
6
+ if (!button.shadowRoot ||
7
+ button.icon !== undefined ||
8
+ button.color !== undefined ||
9
+ (!isVerticalBarsSource(element) && !inFixedToolbar(element)))
7
10
  return;
8
11
  const candidate = createCandidate(element, tag, id);
9
12
  const label = button.shadowRoot.querySelector('[part="text"]')?.textContent?.trim() ?? '';
@@ -1 +1 @@
1
- {"version":3,"file":"ion-button.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-button.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,eAAO,MAAM,GAAG,eAAe,CAAC;AAEhC,eAAO,MAAM,IAAI,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAKrE,CAAC"}
1
+ {"version":3,"file":"ion-button.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-button.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,eAAO,MAAM,GAAG,eAAe,CAAC;AAEhC,eAAO,MAAM,IAAI,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAerE,CAAC"}
@@ -1,9 +1,17 @@
1
1
  import { createCandidate, appendItem } from '../shared/candidate';
2
- import { inFixedToolbar } from '../shared/dom';
2
+ import { inFixedToolbar, isVerticalBarsToolbarAction, isVerticalBarsToolbarGroup } from '../shared/dom';
3
3
  export const tag = 'ion-button';
4
4
  export const read = (element, id) => {
5
5
  const button = element;
6
- if (!inFixedToolbar(element) || button.fill !== 'default' || button.classList.contains('ion-color'))
6
+ const verticalBars = !element.closest('ion-menu, ion-modal, ion-popover') && !!element.closest('ion-app.ios-theme-vertical-bars');
7
+ if (verticalBars && element.parentElement && isVerticalBarsToolbarGroup(element.parentElement))
8
+ return;
9
+ const fill = button.fill ?? 'default';
10
+ if (!inFixedToolbar(element) ||
11
+ (verticalBars && !isVerticalBarsToolbarAction(element)) ||
12
+ (!verticalBars && fill !== 'default') ||
13
+ (verticalBars && !['default', 'clear'].includes(fill)) ||
14
+ button.classList.contains('ion-color'))
7
15
  return;
8
16
  const candidate = createCandidate(element, tag, id);
9
17
  return appendItem(candidate, element, id) ? candidate : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ion-buttons.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-buttons.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/D,eAAO,MAAM,GAAG,gBAAgB,CAAC;AACjC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,IAAI,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAqBrE,CAAC"}
1
+ {"version":3,"file":"ion-buttons.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-buttons.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/D,eAAO,MAAM,GAAG,gBAAgB,CAAC;AACjC,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,eAAO,MAAM,IAAI,GAAI,SAAS,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SA0BrE,CAAC"}
@@ -1,19 +1,27 @@
1
1
  import { createCandidate, appendItem } from '../shared/candidate';
2
- import { inFixedToolbar } from '../shared/dom';
2
+ import { childElements, verticalBarsToolbarActions, inFixedToolbar, isVerticalBarsToolbarGroup } from '../shared/dom';
3
3
  import * as menuButton from './ion-menu-button';
4
4
  export const tag = 'ion-buttons';
5
5
  export const tracksMotion = true;
6
6
  export const read = (element, id) => {
7
7
  if (!inFixedToolbar(element))
8
8
  return;
9
- const children = Array.from(element.children);
9
+ let children = childElements(element);
10
10
  if (children.length === 1)
11
11
  return menuButton.read(element, id);
12
+ const verticalBars = !element.closest('ion-menu, ion-modal, ion-popover') && !!element.closest('ion-app.ios-theme-vertical-bars');
13
+ if (verticalBars && !isVerticalBarsToolbarGroup(element))
14
+ return;
15
+ if (verticalBars)
16
+ children = verticalBarsToolbarActions(element);
12
17
  if (!children.length ||
13
- children.some((child) => !child.matches(`${menuButton.tag}.ios`) &&
14
- (!child.matches('ion-button.ios.button-clear') || child.fill !== 'clear')))
18
+ children.some((child) => !child.matches(`${menuButton.tag}${verticalBars ? '' : '.ios'}`) &&
19
+ (!child.matches(`ion-button${verticalBars ? '' : '.ios.button-clear'}`) ||
20
+ !(verticalBars ? ['default', 'clear'] : ['clear']).includes(child.fill ?? 'default'))))
15
21
  return;
16
22
  const candidate = createCandidate(element, tag, id);
23
+ if (verticalBars && children.length !== childElements(element).length)
24
+ candidate.sources = children;
17
25
  for (const child of children) {
18
26
  const supported = child.matches(menuButton.tag)
19
27
  ? menuButton.append(candidate, child, id)
@@ -1,4 +1,4 @@
1
- import { excluded, isDark, text } from '../shared/dom';
1
+ import { childElements, excluded, isDark, text } from '../shared/dom';
2
2
  import { iconSource } from '../shared/icons';
3
3
  export const tag = 'ion-fab';
4
4
  export const shadowSelector = 'ion-fab-button, ion-fab-list';
@@ -6,14 +6,14 @@ const hasHostMotion = (style) => style.animationName !== 'none' || style.transit
6
6
  export const read = (fab, id) => {
7
7
  if (fab.slot !== 'fixed' || !fab.parentElement?.matches('ion-content') || fab.contains(fab.ownerDocument.activeElement))
8
8
  return;
9
- const children = Array.from(fab.children);
9
+ const children = childElements(fab);
10
10
  const main = children.filter((child) => child.matches('ion-fab-button'));
11
11
  const lists = children.filter((child) => child.matches('ion-fab-list'));
12
12
  if (main.length !== 1 || main.length + lists.length !== children.length)
13
13
  return;
14
- if (lists.some((list) => list.closest(excluded) || Array.from(list.children).some((child) => !child.matches('ion-fab-button'))))
14
+ if (lists.some((list) => list.closest(excluded) || childElements(list).some((child) => !child.matches('ion-fab-button'))))
15
15
  return;
16
- const buttons = [main[0], ...lists.flatMap((list) => Array.from(list.children))];
16
+ const buttons = [main[0], ...lists.flatMap((list) => childElements(list))];
17
17
  const style = getComputedStyle(fab);
18
18
  if (hasHostMotion(style))
19
19
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ion-menu-button.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-menu-button.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,eAAO,MAAM,GAAG,oBAAoB,CAAC;AAErC,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,cAAc,oBAAM,CAAC;AAElC,eAAO,MAAM,MAAM,GAAI,WAAW,SAAS,EAAE,QAAQ,wBAAwB,EAAE,IAAI,QAAQ,KAAG,OAI7F,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,OAAO,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAMnE,CAAC"}
1
+ {"version":3,"file":"ion-menu-button.d.ts","sourceRoot":"","sources":["../../../src/native/components/ion-menu-button.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG/D,eAAO,MAAM,GAAG,oBAAoB,CAAC;AAErC,eAAO,MAAM,QAAQ,KAAK,CAAC;AAC3B,eAAO,MAAM,cAAc,oBAAM,CAAC;AAElC,eAAO,MAAM,MAAM,GAAI,WAAW,SAAS,EAAE,QAAQ,wBAAwB,EAAE,IAAI,QAAQ,KAAG,OAI7F,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,OAAO,WAAW,EAAE,IAAI,QAAQ,KAAG,SAAS,GAAG,SAOnE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { createCandidate, appendItem } from '../shared/candidate';
2
- import { inFixedToolbar } from '../shared/dom';
2
+ import { childElements, inFixedToolbar } from '../shared/dom';
3
3
  export const tag = 'ion-menu-button';
4
4
  export const selector = '';
5
5
  export const shadowSelector = tag;
@@ -10,10 +10,11 @@ export const append = (candidate, button, id) => {
10
10
  return !!content && !!appendItem(candidate, button, id, content);
11
11
  };
12
12
  export const read = (group, id) => {
13
- if (!inFixedToolbar(group) || !group.matches('ion-buttons') || group.children.length !== 1)
13
+ const children = group.matches('ion-buttons') ? childElements(group) : [];
14
+ if (!inFixedToolbar(group) || children.length !== 1)
14
15
  return;
15
- const button = group.firstElementChild;
16
- if (!button?.matches(`${tag}.ios`))
16
+ const button = children[0];
17
+ if (!button?.matches(`${tag}${group.closest('ion-app.ios-theme-vertical-bars') ? '' : '.ios'}`))
17
18
  return;
18
19
  const candidate = createCandidate(group, tag, id);
19
20
  return append(candidate, button, id) ? candidate : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"searchable-tabs.d.ts","sourceRoot":"","sources":["../../../src/native/components/searchable-tabs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAA0B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmB/E,eAAO,MAAM,mBAAmB,GAAI,KAAK,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,EAAE,UAAU,MAAM,IAAI;sBA8InF,OAAO;;yBAmBJ,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,SAAS,EAAE;yBAlJhE,mBAAmB;;mBA0U9B,mBAAmB,YAAY,MAAM;uBAKjC,mBAAmB,UAAU,OAAO;qBAUtC,WAAW;gBAGhB,MAAM,EAAE;iBASP,gBAAgB;oBAqCb,mBAAmB;;CAoBtC,CAAC"}
1
+ {"version":3,"file":"searchable-tabs.d.ts","sourceRoot":"","sources":["../../../src/native/components/searchable-tabs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAA0B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAmB/E,eAAO,MAAM,mBAAmB,GAAI,KAAK,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,EAAE,UAAU,MAAM,IAAI;sBA8InF,OAAO;;yBAmBJ,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,SAAS,EAAE;yBAlJhE,mBAAmB;;mBAkV9B,mBAAmB,YAAY,MAAM;uBAKjC,mBAAmB,UAAU,OAAO;qBAUtC,WAAW;gBAGhB,MAAM,EAAE;iBASP,gBAAgB;oBAqCb,mBAAmB;;CAoBtC,CAAC"}
@@ -184,7 +184,10 @@ export const createSearchSupport = (doc, id, schedule) => {
184
184
  };
185
185
  for (const binding of bindings) {
186
186
  const candidate = candidates.find((c) => c.element === binding.tabBar);
187
- if (!candidate || candidate.control.search || binding.tabBar.getAttribute('slot') !== 'bottom')
187
+ if (!candidate ||
188
+ candidate.control.search ||
189
+ candidate.control.placement === 'vertical-bars' ||
190
+ binding.tabBar.getAttribute('slot') !== 'bottom')
188
191
  continue;
189
192
  const fab = binding.trigger.parentElement;
190
193
  if (!fab?.matches('ion-fab[slot="fixed"]') ||
@@ -10,6 +10,7 @@ export interface NativeUIShellStatus {
10
10
  export interface NativeUIShellOptions {
11
11
  enabled?: boolean;
12
12
  controls?: NativeUIShellControls;
13
+ verticalBarsOnly?: boolean;
13
14
  }
14
15
  export interface NativeUIShellControls {
15
16
  tabs?: boolean;
@@ -22,6 +23,19 @@ export interface NativeUIShellHandle {
22
23
  suspend(): Promise<NativeUIShellSuspension>;
23
24
  destroy(): Promise<void>;
24
25
  }
26
+ export type VerticalBarEdge = 'leading' | 'trailing' | null;
27
+ export interface VerticalBarPlacement {
28
+ edge: VerticalBarEdge;
29
+ inset: number;
30
+ }
31
+ export declare enum HingeStatus {
32
+ Closed = "closed",
33
+ PartiallyOpen = "partiallyOpen",
34
+ FullyOpen = "fullyOpen"
35
+ }
36
+ export interface VerticalControlAreaHandle extends NativeUIShellHandle {
37
+ setPlacement(placement: VerticalBarEdge | VerticalBarPlacement, rtl?: boolean): void;
38
+ }
25
39
  export interface NativeUIShellSuspension {
26
40
  resume(): Promise<void>;
27
41
  }
@@ -63,6 +77,8 @@ export interface ShellItem extends Frame {
63
77
  export interface ShellControl extends Frame {
64
78
  id: string;
65
79
  kind: NativeUIShellComponent;
80
+ placement?: 'vertical-bars';
81
+ toolbarSlot?: 'start' | 'end';
66
82
  items: ShellItem[];
67
83
  dark: boolean;
68
84
  rtl: boolean;
@@ -96,6 +112,7 @@ export interface ShellSnapshot {
96
112
  revision: number;
97
113
  transitionDuration?: number;
98
114
  viewportWidth: number;
115
+ verticalBarEdge?: 'left' | 'right';
99
116
  controls: ShellControl[];
100
117
  }
101
118
  export interface ShellActivation {
@@ -106,11 +123,20 @@ export interface ShellActivation {
106
123
  export interface WebViewMetrics {
107
124
  radius: number;
108
125
  }
126
+ export interface DeviceLayout {
127
+ placement: VerticalBarPlacement;
128
+ hingeStatus: HingeStatus | null;
129
+ webViewMetrics: WebViewMetrics;
130
+ }
109
131
  export interface NativeUIShellPlugin {
110
- configure(): Promise<{
132
+ configure(options?: {
133
+ verticalBarsOnly?: boolean;
134
+ }): Promise<{
111
135
  supported: boolean;
112
136
  }>;
113
- getWebViewMetrics(): Promise<WebViewMetrics>;
137
+ getDeviceLayout(): Promise<DeviceLayout>;
138
+ startDeviceLayoutMonitoring(): Promise<void>;
139
+ stopDeviceLayoutMonitoring(): Promise<void>;
114
140
  update(snapshot: ShellSnapshot): Promise<{
115
141
  revision: number;
116
142
  rejectedSearches?: string[];
@@ -121,6 +147,6 @@ export interface NativeUIShellPlugin {
121
147
  }): Promise<void>;
122
148
  addListener(name: 'activate', listener: (event: ShellActivation) => void): Promise<PluginListenerHandle>;
123
149
  addListener(name: 'search', listener: (event: ShellSearchEvent) => void): Promise<PluginListenerHandle>;
124
- addListener(name: 'webViewMetricsChange', listener: (event: WebViewMetrics) => void): Promise<PluginListenerHandle>;
150
+ addListener(name: 'deviceLayoutChange', listener: (event: DeviceLayout) => void): Promise<PluginListenerHandle>;
125
151
  }
126
152
  //# sourceMappingURL=definitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/native/definitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,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AE,UAAU,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACzG,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACxG,WAAW,CAAC,IAAI,EAAE,oBAAoB,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;CACjH"}
@@ -1 +1,6 @@
1
- export {};
1
+ export var HingeStatus;
2
+ (function (HingeStatus) {
3
+ HingeStatus["Closed"] = "closed";
4
+ HingeStatus["PartiallyOpen"] = "partiallyOpen";
5
+ HingeStatus["FullyOpen"] = "fullyOpen";
6
+ })(HingeStatus || (HingeStatus = {}));
@@ -1,5 +1,9 @@
1
- import type { NativeUIShellHandle, NativeUIShellOptions, WebViewMetrics } from './definitions';
2
- export type { NativeUIShellComponent, NativeUIShellControls, NativeUIShellHandle, NativeUIShellOptions, NativeUIShellStatus, NativeUIShellSuspension, WebViewMetrics, } from './definitions';
1
+ import type { NativeUIShellHandle, NativeUIShellOptions, NativeUIShellPlugin, VerticalBarEdge, VerticalBarPlacement, VerticalControlAreaHandle, WebViewMetrics } from './definitions';
2
+ export type { NativeUIShellComponent, NativeUIShellControls, NativeUIShellHandle, NativeUIShellOptions, NativeUIShellStatus, NativeUIShellSuspension, DeviceLayout, VerticalBarEdge, VerticalBarPlacement, VerticalControlAreaHandle, WebViewMetrics, } from './definitions';
3
+ export { HingeStatus } from './definitions';
4
+ export declare const IonicNativeUIShell: NativeUIShellPlugin;
3
5
  export declare const configureNativeTransition: () => Promise<WebViewMetrics>;
6
+ export declare const setVerticalControlAreaPlacement: (placement: VerticalBarEdge | VerticalBarPlacement, rtl?: boolean) => void;
7
+ export declare const enableVerticalControlArea: () => Promise<VerticalControlAreaHandle>;
4
8
  export declare const enableNativeUIShell: (options?: NativeUIShellOptions) => Promise<NativeUIShellHandle>;
5
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAuB,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpH,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,GACf,MAAM,eAAe,CAAC;AAWvB,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,cAAc,CAIxE,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,UAAS,oBAAyB,KAAG,OAAO,CAAC,mBAAmB,CA8BnG,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,EACf,MAAM,eAAe,CAAC;AAIvB,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,yBAAyB,EACzB,cAAc,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,eAAO,MAAM,kBAAkB,qBAAS,CAAC;AAoEzC,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,cAAc,CAKxE,CAAC;AAYF,eAAO,MAAM,+BAA+B,GAAI,WAAW,eAAe,GAAG,oBAAoB,EAAE,MAAM,OAAO,KAAG,IASlH,CAAC;AAGF,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,yBAAyB,CAQnF,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,UAAS,oBAAyB,KAAG,OAAO,CAAC,mBAAmB,CA2FnG,CAAC"}
@@ -1,23 +1,100 @@
1
1
  import { Capacitor, registerPlugin } from '@capacitor/core';
2
2
  import { setConfig } from '../transition/ios.transition';
3
- import { bindMetricsLifecycle } from './lifecycle';
4
3
  import { createRuntime } from './runtime';
4
+ import { createVerticalBarsWebProjection } from './vertical-bars-web';
5
+ import { prehideVerticalBarsToolbarSources } from './prehide';
6
+ export { HingeStatus } from './definitions';
5
7
  const plugin = registerPlugin('IonicNativeUIShell');
8
+ export const IonicNativeUIShell = plugin;
6
9
  let active;
10
+ let activeConfiguration;
7
11
  const web = (reason) => ({
8
12
  getStatus: () => ({ state: 'web', projected: 0, updates: 0, reason }),
9
13
  suspend: async () => ({ resume: async () => { } }),
10
14
  destroy: async () => { },
11
15
  });
16
+ const combine = (native, fallback) => ({
17
+ getStatus() {
18
+ const nativeStatus = native.getStatus();
19
+ const fallbackStatus = fallback.getStatus();
20
+ return {
21
+ ...nativeStatus,
22
+ state: nativeStatus.state === 'stopped' && fallbackStatus.state === 'stopped' ? 'stopped' : nativeStatus.projected > 0 ? 'native' : 'web',
23
+ projected: nativeStatus.projected + fallbackStatus.projected,
24
+ updates: nativeStatus.updates + fallbackStatus.updates,
25
+ };
26
+ },
27
+ async suspend() {
28
+ const [nativeLease, fallbackLease] = await Promise.all([native.suspend(), fallback.suspend()]);
29
+ return { resume: async () => void (await Promise.all([nativeLease.resume(), fallbackLease.resume()])) };
30
+ },
31
+ async destroy() {
32
+ await Promise.all([native.destroy(), fallback.destroy()]);
33
+ },
34
+ });
35
+ const manage = (handle, lifecycle = {}) => {
36
+ let destroyed = false;
37
+ return {
38
+ getStatus: () => (lifecycle.reason ? { ...handle.getStatus(), reason: lifecycle.reason } : handle.getStatus()),
39
+ async suspend() {
40
+ const lease = await handle.suspend();
41
+ const resume = lifecycle.suspend?.();
42
+ return {
43
+ async resume() {
44
+ await lease.resume();
45
+ resume?.();
46
+ },
47
+ };
48
+ },
49
+ async destroy() {
50
+ if (destroyed)
51
+ return;
52
+ destroyed = true;
53
+ try {
54
+ await handle.destroy();
55
+ }
56
+ finally {
57
+ await lifecycle.destroy?.();
58
+ lifecycle.release?.();
59
+ }
60
+ },
61
+ };
62
+ };
12
63
  export const configureNativeTransition = async () => {
13
- const metrics = typeof document !== 'undefined' && Capacitor.getPlatform() === 'ios' ? await plugin.getWebViewMetrics() : { radius: 0 };
64
+ const metrics = typeof document !== 'undefined' && Capacitor.getPlatform() === 'ios' ? (await plugin.getDeviceLayout()).webViewMetrics : { radius: 0 };
14
65
  setConfig({ radius: metrics.radius });
15
66
  return metrics;
16
67
  };
68
+ const physicalVerticalBarEdge = (edge, rtl) => (edge === 'leading') !== rtl ? 'left' : 'right';
69
+ const elementRtl = (element) => element.closest('[dir]')?.getAttribute('dir') === 'rtl';
70
+ export const setVerticalControlAreaPlacement = (placement, rtl) => {
71
+ if (typeof document === 'undefined')
72
+ return;
73
+ const app = document.querySelector('ion-app');
74
+ if (!app)
75
+ throw new Error('Vertical Control Area requires ion-app');
76
+ const { edge, inset } = placement && typeof placement === 'object' ? placement : { edge: placement, inset: 0 };
77
+ app.classList.toggle('ios-theme-vertical-bars', edge !== null);
78
+ app.classList.toggle('ios-theme-vertical-bars-left', edge !== null && physicalVerticalBarEdge(edge, rtl ?? elementRtl(app)) === 'left');
79
+ if (edge && Number.isFinite(inset) && inset > 0)
80
+ app.style.setProperty('--ios-theme-vertical-bars-native-inset', `${inset}px`);
81
+ else
82
+ app.style.removeProperty('--ios-theme-vertical-bars-native-inset');
83
+ };
84
+ export const enableVerticalControlArea = async () => {
85
+ const handle = await enableNativeUIShell({ controls: { tabs: true, toolbar: true }, verticalBarsOnly: true });
86
+ return {
87
+ getStatus: () => handle.getStatus(),
88
+ suspend: () => handle.suspend(),
89
+ destroy: () => handle.destroy(),
90
+ setPlacement: setVerticalControlAreaPlacement,
91
+ };
92
+ };
17
93
  export const enableNativeUIShell = (options = {}) => {
18
94
  if (options.enabled === false) {
19
95
  const current = active;
20
96
  active = undefined;
97
+ activeConfiguration = undefined;
21
98
  return current
22
99
  ? current.then(async (handle) => {
23
100
  await handle.destroy();
@@ -25,21 +102,81 @@ export const enableNativeUIShell = (options = {}) => {
25
102
  })
26
103
  : Promise.resolve(web('Disabled'));
27
104
  }
28
- if (typeof document === 'undefined' || Capacitor.getPlatform() !== 'ios')
29
- return Promise.resolve(web('Requires Capacitor iOS'));
30
- return (active ?? (active = (async () => {
31
- try {
32
- await configureNativeTransition().catch(() => undefined);
33
- if (!(await plugin.configure()).supported) {
34
- active = undefined;
35
- return web('Requires iOS 26 or later');
36
- }
37
- const runtime = await createRuntime(document, plugin, options);
38
- return await bindMetricsLifecycle(runtime, () => plugin.addListener('webViewMetricsChange', (metrics) => setConfig({ radius: metrics.radius })), () => (active = undefined));
39
- }
40
- catch (error) {
105
+ if (typeof document === 'undefined')
106
+ return Promise.resolve(web('Requires a document'));
107
+ const controls = options.controls;
108
+ const configuration = JSON.stringify([
109
+ options.verticalBarsOnly === true,
110
+ ...['tabs', 'toolbar', 'segment', 'fab'].map((component) => !controls || controls[component] === true),
111
+ ]);
112
+ if (active && activeConfiguration !== configuration)
113
+ return Promise.reject(new Error('Native UI Shell is already running with different controls; destroy it before changing configuration.'));
114
+ if (active)
115
+ return active;
116
+ activeConfiguration = configuration;
117
+ const prehide = options.controls === undefined || options.controls.toolbar === true ? prehideVerticalBarsToolbarSources(document) : undefined;
118
+ let start;
119
+ const release = () => {
120
+ if (active === start) {
41
121
  active = undefined;
42
- return web(error instanceof Error ? error.message : String(error));
122
+ activeConfiguration = undefined;
43
123
  }
44
- })()));
124
+ };
125
+ const fallback = (reason) => manage(createVerticalBarsWebProjection(document, options), {
126
+ reason,
127
+ suspend: () => prehide?.suspend(),
128
+ destroy: () => prehide?.stop(),
129
+ release,
130
+ });
131
+ return (start = active =
132
+ (async () => {
133
+ if (Capacitor.getPlatform() !== 'ios')
134
+ return fallback('Requires Capacitor iOS');
135
+ let runtime;
136
+ let placementListener;
137
+ let monitoring = false;
138
+ try {
139
+ if (!options.verticalBarsOnly)
140
+ await configureNativeTransition().catch(() => undefined);
141
+ const capabilities = await plugin.configure({ verticalBarsOnly: options.verticalBarsOnly === true });
142
+ if (!capabilities.supported)
143
+ return fallback('Requires iOS 26 or later');
144
+ let nativeEdge = null;
145
+ const nativeVerticalBars = () => {
146
+ const root = document.querySelector('ion-app.ios-theme-vertical-bars');
147
+ if (!root)
148
+ return false;
149
+ const domEdge = root.classList.contains('ios-theme-vertical-bars-left') ? 'left' : 'right';
150
+ return nativeEdge === null || physicalVerticalBarEdge(nativeEdge, elementRtl(root)) === domEdge;
151
+ };
152
+ await plugin.startDeviceLayoutMonitoring();
153
+ monitoring = true;
154
+ placementListener = await plugin.addListener('deviceLayoutChange', ({ placement, webViewMetrics }) => {
155
+ nativeEdge = placement.edge;
156
+ if (!options.verticalBarsOnly)
157
+ setConfig({ radius: webViewMetrics.radius });
158
+ document.defaultView?.dispatchEvent(new Event('nativeUIShellRefresh'));
159
+ });
160
+ nativeEdge = (await plugin.getDeviceLayout()).placement.edge;
161
+ const native = await createRuntime(document, plugin, options, nativeVerticalBars, options.verticalBarsOnly === true);
162
+ runtime = combine(native, createVerticalBarsWebProjection(document, options, () => !nativeVerticalBars() || native.getStatus().state === 'stopped'));
163
+ return manage(runtime, {
164
+ suspend: () => prehide?.suspend(),
165
+ release,
166
+ destroy: async () => {
167
+ await placementListener?.remove().catch(() => { });
168
+ if (monitoring)
169
+ await plugin.stopDeviceLayoutMonitoring().catch(() => { });
170
+ prehide?.stop();
171
+ },
172
+ });
173
+ }
174
+ catch (error) {
175
+ await runtime?.destroy();
176
+ await placementListener?.remove().catch(() => { });
177
+ if (monitoring)
178
+ await plugin.stopDeviceLayoutMonitoring().catch(() => { });
179
+ return fallback(error instanceof Error ? error.message : String(error));
180
+ }
181
+ })());
45
182
  };