@multiplatform.one/components 7.59.0 → 7.61.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 (308) hide show
  1. package/dist/cjs/appShell/BottomAccessory.cjs +43 -0
  2. package/dist/cjs/appShell/BottomAccessory.native.js +53 -0
  3. package/dist/cjs/appShell/BottomAccessory.native.js.map +1 -0
  4. package/dist/cjs/appShell/TabBar.cjs +99 -17
  5. package/dist/cjs/appShell/TabBar.native.js +109 -17
  6. package/dist/cjs/appShell/TabBar.native.js.map +1 -1
  7. package/dist/cjs/appShell/bottomChrome.cjs +76 -0
  8. package/dist/cjs/appShell/bottomChrome.native.js +110 -0
  9. package/dist/cjs/appShell/bottomChrome.native.js.map +1 -0
  10. package/dist/cjs/appShell/bottomInset.cjs +30 -0
  11. package/dist/cjs/appShell/bottomInset.native.js +34 -0
  12. package/dist/cjs/appShell/bottomInset.native.js.map +1 -0
  13. package/dist/cjs/appShell/index.cjs +13 -1
  14. package/dist/cjs/appShell/index.native.js +12 -0
  15. package/dist/cjs/appShell/index.native.js.map +1 -1
  16. package/dist/cjs/formLayouts/FormLayouts.cjs +540 -0
  17. package/dist/cjs/formLayouts/FormLayouts.native.js +571 -0
  18. package/dist/cjs/formLayouts/FormLayouts.native.js.map +1 -0
  19. package/dist/cjs/formLayouts/PreferencePanel.cjs +215 -0
  20. package/dist/cjs/formLayouts/PreferencePanel.native.js +237 -0
  21. package/dist/cjs/formLayouts/PreferencePanel.native.js.map +1 -0
  22. package/dist/cjs/formLayouts/index.cjs +36 -0
  23. package/dist/cjs/formLayouts/index.native.js +39 -0
  24. package/dist/cjs/formLayouts/index.native.js.map +1 -0
  25. package/dist/cjs/index.cjs +1 -0
  26. package/dist/cjs/index.native.js +1 -0
  27. package/dist/cjs/index.native.js.map +1 -1
  28. package/dist/cjs/layouts/page.cjs +11 -3
  29. package/dist/cjs/layouts/page.native.js +11 -3
  30. package/dist/cjs/layouts/page.native.js.map +1 -1
  31. package/dist/esm/Accordion/index.native.js.map +1 -1
  32. package/dist/esm/AnimateHeight/index.native.js.map +1 -1
  33. package/dist/esm/Avatar/getInitials.native.js.map +1 -1
  34. package/dist/esm/Avatar/index.native.js.map +1 -1
  35. package/dist/esm/Badge/index.native.js.map +1 -1
  36. package/dist/esm/Button.native.js.map +1 -1
  37. package/dist/esm/Carousel/index.native.js.map +1 -1
  38. package/dist/esm/Chip/index.native.js.map +1 -1
  39. package/dist/esm/Collapsible.native.js.map +1 -1
  40. package/dist/esm/ContextMenu/index.native.js.map +1 -1
  41. package/dist/esm/CopyField/index.native.js.map +1 -1
  42. package/dist/esm/Dialog.native.js.map +1 -1
  43. package/dist/esm/DotIndicator/index.native.js.map +1 -1
  44. package/dist/esm/DropdownMenu/index.native.js.map +1 -1
  45. package/dist/esm/ErrorBoundary/index.native.js.map +1 -1
  46. package/dist/esm/Heading.native.js.map +1 -1
  47. package/dist/esm/Meter/index.native.js.map +1 -1
  48. package/dist/esm/Meter/meter.native.js.map +1 -1
  49. package/dist/esm/OverflowRow/index.native.js.map +1 -1
  50. package/dist/esm/Pagination.native.js.map +1 -1
  51. package/dist/esm/Popover.native.js.map +1 -1
  52. package/dist/esm/ProgressSteps/index.native.js.map +1 -1
  53. package/dist/esm/Quote/index.native.js.map +1 -1
  54. package/dist/esm/ScrollView/revealFocusedField.native.js.map +1 -1
  55. package/dist/esm/Separator/index.native.js.map +1 -1
  56. package/dist/esm/Sheet.native.js.map +1 -1
  57. package/dist/esm/SheetModal/SheetHeader.native.js.map +1 -1
  58. package/dist/esm/SheetModal/detents.native.js.map +1 -1
  59. package/dist/esm/SheetModal/useSheetFrameFocus.native.js.map +1 -1
  60. package/dist/esm/Skeleton/index.native.js.map +1 -1
  61. package/dist/esm/SkipLink/index.native.js.map +1 -1
  62. package/dist/esm/SortableList/SortableHandle.native.js.map +1 -1
  63. package/dist/esm/SortableList/index.native.js.map +1 -1
  64. package/dist/esm/SortableList/useSortableRows.native.js.map +1 -1
  65. package/dist/esm/Tabs/index.native.js.map +1 -1
  66. package/dist/esm/Text.native.js.map +1 -1
  67. package/dist/esm/ThemePresetPicker/index.native.js.map +1 -1
  68. package/dist/esm/Toast/index.native.js.map +1 -1
  69. package/dist/esm/Toast/store.native.js.map +1 -1
  70. package/dist/esm/Tooltip/nativePress.native.js.map +1 -1
  71. package/dist/esm/Tooltip/tooltipShared.native.js.map +1 -1
  72. package/dist/esm/TreeSelect/index.native.js.map +1 -1
  73. package/dist/esm/TreeSelect/treeSelectModel.native.js.map +1 -1
  74. package/dist/esm/Video/PlayerChrome.native.js.map +1 -1
  75. package/dist/esm/Video/VideoFrame.native.js.map +1 -1
  76. package/dist/esm/Video/types.native.js.map +1 -1
  77. package/dist/esm/Wheel/index.native.js.map +1 -1
  78. package/dist/esm/Wizard/index.native.js.map +1 -1
  79. package/dist/esm/actions/ActionBar.native.js.map +1 -1
  80. package/dist/esm/actions/DangerSection.native.js.map +1 -1
  81. package/dist/esm/actions/DestructiveAction.native.js.map +1 -1
  82. package/dist/esm/actions/HeaderActions.native.js.map +1 -1
  83. package/dist/esm/actions/devWarn.native.js.map +1 -1
  84. package/dist/esm/actions/index.native.js.map +1 -1
  85. package/dist/esm/actions/severity.native.js.map +1 -1
  86. package/dist/esm/appShell/BottomAccessory.mjs +18 -0
  87. package/dist/esm/appShell/BottomAccessory.mjs.map +1 -0
  88. package/dist/esm/appShell/BottomAccessory.native.js +25 -0
  89. package/dist/esm/appShell/BottomAccessory.native.js.map +1 -0
  90. package/dist/esm/appShell/Dock.native.js.map +1 -1
  91. package/dist/esm/appShell/ScopeMenu.native.js.map +1 -1
  92. package/dist/esm/appShell/SettingsSplit.native.js.map +1 -1
  93. package/dist/esm/appShell/Springboard.native.js.map +1 -1
  94. package/dist/esm/appShell/SystemBar.native.js.map +1 -1
  95. package/dist/esm/appShell/TabBar.mjs +99 -20
  96. package/dist/esm/appShell/TabBar.mjs.map +1 -1
  97. package/dist/esm/appShell/TabBar.native.js +109 -20
  98. package/dist/esm/appShell/TabBar.native.js.map +1 -1
  99. package/dist/esm/appShell/appTile.native.js.map +1 -1
  100. package/dist/esm/appShell/bottomChrome.mjs +46 -0
  101. package/dist/esm/appShell/bottomChrome.mjs.map +1 -0
  102. package/dist/esm/appShell/bottomChrome.native.js +77 -0
  103. package/dist/esm/appShell/bottomChrome.native.js.map +1 -0
  104. package/dist/esm/appShell/bottomInset.mjs +5 -0
  105. package/dist/esm/appShell/bottomInset.mjs.map +1 -0
  106. package/dist/esm/appShell/bottomInset.native.js +6 -0
  107. package/dist/esm/appShell/bottomInset.native.js.map +1 -0
  108. package/dist/esm/appShell/index.mjs +3 -0
  109. package/dist/esm/appShell/index.mjs.map +1 -1
  110. package/dist/esm/appShell/index.native.js +3 -0
  111. package/dist/esm/appShell/index.native.js.map +1 -1
  112. package/dist/esm/charts/Axis.native.js.map +1 -1
  113. package/dist/esm/charts/BarChart.native.js.map +1 -1
  114. package/dist/esm/charts/ChartDataView.native.js.map +1 -1
  115. package/dist/esm/charts/ChartSurface.native.js.map +1 -1
  116. package/dist/esm/charts/LineChart.native.js.map +1 -1
  117. package/dist/esm/charts/PieChart.native.js.map +1 -1
  118. package/dist/esm/charts/Sparkline.native.js.map +1 -1
  119. package/dist/esm/charts/accessibility.native.js.map +1 -1
  120. package/dist/esm/charts/chartHeight.native.js.map +1 -1
  121. package/dist/esm/charts/composeChart.native.js.map +1 -1
  122. package/dist/esm/charts/index.native.js.map +1 -1
  123. package/dist/esm/charts/math.native.js.map +1 -1
  124. package/dist/esm/charts/series.native.js.map +1 -1
  125. package/dist/esm/charts/svg.native.js.map +1 -1
  126. package/dist/esm/charts/types.native.js.map +1 -1
  127. package/dist/esm/charts/useChartTheme.native.js.map +1 -1
  128. package/dist/esm/code/Code/index.native.js.map +1 -1
  129. package/dist/esm/code/CodeBlock/index.native.js.map +1 -1
  130. package/dist/esm/code/HighlightedCode/index.native.js.map +1 -1
  131. package/dist/esm/code/Highlighter/houseSyntaxTheme.native.js.map +1 -1
  132. package/dist/esm/code/Highlighter/index.native.js.map +1 -1
  133. package/dist/esm/code/Highlighter/namedGroupMatchAll.native.js.map +1 -1
  134. package/dist/esm/code/Pre/index.native.js.map +1 -1
  135. package/dist/esm/code/index.native.js.map +1 -1
  136. package/dist/esm/componentColors.native.js.map +1 -1
  137. package/dist/esm/feedback/ConfirmDialog.native.js.map +1 -1
  138. package/dist/esm/feedback/NotifyHost.native.js.map +1 -1
  139. package/dist/esm/feedback/copy.native.js.map +1 -1
  140. package/dist/esm/feedback/index.native.js.map +1 -1
  141. package/dist/esm/feedback/notify.native.js.map +1 -1
  142. package/dist/esm/feedback/route.native.js.map +1 -1
  143. package/dist/esm/feedback/store.native.js.map +1 -1
  144. package/dist/esm/formLayouts/FormLayouts.mjs +509 -0
  145. package/dist/esm/formLayouts/FormLayouts.mjs.map +1 -0
  146. package/dist/esm/formLayouts/FormLayouts.native.js +537 -0
  147. package/dist/esm/formLayouts/FormLayouts.native.js.map +1 -0
  148. package/dist/esm/formLayouts/PreferencePanel.mjs +190 -0
  149. package/dist/esm/formLayouts/PreferencePanel.mjs.map +1 -0
  150. package/dist/esm/formLayouts/PreferencePanel.native.js +209 -0
  151. package/dist/esm/formLayouts/PreferencePanel.native.js.map +1 -0
  152. package/dist/esm/formLayouts/index.mjs +4 -0
  153. package/dist/esm/formLayouts/index.mjs.map +1 -0
  154. package/dist/esm/formLayouts/index.native.js +4 -0
  155. package/dist/esm/formLayouts/index.native.js.map +1 -0
  156. package/dist/esm/hooks/index.native.js.map +1 -1
  157. package/dist/esm/hooks/useClipboard.native.js.map +1 -1
  158. package/dist/esm/hooks/useDocumentTitle.native.js.map +1 -1
  159. package/dist/esm/icons/CheckRegular.native.js.map +1 -1
  160. package/dist/esm/icons/MinusRegular.native.js.map +1 -1
  161. package/dist/esm/icons/index.native.js.map +1 -1
  162. package/dist/esm/icons/lucide.native.js.map +1 -1
  163. package/dist/esm/icons/themed.native.js.map +1 -1
  164. package/dist/esm/images/Image/ImageFrame.native.js.map +1 -1
  165. package/dist/esm/images/Image/shared.native.js.map +1 -1
  166. package/dist/esm/images/Image/types.native.js.map +1 -1
  167. package/dist/esm/images/index.native.js.map +1 -1
  168. package/dist/esm/index.mjs +1 -0
  169. package/dist/esm/index.mjs.map +1 -1
  170. package/dist/esm/index.native.js +1 -0
  171. package/dist/esm/index.native.js.map +1 -1
  172. package/dist/esm/knobImmuneExports.native.js.map +1 -1
  173. package/dist/esm/layouts/AsyncBoundary.native.js.map +1 -1
  174. package/dist/esm/layouts/Debug/index.native.js.map +1 -1
  175. package/dist/esm/layouts/EmptyState.native.js.map +1 -1
  176. package/dist/esm/layouts/IdentityPlate.native.js.map +1 -1
  177. package/dist/esm/layouts/KeyboardAvoidingWrapper/behavior.native.js.map +1 -1
  178. package/dist/esm/layouts/PageTemplates.native.js.map +1 -1
  179. package/dist/esm/layouts/PaneScaffold.native.js.map +1 -1
  180. package/dist/esm/layouts/SafeAreaWrapper/insets.native.js.map +1 -1
  181. package/dist/esm/layouts/StatusDot.native.js.map +1 -1
  182. package/dist/esm/layouts/ViewSwitcher.native.js.map +1 -1
  183. package/dist/esm/layouts/attachments.native.js.map +1 -1
  184. package/dist/esm/layouts/breadcrumbs.native.js.map +1 -1
  185. package/dist/esm/layouts/index.native.js.map +1 -1
  186. package/dist/esm/layouts/page.mjs +11 -3
  187. package/dist/esm/layouts/page.mjs.map +1 -1
  188. package/dist/esm/layouts/page.native.js +11 -3
  189. package/dist/esm/layouts/page.native.js.map +1 -1
  190. package/dist/esm/layouts/pageHeadingScope.native.js.map +1 -1
  191. package/dist/esm/layouts/screenScroll.native.js.map +1 -1
  192. package/dist/esm/layouts/shellSidebarSlot.native.js.map +1 -1
  193. package/dist/esm/layouts/sidebar.native.js.map +1 -1
  194. package/dist/esm/layouts/tags.native.js.map +1 -1
  195. package/dist/esm/layouts/timeline.native.js.map +1 -1
  196. package/dist/esm/layouts/toolbar.native.js.map +1 -1
  197. package/dist/esm/shared/actionScan.native.js.map +1 -1
  198. package/dist/esm/shared/i18n.native.js.map +1 -1
  199. package/dist/esm/shared/restoreRetries.native.js.map +1 -1
  200. package/dist/esm/shared/t.native.js.map +1 -1
  201. package/dist/esm/shared/textRidesText.native.js.map +1 -1
  202. package/dist/esm/shared/useReturnFocusOnClose.native.js.map +1 -1
  203. package/dist/esm/surfaces.native.js.map +1 -1
  204. package/dist/esm/tamagui.native.js.map +1 -1
  205. package/dist/esm/testSetup.native.js.map +1 -1
  206. package/dist/esm/utils/setTinted.native.js.map +1 -1
  207. package/dist/esm/utils/unwrapText.native.js.map +1 -1
  208. package/dist/esm/views/Calendar.native.js.map +1 -1
  209. package/dist/esm/views/Dashboard.native.js.map +1 -1
  210. package/dist/esm/views/Gantt.native.js.map +1 -1
  211. package/dist/esm/views/GanttDateGrip.native.js.map +1 -1
  212. package/dist/esm/views/ImageGrid.native.js.map +1 -1
  213. package/dist/esm/views/List.native.js.map +1 -1
  214. package/dist/esm/views/Matrix.native.js.map +1 -1
  215. package/dist/esm/views/ReportBuilder.native.js.map +1 -1
  216. package/dist/esm/views/TreeView.native.js.map +1 -1
  217. package/dist/esm/views/calendarMath.native.js.map +1 -1
  218. package/dist/esm/views/ganttIntervals.native.js.map +1 -1
  219. package/dist/esm/views/ganttMath.native.js.map +1 -1
  220. package/dist/esm/views/index.native.js.map +1 -1
  221. package/dist/esm/views/kanbanDnd.native.js.map +1 -1
  222. package/dist/esm/views/matrixMath.native.js.map +1 -1
  223. package/dist/esm/views/treeViewDnd.native.js.map +1 -1
  224. package/dist/esm/views/treeViewLayout.native.js.map +1 -1
  225. package/dist/esm/views/treeViewMotion.native.js.map +1 -1
  226. package/dist/esm/views/treeViewReveal.native.js.map +1 -1
  227. package/dist/jsx/appShell/BottomAccessory.mjs +18 -0
  228. package/dist/jsx/appShell/BottomAccessory.mjs.map +1 -0
  229. package/dist/jsx/appShell/BottomAccessory.native.js +53 -0
  230. package/dist/jsx/appShell/BottomAccessory.native.js.map +1 -0
  231. package/dist/jsx/appShell/TabBar.mjs +99 -20
  232. package/dist/jsx/appShell/TabBar.mjs.map +1 -1
  233. package/dist/jsx/appShell/TabBar.native.js +109 -17
  234. package/dist/jsx/appShell/TabBar.native.js.map +1 -1
  235. package/dist/jsx/appShell/bottomChrome.mjs +46 -0
  236. package/dist/jsx/appShell/bottomChrome.mjs.map +1 -0
  237. package/dist/jsx/appShell/bottomChrome.native.js +110 -0
  238. package/dist/jsx/appShell/bottomChrome.native.js.map +1 -0
  239. package/dist/jsx/appShell/bottomInset.mjs +5 -0
  240. package/dist/jsx/appShell/bottomInset.mjs.map +1 -0
  241. package/dist/jsx/appShell/bottomInset.native.js +34 -0
  242. package/dist/jsx/appShell/bottomInset.native.js.map +1 -0
  243. package/dist/jsx/appShell/index.mjs +3 -0
  244. package/dist/jsx/appShell/index.mjs.map +1 -1
  245. package/dist/jsx/appShell/index.native.js +12 -0
  246. package/dist/jsx/appShell/index.native.js.map +1 -1
  247. package/dist/jsx/formLayouts/FormLayouts.mjs +509 -0
  248. package/dist/jsx/formLayouts/FormLayouts.mjs.map +1 -0
  249. package/dist/jsx/formLayouts/FormLayouts.native.js +571 -0
  250. package/dist/jsx/formLayouts/FormLayouts.native.js.map +1 -0
  251. package/dist/jsx/formLayouts/PreferencePanel.mjs +190 -0
  252. package/dist/jsx/formLayouts/PreferencePanel.mjs.map +1 -0
  253. package/dist/jsx/formLayouts/PreferencePanel.native.js +237 -0
  254. package/dist/jsx/formLayouts/PreferencePanel.native.js.map +1 -0
  255. package/dist/jsx/formLayouts/index.mjs +4 -0
  256. package/dist/jsx/formLayouts/index.mjs.map +1 -0
  257. package/dist/jsx/formLayouts/index.native.js +39 -0
  258. package/dist/jsx/formLayouts/index.native.js.map +1 -0
  259. package/dist/jsx/index.js +1 -0
  260. package/dist/jsx/index.js.map +1 -1
  261. package/dist/jsx/index.mjs +1 -0
  262. package/dist/jsx/index.mjs.map +1 -1
  263. package/dist/jsx/index.native.js +1 -0
  264. package/dist/jsx/index.native.js.map +1 -1
  265. package/dist/jsx/layouts/page.mjs +11 -3
  266. package/dist/jsx/layouts/page.mjs.map +1 -1
  267. package/dist/jsx/layouts/page.native.js +11 -3
  268. package/dist/jsx/layouts/page.native.js.map +1 -1
  269. package/package.json +9 -9
  270. package/src/appShell/BottomAccessory.tsx +18 -0
  271. package/src/appShell/TabBar.spec.tsx +97 -26
  272. package/src/appShell/TabBar.stories.tsx +24 -6
  273. package/src/appShell/TabBar.tsx +158 -32
  274. package/src/appShell/bottomChrome.ts +68 -0
  275. package/src/appShell/bottomInset.native.ts +6 -0
  276. package/src/appShell/bottomInset.ts +7 -0
  277. package/src/appShell/index.ts +2 -0
  278. package/src/formLayouts/FormLayouts.spec.tsx +85 -0
  279. package/src/formLayouts/FormLayouts.stories.tsx +128 -0
  280. package/src/formLayouts/FormLayouts.tsx +530 -0
  281. package/src/formLayouts/PreferencePanel.spec.tsx +45 -0
  282. package/src/formLayouts/PreferencePanel.tsx +263 -0
  283. package/src/formLayouts/formLayouts.designLaw.spec.ts +78 -0
  284. package/src/formLayouts/index.ts +26 -0
  285. package/src/index.ts +1 -0
  286. package/src/layouts/Screen.chromeClearance.spec.tsx +41 -0
  287. package/src/layouts/page.tsx +16 -0
  288. package/types/appShell/BottomAccessory.d.ts +11 -0
  289. package/types/appShell/BottomAccessory.d.ts.map +1 -0
  290. package/types/appShell/TabBar.d.ts +32 -10
  291. package/types/appShell/TabBar.d.ts.map +1 -1
  292. package/types/appShell/bottomChrome.d.ts +22 -0
  293. package/types/appShell/bottomChrome.d.ts.map +1 -0
  294. package/types/appShell/bottomInset.d.ts +6 -0
  295. package/types/appShell/bottomInset.d.ts.map +1 -0
  296. package/types/appShell/bottomInset.native.d.ts +3 -0
  297. package/types/appShell/bottomInset.native.d.ts.map +1 -0
  298. package/types/appShell/index.d.ts +2 -0
  299. package/types/appShell/index.d.ts.map +1 -1
  300. package/types/formLayouts/FormLayouts.d.ts +74 -0
  301. package/types/formLayouts/FormLayouts.d.ts.map +1 -0
  302. package/types/formLayouts/PreferencePanel.d.ts +74 -0
  303. package/types/formLayouts/PreferencePanel.d.ts.map +1 -0
  304. package/types/formLayouts/index.d.ts +5 -0
  305. package/types/formLayouts/index.d.ts.map +1 -0
  306. package/types/index.d.ts +1 -0
  307. package/types/index.d.ts.map +1 -1
  308. package/types/layouts/page.d.ts.map +1 -1
@@ -0,0 +1,263 @@
1
+ import type { ReactNode } from "react";
2
+ import { RadioGroup, Switch } from "@multiplatform.one/forms";
3
+ import { useResolvedKnobs } from "@multiplatform.one/theme";
4
+ import {
5
+ ListItem,
6
+ Theme,
7
+ View,
8
+ YStack,
9
+ type FontSizeTokens,
10
+ type SizeTokens,
11
+ type ViewProps,
12
+ } from "tamagui";
13
+ import { Alert, type AlertIntent } from "../Alert";
14
+ import { Card } from "../Card";
15
+ import { H3, Heading } from "../Heading";
16
+ import { Separator } from "../Separator";
17
+ import { Paragraph, Text } from "../Text";
18
+
19
+ // ---------------------------------------------------------------------------
20
+ // Types
21
+ // ---------------------------------------------------------------------------
22
+
23
+ export interface PreferenceToggleItem {
24
+ type: "toggle";
25
+ /** Unique key for the preference. */
26
+ key: string;
27
+ /** Display label. */
28
+ label: string;
29
+ /** Optional description text. */
30
+ description?: string;
31
+ /** Current value. */
32
+ value: boolean;
33
+ /** Called when the toggle changes. */
34
+ onValueChange: (value: boolean) => void;
35
+ }
36
+
37
+ export interface PreferenceRadioItem {
38
+ type: "radio";
39
+ /** Unique key for the preference. */
40
+ key: string;
41
+ /** Display label. */
42
+ label: string;
43
+ /** Optional description text. */
44
+ description?: string;
45
+ /** Radio options. */
46
+ options: { label: string; value: string }[];
47
+ /** Currently selected value. */
48
+ value: string;
49
+ /** Called when the selection changes. */
50
+ onValueChange: (value: string) => void;
51
+ }
52
+
53
+ export interface PreferenceCustomItem {
54
+ type: "custom";
55
+ /** Unique key for the preference. */
56
+ key: string;
57
+ /** Display label. */
58
+ label: string;
59
+ /** Optional description text. */
60
+ description?: string;
61
+ /** Custom content rendered on the trailing side. */
62
+ content: ReactNode;
63
+ }
64
+
65
+ export type PreferenceItem = PreferenceToggleItem | PreferenceRadioItem | PreferenceCustomItem;
66
+
67
+ export interface PreferenceSection {
68
+ /** Section heading. */
69
+ title: string;
70
+ /** Optional section icon. */
71
+ icon?: ReactNode;
72
+ /** Optional section description. */
73
+ description?: string;
74
+ /** Optional informational banner rendered after the items. */
75
+ banner?: { message: string; theme?: string };
76
+ /** Preference items in this section. */
77
+ items: PreferenceItem[];
78
+ }
79
+
80
+ export interface PreferencePanelProps extends Omit<ViewProps, "size"> {
81
+ /** Control size forwarded to every row's switch and radio group. Default `$3`. */
82
+ size?: SizeTokens;
83
+ /** Panel heading. Defaults to "Preferences". */
84
+ title?: string;
85
+ /** Optional subtitle. */
86
+ subtitle?: string;
87
+ /** Sections of preference items. */
88
+ sections: PreferenceSection[];
89
+ /** Footer actions (e.g. Save / Cancel). */
90
+ footer?: ReactNode;
91
+ }
92
+
93
+ const alertIntents: readonly AlertIntent[] = ["info", "success", "warning", "error"];
94
+
95
+ function bannerIntent(theme = "success"): AlertIntent {
96
+ return alertIntents.find((intent) => intent === theme) ?? "info";
97
+ }
98
+
99
+ // ---------------------------------------------------------------------------
100
+ // Internal: Preference row renderers
101
+ // ---------------------------------------------------------------------------
102
+
103
+ function ToggleRow({ item }: { item: PreferenceToggleItem; size: SizeTokens }) {
104
+ return (
105
+ <ListItem
106
+ title={item.label}
107
+ subTitle={item.description}
108
+ backgroundColor="transparent"
109
+ iconAfter={
110
+ <Switch
111
+ checked={item.value}
112
+ onChange={item.onValueChange}
113
+ switchProps={{ "aria-label": item.label }}
114
+ />
115
+ }
116
+ pressStyle={{ opacity: 0.8 }}
117
+ onPress={() => item.onValueChange(!item.value)}
118
+ />
119
+ );
120
+ }
121
+
122
+ function RadioRow({ item, size }: { item: PreferenceRadioItem; size: SizeTokens }) {
123
+ const { knobProps } = useResolvedKnobs();
124
+ return (
125
+ <View flexDirection="column" {...knobProps.gap}>
126
+ <Text {...knobProps.body}>{item.label}</Text>
127
+ {item.description && (
128
+ <Theme name="alt1">
129
+ <Paragraph size="$2">{item.description}</Paragraph>
130
+ </Theme>
131
+ )}
132
+ <RadioGroup
133
+ value={item.value}
134
+ onChange={item.onValueChange}
135
+ size={size}
136
+ options={item.options}
137
+ />
138
+ </View>
139
+ );
140
+ }
141
+
142
+ function CustomRow({ item }: { item: PreferenceCustomItem }) {
143
+ return (
144
+ <ListItem title={item.label} subTitle={item.description} iconAfter={item.content as any} />
145
+ );
146
+ }
147
+
148
+ function PreferenceRow({ item, size }: { item: PreferenceItem; size: SizeTokens }) {
149
+ switch (item.type) {
150
+ case "toggle":
151
+ return <ToggleRow item={item} size={size} />;
152
+ case "radio":
153
+ return <RadioRow item={item} size={size} />;
154
+ case "custom":
155
+ return <CustomRow item={item} />;
156
+ }
157
+ }
158
+
159
+ /**
160
+ * A section's rows grouped in one box. It sits inside the panel's Card, a
161
+ * painted ancestor, so `elevatedSurface` resolves border only: nested
162
+ * surfaces never re-elevate.
163
+ */
164
+ function SectionGroup({ children }: { children?: ReactNode }) {
165
+ const { knobProps } = useResolvedKnobs();
166
+ return (
167
+ <YStack
168
+ testID="preference-section-group"
169
+ overflow="hidden"
170
+ {...knobProps.elevatedSurface}
171
+ {...knobProps.containerRadius}
172
+ >
173
+ {children}
174
+ </YStack>
175
+ );
176
+ }
177
+
178
+ // ---------------------------------------------------------------------------
179
+ // PreferencePanel
180
+ // ---------------------------------------------------------------------------
181
+
182
+ export function PreferencePanel({
183
+ title = "Preferences",
184
+ subtitle,
185
+ sections,
186
+ footer,
187
+ size = "$3",
188
+ ...props
189
+ }: PreferencePanelProps) {
190
+ const { knobProps } = useResolvedKnobs();
191
+ const inset = knobProps.panelPadding.padding;
192
+
193
+ return (
194
+ <Card
195
+ {...knobProps.surface}
196
+ paddingVertical={inset}
197
+ paddingHorizontal={0}
198
+ width="100%"
199
+ maxWidth={560}
200
+ alignSelf="center"
201
+ {...knobProps.gap}
202
+ $sm={{ maxWidth: "100%" }}
203
+ size={size}
204
+ {...props}
205
+ >
206
+ {/* Header */}
207
+ <View flexDirection="column" gap="$1" paddingHorizontal={inset}>
208
+ <H3 fontWeight="700" color="$color12">
209
+ {title}
210
+ </H3>
211
+ {subtitle && (
212
+ <Theme name="alt1">
213
+ <Paragraph size="$3">{subtitle}</Paragraph>
214
+ </Theme>
215
+ )}
216
+ </View>
217
+ <Separator />
218
+
219
+ {/* Sections */}
220
+ {sections.map((section, si) => (
221
+ <View key={section.title} flexDirection="column" {...knobProps.gap}>
222
+ <View flexDirection="column" {...knobProps.gap} paddingHorizontal={inset}>
223
+ <View flexDirection="row" alignItems="center" {...knobProps.gap}>
224
+ {section.icon}
225
+ <Heading margin={0} size={knobProps.sizeToken as FontSizeTokens} color="$color12">
226
+ {section.title}
227
+ </Heading>
228
+ </View>
229
+ {section.description && (
230
+ <Theme name="alt1">
231
+ <Paragraph size="$2" paddingHorizontal="$1">
232
+ {section.description}
233
+ </Paragraph>
234
+ </Theme>
235
+ )}
236
+
237
+ <SectionGroup>
238
+ {section.items.map((item) => (
239
+ <PreferenceRow key={item.key} item={item} size={size} />
240
+ ))}
241
+ </SectionGroup>
242
+
243
+ {section.banner && (
244
+ <Alert intent={bannerIntent(section.banner.theme)}>{section.banner.message}</Alert>
245
+ )}
246
+ </View>
247
+
248
+ {si < sections.length - 1 && <Separator />}
249
+ </View>
250
+ ))}
251
+
252
+ {/* Footer */}
253
+ {footer && (
254
+ <>
255
+ <Separator />
256
+ <View flexDirection="row" {...knobProps.gap} paddingHorizontal={inset}>
257
+ {footer}
258
+ </View>
259
+ </>
260
+ )}
261
+ </Card>
262
+ );
263
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * MPO-116 / MPO-119 CONTAINER-CAP and LC-175 MPO-ONLY-REUSE for the form
3
+ * layouts the app template used to fork in packages/ui (FZ-8001).
4
+ *
5
+ * FormCard and SettingsFormLayout render the MPO Card, so the cap is Card's
6
+ * (cardSurface carries it) and neither re-derives it. PreferencePanel's
7
+ * section banner is the MPO Alert; the section stack keeps its own cap
8
+ * after elevatedSurface.
9
+ */
10
+ import fs from "node:fs";
11
+ import path from "node:path";
12
+ import { describe, expect, it } from "vitest";
13
+
14
+ const read = (file: string) => fs.readFileSync(path.resolve(import.meta.dirname, file), "utf-8");
15
+
16
+ const formLayoutsSrc = read("FormLayouts.tsx");
17
+ const preferencePanelSrc = read("PreferencePanel.tsx");
18
+
19
+ function declaration(source: string, name: string): string {
20
+ const start = source.indexOf(`function ${name}(`);
21
+ expect(start, `${name} not found`).toBeGreaterThan(-1);
22
+ const rest = source.slice(start + 1);
23
+ const next = rest.search(/\n(?:export )?function /);
24
+ return next === -1 ? rest : rest.slice(0, next);
25
+ }
26
+
27
+ function elevatedStackTag(source: string): string {
28
+ const start = source.indexOf("<YStack");
29
+ expect(start, "section stack not found").toBeGreaterThan(-1);
30
+ return source.slice(start, source.indexOf(">", start) + 1);
31
+ }
32
+
33
+ describe("FZ-8001: FormCard and SettingsFormLayout render the MPO Card", () => {
34
+ it("FormCard is the MPO Card rendered as a form, with no frame of its own", () => {
35
+ const formCard = declaration(formLayoutsSrc, "FormCard");
36
+ expect(formCard).toContain('<Card render="form"');
37
+ expect(formLayoutsSrc).not.toContain("FormCardFrame");
38
+ expect(formLayoutsSrc).not.toMatch(/\bstyled\(/);
39
+ });
40
+
41
+ it("SettingsFormLayout is the MPO Card, so the radius cap is Card's", () => {
42
+ const settings = declaration(formLayoutsSrc, "SettingsFormLayout");
43
+ expect(settings).toContain("<Card");
44
+ expect(settings).not.toContain("knobProps.surface");
45
+ expect(settings).not.toContain("knobProps.containerRadius");
46
+ expect(settings).not.toContain("knobProps.borderRadius");
47
+ });
48
+
49
+ it("neither surface re-derives the cap locally", () => {
50
+ expect(formLayoutsSrc).not.toContain("capContainerRadius");
51
+ expect(formLayoutsSrc).not.toContain("panelPaddingPx");
52
+ expect(formLayoutsSrc).not.toContain("knobProps.fieldRadius");
53
+ });
54
+ });
55
+
56
+ describe("FZ-8001 / MPO-119: PreferencePanel banner and section stack", () => {
57
+ it("the section banner is the MPO Alert, not a local painted row", () => {
58
+ expect(preferencePanelSrc).toContain("<Alert intent=");
59
+ expect(preferencePanelSrc).not.toMatch(/function Banner\(/);
60
+ expect(preferencePanelSrc).not.toContain('backgroundColor="$color7"');
61
+ });
62
+
63
+ it("the section stack spreads the cap AFTER elevatedSurface, so the cap wins", () => {
64
+ const stack = elevatedStackTag(preferencePanelSrc);
65
+ expect(stack).toContain("knobProps.elevatedSurface");
66
+ expect(stack).toContain("knobProps.containerRadius");
67
+ expect(stack.indexOf("knobProps.containerRadius")).toBeGreaterThan(
68
+ stack.indexOf("knobProps.elevatedSurface"),
69
+ );
70
+ expect(stack).not.toContain("knobProps.borderRadius");
71
+ });
72
+
73
+ it("the panel does not re-derive the cap locally", () => {
74
+ expect(preferencePanelSrc).not.toContain("capContainerRadius");
75
+ expect(preferencePanelSrc).not.toContain("panelPaddingPx");
76
+ expect(preferencePanelSrc).not.toContain("knobProps.fieldRadius");
77
+ });
78
+ });
@@ -0,0 +1,26 @@
1
+ export {
2
+ FormCard,
3
+ LoginLayout,
4
+ SignUpLayout,
5
+ SettingsFormLayout,
6
+ SocialButton,
7
+ GithubButton,
8
+ Hide,
9
+ } from "./FormLayouts";
10
+ export type {
11
+ FormCardProps,
12
+ LoginLayoutProps,
13
+ SignUpLayoutProps,
14
+ SocialButtonProps,
15
+ SettingsFormSection,
16
+ SettingsFormLayoutProps,
17
+ } from "./FormLayouts";
18
+ export { PreferencePanel } from "./PreferencePanel";
19
+ export type {
20
+ PreferenceToggleItem,
21
+ PreferenceRadioItem,
22
+ PreferenceCustomItem,
23
+ PreferenceItem,
24
+ PreferenceSection,
25
+ PreferencePanelProps,
26
+ } from "./PreferencePanel";
package/src/index.ts CHANGED
@@ -40,6 +40,7 @@ export * from "./hooks/index";
40
40
  export * from "./icons/index";
41
41
  export * from "./images/index";
42
42
  export * from "./layouts/index";
43
+ export * from "./formLayouts/index";
43
44
  // MPO app shell (FZ-7158 WP-h): SystemBar, ScopeMenu, Dock, TabBar, Springboard, SettingsSplit.
44
45
  export * from "./appShell/index";
45
46
  // MDX components are now in @multiplatform.one/markdown package
@@ -0,0 +1,41 @@
1
+ /**
2
+ * LC-150 (FZ-7995 round 2): the tab bar floats over content, so a Screen
3
+ * pads its scroll content by the height the bar covers. Without a mounted
4
+ * bar there is no clearance.
5
+ */
6
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
7
+ import { act, cleanup, screen } from "@testing-library/react";
8
+ import { afterEach, expect, it } from "vitest";
9
+ import { setBottomChromeInset } from "../appShell/bottomChrome";
10
+ import { Screen } from "./page";
11
+
12
+ const bar = Symbol("bar");
13
+
14
+ afterEach(() => {
15
+ cleanup();
16
+ act(() => setBottomChromeInset(bar, null));
17
+ });
18
+
19
+ it("adds no clearance when no tab bar is mounted", () => {
20
+ renderWithProviders(<Screen>row</Screen>);
21
+ expect(screen.queryByTestId("screen-chrome-clearance")).toBeNull();
22
+ });
23
+
24
+ it("ends its scroll content with the height the floating tab bar covers", () => {
25
+ act(() => setBottomChromeInset(bar, 77));
26
+ renderWithProviders(<Screen>row</Screen>);
27
+ const clearance = screen.getByTestId("screen-chrome-clearance");
28
+ expect(
29
+ getComputedStyle(clearance).height === "77px" ||
30
+ /\b_h-77px\b|height: 77px/.test(clearance.outerHTML),
31
+ ).toBe(true);
32
+ expect(
33
+ screen.getByText("row").compareDocumentPosition(clearance) & Node.DOCUMENT_POSITION_FOLLOWING,
34
+ ).toBeTruthy();
35
+ });
36
+
37
+ it("clears the bar on a screen that does not scroll", () => {
38
+ act(() => setBottomChromeInset(bar, 77));
39
+ renderWithProviders(<Screen scroll={false}>row</Screen>);
40
+ expect(screen.getByTestId("screen-chrome-clearance")).toBeTruthy();
41
+ });
@@ -47,6 +47,7 @@ import {
47
47
  YStack,
48
48
  isWeb,
49
49
  } from "tamagui";
50
+ import { useBottomChromeInset } from "../appShell/bottomChrome";
50
51
  import { componentColors, sectionHeading } from "../componentColors";
51
52
  import { useDirection } from "../hooks/useDirection";
52
53
  import { useTranslation } from "../shared/i18n";
@@ -137,6 +138,7 @@ export function Screen({
137
138
  }: ScreenProps) {
138
139
  const { knobProps } = useResolvedKnobs({ component: "Screen" });
139
140
  const scrollState = useScreenScrollController();
141
+ const chromeInset = useBottomChromeInset();
140
142
  const inset = noPadding ? null : (knobProps.panelPadding.padding as string);
141
143
  const cap = maxWidth && !bleed ? maxWidth : null;
142
144
 
@@ -176,11 +178,24 @@ export function Screen({
176
178
  );
177
179
  };
178
180
 
181
+ // The floating tab bar covers the bottom of the screen; content scrolls
182
+ // under it, and this clears its last row.
183
+ const chromeClearance =
184
+ chromeInset > 0 ? (
185
+ <YStack
186
+ height={chromeInset}
187
+ flexShrink={0}
188
+ aria-hidden
189
+ data-testid="screen-chrome-clearance"
190
+ />
191
+ ) : null;
192
+
179
193
  if (!scroll) {
180
194
  return shell(
181
195
  <YStack flex={1} backgroundColor="$background">
182
196
  {bar}
183
197
  {inner}
198
+ {chromeClearance}
184
199
  </YStack>,
185
200
  );
186
201
  }
@@ -200,6 +215,7 @@ export function Screen({
200
215
  }}
201
216
  >
202
217
  {inner}
218
+ {chromeClearance}
203
219
  </ScrollView>
204
220
  );
205
221
 
@@ -0,0 +1,11 @@
1
+ /**
2
+ * BottomAccessory — a page's bottom accessory (LC-174 BOTTOM-ACCESSORY, e.g.
3
+ * a pager). Under a floating TabBar it moves into the bar, which floats it as
4
+ * its own smaller capsule above the tab capsule (LC-150); with no bar it
5
+ * renders where the page put it.
6
+ */
7
+ import { type ReactNode } from "react";
8
+ export declare function BottomAccessory({ children }: {
9
+ children: ReactNode;
10
+ }): import("react/jsx-runtime").JSX.Element | null;
11
+ //# sourceMappingURL=BottomAccessory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomAccessory.d.ts","sourceRoot":"","sources":["../../src/appShell/BottomAccessory.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAG5D,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,kDAQpE"}
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from "react";
1
+ import { type ComponentType, type ReactNode } from "react";
2
2
  /** A phosphor-style glyph: the bar sets its size, colour and weight. */
3
3
  export type TabBarIcon = ComponentType<{
4
4
  size?: number;
@@ -15,20 +15,34 @@ export interface TabBarProps {
15
15
  items: readonly TabBarItem[];
16
16
  activeKey?: string;
17
17
  onTabPress?: (key: string) => void;
18
+ /**
19
+ * The bottom accessory (LC-174): its own capsule floating above the bar. A
20
+ * page's `BottomAccessory` lands here when this prop is unset.
21
+ */
22
+ accessory?: ReactNode;
23
+ /**
24
+ * Default true: the bar floats over the screen and pads every Screen. False
25
+ * draws the same capsule in flow (a demo inside a page).
26
+ */
27
+ floating?: boolean;
18
28
  /** Accessible name of the tab list. Default "Tabs". */
19
29
  label?: string;
20
30
  testID?: string;
21
31
  }
22
32
  /**
23
- * UITabBar's compact (iPhone portrait) metrics in points. They are fixed
24
- * like the platform's: a preset's scale or a large Dynamic Type size never
25
- * grows the bar, which is why they are not scale tokens. The column is
26
- * top-aligned: 7 + 25 + 2 + 12 leaves 3pt under the caption inside the 49pt
27
- * row, and the safe-area inset below it is the only other height.
33
+ * The iOS 26 floating tab bar's metrics in points, fixed like the
34
+ * platform's: a preset's scale or a large Dynamic Type size never moves
35
+ * them. The capsule is 4 + 53 + 4 tall; each item is a pill of 7 + 25 + 2 +
36
+ * 12 + 7. Its bottom edge sits 8pt above the home indicator, whose band is
37
+ * the lowest 13pt of the device's bottom inset, or 8pt above the viewport
38
+ * edge where there is none.
28
39
  */
29
40
  export declare const tabBarMetrics: {
30
- readonly rowHeight: 49;
31
- readonly iconTop: 7;
41
+ readonly sideInset: 16;
42
+ readonly indicatorClearance: 8;
43
+ readonly homeIndicatorBand: 13;
44
+ readonly capsulePadding: 4;
45
+ readonly itemPaddingY: 7;
32
46
  readonly iconSize: 25;
33
47
  readonly labelGap: 2;
34
48
  readonly labelSize: 10;
@@ -36,7 +50,13 @@ export declare const tabBarMetrics: {
36
50
  readonly labelWeight: "500";
37
51
  /** A label that does not fit shrinks to 9pt at most, then clips. */
38
52
  readonly labelMinScale: 0.9;
53
+ readonly accessoryGap: 8;
54
+ readonly accessoryHeight: 44;
39
55
  };
56
+ /** The capsule's height: its padding around one item pill. */
57
+ export declare const tabBarCapsuleHeight: number;
58
+ /** The capsule's bottom edge above the screen's bottom edge. */
59
+ export declare function tabBarBottomOffset(bottomInset: number): number;
40
60
  /**
41
61
  * Inactive ink: the theme's secondary text ink (LC-152), whatever the
42
62
  * preset's textAccent. Bold sets textAccent "high", whose text colour is the
@@ -44,7 +64,9 @@ export declare const tabBarMetrics: {
44
64
  * body text.
45
65
  */
46
66
  export declare const tabBarInactiveInk = "$textMuted";
47
- /** The bar material: the chrome step one off the page, as the SystemBar paints. */
67
+ /** The material's base: the chrome step one off the page, as the SystemBar paints. */
48
68
  export declare const tabBarMaterial = "$color2";
49
- export declare function TabBar({ items, activeKey, onTabPress, label, testID, }: TabBarProps): import("react/jsx-runtime").JSX.Element;
69
+ /** How much of the material shows through: web blurs what is behind it, native cannot. */
70
+ export declare const tabBarMaterialOpacity: number;
71
+ export declare function TabBar({ items, activeKey, onTabPress, accessory: ownAccessory, floating, label, testID, }: TabBarProps): import("react/jsx-runtime").JSX.Element;
50
72
  //# sourceMappingURL=TabBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/appShell/TabBar.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa;;;;;;;;IAQxB,oEAAoE;;CAE5D,CAAC;AACX;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,mFAAmF;AACnF,eAAO,MAAM,cAAc,YAAY,CAAC;AAuExC,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAc,EACd,MAAkB,GACnB,EAAE,WAAW,2CA+Bb"}
1
+ {"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/appShell/TabBar.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAMhF,wEAAwE;AACxE,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B,CAAC,CAAC;AAEH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;IAWxB,oEAAoE;;;;CAI5D,CAAC;AAEX,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,QAKD,CAAC;AAEhC,gEAAgE;AAChE,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAC9C,sFAAsF;AACtF,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,QAAsB,CAAC;AAuGzD,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EAAE,YAAY,EACvB,QAAe,EACf,KAAc,EACd,MAAkB,GACnB,EAAE,WAAW,2CAiFb"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The floating bottom chrome's shared state. A mounted floating TabBar
3
+ * publishes the height it covers, so a Screen pads its scroll content by it
4
+ * and its last row clears the capsule. A page publishes its bottom accessory
5
+ * (LC-174, e.g. a pager) here, so the bar floats it as its own capsule. The
6
+ * bar and the page are siblings in every host, so both live in a store, not
7
+ * a context a host would have to wire.
8
+ */
9
+ import { type ReactNode } from "react";
10
+ /** Publish (or with null, withdraw) one floating bar's covered height. */
11
+ export declare function setBottomChromeInset(id: symbol, next: number | null): void;
12
+ /** Points of screen the bottom chrome covers; 0 when no floating tab bar is mounted. */
13
+ export declare function useBottomChromeInset(): number;
14
+ /** Publish (or with null, withdraw) a page's bottom accessory. The latest wins. */
15
+ export declare function setBottomAccessory(id: symbol, node: ReactNode | null): void;
16
+ /** The accessory a page published, for the floating TabBar to host. */
17
+ export declare function useBottomAccessory(): ReactNode;
18
+ /** A floating TabBar announces itself so accessories move into it. */
19
+ export declare function setFloatingBarMounted(id: symbol, mounted: boolean): void;
20
+ /** True while a floating TabBar is mounted and hosts the accessory. */
21
+ export declare function useFloatingBarMounted(): boolean;
22
+ //# sourceMappingURL=bottomChrome.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottomChrome.d.ts","sourceRoot":"","sources":["../../src/appShell/bottomChrome.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAC;AA4B7D,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,QAEnE;AAED,wFAAwF;AACxF,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAKD,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,QAEpE;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,IAAI,SAAS,CAE9C;AAED,sEAAsE;AACtE,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,QAEjE;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Web: no home indicator inside the page, so the floating tab bar measures
3
+ * its clearance from the viewport's bottom edge.
4
+ */
5
+ export declare function useBottomInset(): number;
6
+ //# sourceMappingURL=bottomInset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottomInset.d.ts","sourceRoot":"","sources":["../../src/appShell/bottomInset.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
@@ -0,0 +1,3 @@
1
+ /** Native: the device's bottom safe-area inset (the home-indicator band). */
2
+ export declare function useBottomInset(): number;
3
+ //# sourceMappingURL=bottomInset.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bottomInset.native.d.ts","sourceRoot":"","sources":["../../src/appShell/bottomInset.native.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
@@ -5,4 +5,6 @@ export * from "./TabBar";
5
5
  export * from "./Springboard";
6
6
  export type { AppEntry } from "./appTile";
7
7
  export * from "./SettingsSplit";
8
+ export { useBottomChromeInset } from "./bottomChrome";
9
+ export { BottomAccessory } from "./BottomAccessory";
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appShell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/appShell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}