@g9tm/lynxcontrols 1.7.3 → 2.2.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 (559) hide show
  1. package/README.md +12 -5
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/anchor/context.jsx +0 -2
  4. package/dist/anchor/hooks.d.ts.map +1 -1
  5. package/dist/anchor/hooks.jsx +6 -4
  6. package/dist/anchor/measure.jsx +0 -2
  7. package/dist/anchor/registry.d.ts +12 -2
  8. package/dist/anchor/registry.d.ts.map +1 -1
  9. package/dist/anchor/registry.jsx +11 -3
  10. package/dist/anchor/scroll.jsx +0 -2
  11. package/dist/base/control.d.ts +18 -2
  12. package/dist/base/control.d.ts.map +1 -1
  13. package/dist/base/control.jsx +16 -9
  14. package/dist/base/corner-badge.jsx +0 -2
  15. package/dist/base/disposer.jsx +0 -2
  16. package/dist/base/index.d.ts +3 -2
  17. package/dist/base/index.d.ts.map +1 -1
  18. package/dist/base/index.jsx +3 -2
  19. package/dist/base/press.css +83 -0
  20. package/dist/base/press.css.map +1 -0
  21. package/dist/base/press.d.ts +13 -2
  22. package/dist/base/press.d.ts.map +1 -1
  23. package/dist/base/press.jsx +49 -5
  24. package/dist/base/pressable.d.ts +10 -1
  25. package/dist/base/pressable.d.ts.map +1 -1
  26. package/dist/base/pressable.jsx +13 -8
  27. package/dist/base/selection-item.jsx +0 -2
  28. package/dist/base/timers.jsx +0 -2
  29. package/dist/base/tone.d.ts +15 -0
  30. package/dist/base/tone.d.ts.map +1 -0
  31. package/dist/base/tone.jsx +71 -0
  32. package/dist/base/use-controllable-state.jsx +0 -2
  33. package/dist/base/use-stable-callback.jsx +0 -2
  34. package/dist/button/button-variants.css +236 -0
  35. package/dist/button/button-variants.css.map +1 -0
  36. package/dist/button/button.css +21 -0
  37. package/dist/button/button.css.map +1 -1
  38. package/dist/button/button.d.ts +13 -1
  39. package/dist/button/button.d.ts.map +1 -1
  40. package/dist/button/button.jsx +51 -38
  41. package/dist/button/header-action-button.d.ts +1 -0
  42. package/dist/button/header-action-button.d.ts.map +1 -1
  43. package/dist/button/header-action-button.jsx +6 -7
  44. package/dist/button/icon-button.d.ts +11 -1
  45. package/dist/button/icon-button.d.ts.map +1 -1
  46. package/dist/button/icon-button.jsx +21 -17
  47. package/dist/button/nav-card.d.ts +1 -0
  48. package/dist/button/nav-card.d.ts.map +1 -1
  49. package/dist/button/nav-card.jsx +6 -7
  50. package/dist/button/safe-tap.jsx +0 -2
  51. package/dist/button/safe.jsx +3 -5
  52. package/dist/button/variant-css.d.ts +8 -0
  53. package/dist/button/variant-css.d.ts.map +1 -0
  54. package/dist/button/variant-css.jsx +47 -0
  55. package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
  56. package/dist/button/vertical-icon-text-button.jsx +1 -3
  57. package/dist/button/visuals.d.ts +7 -1
  58. package/dist/button/visuals.d.ts.map +1 -1
  59. package/dist/button/visuals.jsx +5 -5
  60. package/dist/cascade/cascade-panel.jsx +0 -2
  61. package/dist/cascade/model.jsx +0 -2
  62. package/dist/commands/commands.css +167 -0
  63. package/dist/commands/commands.css.map +1 -0
  64. package/dist/commands/index.d.ts +3 -0
  65. package/dist/commands/index.d.ts.map +1 -0
  66. package/dist/commands/index.jsx +2 -0
  67. package/dist/commands/keys.d.ts +22 -0
  68. package/dist/commands/keys.d.ts.map +1 -0
  69. package/dist/commands/keys.jsx +119 -0
  70. package/dist/commands/palette.d.ts +62 -0
  71. package/dist/commands/palette.d.ts.map +1 -0
  72. package/dist/commands/palette.jsx +175 -0
  73. package/dist/deferred/deferred-content.jsx +2 -4
  74. package/dist/deferred/readiness-signal.jsx +0 -2
  75. package/dist/display/activity-indicator.jsx +0 -2
  76. package/dist/display/culture-date-time-label.jsx +1 -3
  77. package/dist/display/extras.css +117 -0
  78. package/dist/display/extras.css.map +1 -0
  79. package/dist/display/extras.d.ts +65 -0
  80. package/dist/display/extras.d.ts.map +1 -0
  81. package/dist/display/extras.jsx +118 -0
  82. package/dist/display/figures-index.d.ts +3 -0
  83. package/dist/display/figures-index.d.ts.map +1 -0
  84. package/dist/display/figures-index.jsx +2 -0
  85. package/dist/display/figures.css +249 -0
  86. package/dist/display/figures.css.map +1 -0
  87. package/dist/display/figures.d.ts +132 -0
  88. package/dist/display/figures.d.ts.map +1 -0
  89. package/dist/display/figures.jsx +223 -0
  90. package/dist/display/image.css +46 -0
  91. package/dist/display/image.css.map +1 -0
  92. package/dist/display/image.d.ts +32 -0
  93. package/dist/display/image.d.ts.map +1 -0
  94. package/dist/display/image.jsx +49 -0
  95. package/dist/display/index.d.ts +6 -0
  96. package/dist/display/index.d.ts.map +1 -1
  97. package/dist/display/index.jsx +6 -0
  98. package/dist/display/keycap.css +32 -0
  99. package/dist/display/keycap.css.map +1 -0
  100. package/dist/display/keycap.d.ts +20 -0
  101. package/dist/display/keycap.d.ts.map +1 -0
  102. package/dist/display/keycap.jsx +17 -0
  103. package/dist/display/motion-figures.css +168 -0
  104. package/dist/display/motion-figures.css.map +1 -0
  105. package/dist/display/motion-figures.d.ts +155 -0
  106. package/dist/display/motion-figures.d.ts.map +1 -0
  107. package/dist/display/motion-figures.jsx +246 -0
  108. package/dist/display/progress-bar.jsx +1 -3
  109. package/dist/display/separator.d.ts.map +1 -1
  110. package/dist/display/separator.jsx +2 -4
  111. package/dist/display/shimmer.jsx +0 -2
  112. package/dist/display/skeleton.css +72 -0
  113. package/dist/display/skeleton.css.map +1 -0
  114. package/dist/display/status.css +111 -0
  115. package/dist/display/status.css.map +1 -0
  116. package/dist/display/status.d.ts +67 -0
  117. package/dist/display/status.d.ts.map +1 -0
  118. package/dist/display/status.jsx +117 -0
  119. package/dist/display/theme-preview.css +244 -0
  120. package/dist/display/theme-preview.css.map +1 -0
  121. package/dist/display/theme-preview.d.ts +19 -0
  122. package/dist/display/theme-preview.d.ts.map +1 -0
  123. package/dist/display/theme-preview.jsx +89 -0
  124. package/dist/display/title-with-line.d.ts.map +1 -1
  125. package/dist/display/title-with-line.jsx +2 -4
  126. package/dist/edge-panel/edge-panel.jsx +0 -2
  127. package/dist/edge-panel/helper.jsx +0 -2
  128. package/dist/edge-panel/types.jsx +0 -2
  129. package/dist/effects/countdown.d.ts +36 -0
  130. package/dist/effects/countdown.d.ts.map +1 -0
  131. package/dist/effects/countdown.jsx +93 -0
  132. package/dist/effects/effects.css +94 -0
  133. package/dist/effects/effects.css.map +1 -0
  134. package/dist/effects/effects.d.ts +83 -0
  135. package/dist/effects/effects.d.ts.map +1 -0
  136. package/dist/effects/effects.jsx +183 -0
  137. package/dist/effects/index.d.ts +3 -0
  138. package/dist/effects/index.d.ts.map +1 -0
  139. package/dist/effects/index.jsx +2 -0
  140. package/dist/expander/expander.d.ts +1 -0
  141. package/dist/expander/expander.d.ts.map +1 -1
  142. package/dist/expander/expander.jsx +22 -23
  143. package/dist/fields/dictation.jsx +0 -2
  144. package/dist/fields/editor.jsx +2 -4
  145. package/dist/fields/extra-entries.css +133 -0
  146. package/dist/fields/extra-entries.css.map +1 -0
  147. package/dist/fields/extra-entries.d.ts +98 -0
  148. package/dist/fields/extra-entries.d.ts.map +1 -0
  149. package/dist/fields/extra-entries.jsx +323 -0
  150. package/dist/fields/fields.css +4 -0
  151. package/dist/fields/fields.css.map +1 -1
  152. package/dist/fields/index.d.ts +4 -3
  153. package/dist/fields/index.d.ts.map +1 -1
  154. package/dist/fields/index.jsx +1 -0
  155. package/dist/fields/input-policy.jsx +0 -2
  156. package/dist/fields/notch.jsx +0 -2
  157. package/dist/fields/outlined-field.d.ts +9 -0
  158. package/dist/fields/outlined-field.d.ts.map +1 -1
  159. package/dist/fields/outlined-field.jsx +10 -8
  160. package/dist/fields/pin-entry.d.ts.map +1 -1
  161. package/dist/fields/pin-entry.jsx +11 -13
  162. package/dist/fields/search-entry.jsx +2 -4
  163. package/dist/fields/slot-layout.jsx +0 -2
  164. package/dist/fields/text-entry.jsx +2 -4
  165. package/dist/fields/use-dictation.jsx +0 -2
  166. package/dist/fields/use-text-input.d.ts +1 -1
  167. package/dist/fields/use-text-input.jsx +0 -2
  168. package/dist/fields/validator.jsx +0 -2
  169. package/dist/guide/confirm-sheet.d.ts +1 -1
  170. package/dist/guide/confirm-sheet.d.ts.map +1 -1
  171. package/dist/guide/confirm-sheet.jsx +6 -26
  172. package/dist/guide/journey.jsx +0 -2
  173. package/dist/guide/placement.jsx +0 -2
  174. package/dist/guide/service.jsx +0 -2
  175. package/dist/guide/settings.jsx +0 -2
  176. package/dist/header/app-bar.d.ts +35 -0
  177. package/dist/header/app-bar.d.ts.map +1 -0
  178. package/dist/header/app-bar.jsx +64 -0
  179. package/dist/header/header.css +79 -0
  180. package/dist/header/header.css.map +1 -0
  181. package/dist/header/index.d.ts +2 -0
  182. package/dist/header/index.d.ts.map +1 -0
  183. package/dist/header/index.jsx +1 -0
  184. package/dist/host/back.jsx +0 -2
  185. package/dist/host/hooks.jsx +0 -2
  186. package/dist/host/host.css +1 -0
  187. package/dist/host/host.css.map +1 -1
  188. package/dist/host/host.d.ts.map +1 -1
  189. package/dist/host/host.jsx +50 -17
  190. package/dist/host/keyboard.jsx +0 -2
  191. package/dist/host/layers.jsx +0 -2
  192. package/dist/host/page-loading-overlay.jsx +0 -2
  193. package/dist/host/readiness.jsx +0 -2
  194. package/dist/host/registry.d.ts +9 -0
  195. package/dist/host/registry.d.ts.map +1 -1
  196. package/dist/host/registry.jsx +0 -2
  197. package/dist/icon/icon.d.ts +16 -0
  198. package/dist/icon/icon.d.ts.map +1 -1
  199. package/dist/icon/icon.jsx +53 -14
  200. package/dist/icon/index.d.ts +1 -1
  201. package/dist/icon/index.d.ts.map +1 -1
  202. package/dist/icon/index.jsx +1 -1
  203. package/dist/icon/slot.jsx +0 -2
  204. package/dist/icon/swatch.jsx +0 -2
  205. package/dist/index.d.ts +9 -0
  206. package/dist/index.d.ts.map +1 -1
  207. package/dist/layout/containers.d.ts +113 -0
  208. package/dist/layout/containers.d.ts.map +1 -0
  209. package/dist/layout/containers.jsx +195 -0
  210. package/dist/layout/index.d.ts +4 -0
  211. package/dist/layout/index.d.ts.map +1 -0
  212. package/dist/layout/index.jsx +3 -0
  213. package/dist/layout/layout.css +361 -0
  214. package/dist/layout/layout.css.map +1 -0
  215. package/dist/layout/scroll-spy.d.ts +18 -0
  216. package/dist/layout/scroll-spy.d.ts.map +1 -0
  217. package/dist/layout/scroll-spy.jsx +38 -0
  218. package/dist/layout/scrollers.d.ts +96 -0
  219. package/dist/layout/scrollers.d.ts.map +1 -0
  220. package/dist/layout/scrollers.jsx +208 -0
  221. package/dist/list/gestures.d.ts +40 -0
  222. package/dist/list/gestures.d.ts.map +1 -0
  223. package/dist/list/gestures.jsx +142 -0
  224. package/dist/list/index.d.ts +4 -0
  225. package/dist/list/index.d.ts.map +1 -0
  226. package/dist/list/index.jsx +3 -0
  227. package/dist/list/list.css +194 -0
  228. package/dist/list/list.css.map +1 -0
  229. package/dist/list/rows.d.ts +69 -0
  230. package/dist/list/rows.d.ts.map +1 -0
  231. package/dist/list/rows.jsx +105 -0
  232. package/dist/list/virtual-list.d.ts +94 -0
  233. package/dist/list/virtual-list.d.ts.map +1 -0
  234. package/dist/list/virtual-list.jsx +159 -0
  235. package/dist/orb/hold-button.d.ts +26 -0
  236. package/dist/orb/hold-button.d.ts.map +1 -0
  237. package/dist/orb/hold-button.jsx +33 -0
  238. package/dist/orb/hold.d.ts +36 -0
  239. package/dist/orb/hold.d.ts.map +1 -0
  240. package/dist/orb/hold.jsx +76 -0
  241. package/dist/orb/index.d.ts +5 -0
  242. package/dist/orb/index.d.ts.map +1 -0
  243. package/dist/orb/index.jsx +4 -0
  244. package/dist/orb/model.d.ts +42 -0
  245. package/dist/orb/model.d.ts.map +1 -0
  246. package/dist/orb/model.jsx +42 -0
  247. package/dist/orb/orb.css +81 -0
  248. package/dist/orb/orb.css.map +1 -0
  249. package/dist/orb/orb.d.ts +66 -0
  250. package/dist/orb/orb.d.ts.map +1 -0
  251. package/dist/orb/orb.jsx +189 -0
  252. package/dist/pickers/combo-box.jsx +0 -2
  253. package/dist/pickers/date-time-picker.jsx +0 -2
  254. package/dist/pickers/date-time.jsx +0 -2
  255. package/dist/pickers/day-stepper.css +43 -0
  256. package/dist/pickers/day-stepper.css.map +1 -0
  257. package/dist/pickers/day-stepper.d.ts +31 -0
  258. package/dist/pickers/day-stepper.d.ts.map +1 -0
  259. package/dist/pickers/day-stepper.jsx +60 -0
  260. package/dist/pickers/index.d.ts +1 -0
  261. package/dist/pickers/index.d.ts.map +1 -1
  262. package/dist/pickers/index.jsx +1 -0
  263. package/dist/pickers/picker-sheet.jsx +0 -2
  264. package/dist/pickers/picker.d.ts +11 -0
  265. package/dist/pickers/picker.d.ts.map +1 -1
  266. package/dist/pickers/picker.jsx +53 -9
  267. package/dist/pickers/timespan-picker.jsx +0 -2
  268. package/dist/pickers/timespan.jsx +0 -2
  269. package/dist/pickers/trigger.jsx +0 -2
  270. package/dist/pickers/wheel-column.jsx +0 -2
  271. package/dist/plus-button/model.jsx +0 -2
  272. package/dist/plus-button/plus-button.jsx +0 -2
  273. package/dist/popover/index.d.ts +3 -0
  274. package/dist/popover/index.d.ts.map +1 -0
  275. package/dist/popover/index.jsx +2 -0
  276. package/dist/popover/popover.css +183 -0
  277. package/dist/popover/popover.css.map +1 -0
  278. package/dist/popover/popover.d.ts +139 -0
  279. package/dist/popover/popover.d.ts.map +1 -0
  280. package/dist/popover/popover.jsx +291 -0
  281. package/dist/popover/position.d.ts +35 -0
  282. package/dist/popover/position.d.ts.map +1 -0
  283. package/dist/popover/position.jsx +53 -0
  284. package/dist/popup/frame.jsx +0 -2
  285. package/dist/popup/input-form.jsx +0 -2
  286. package/dist/popup/input.jsx +0 -2
  287. package/dist/popup/popup-view.jsx +0 -2
  288. package/dist/popup/queue.jsx +0 -2
  289. package/dist/popup/service.jsx +0 -2
  290. package/dist/popup/types.jsx +0 -2
  291. package/dist/provider/activity.d.ts +13 -0
  292. package/dist/provider/activity.d.ts.map +1 -0
  293. package/dist/provider/activity.jsx +55 -0
  294. package/dist/provider/contexts.d.ts +32 -1
  295. package/dist/provider/contexts.d.ts.map +1 -1
  296. package/dist/provider/contexts.jsx +7 -3
  297. package/dist/provider/global-events.jsx +0 -2
  298. package/dist/provider/hooks.d.ts +16 -2
  299. package/dist/provider/hooks.d.ts.map +1 -1
  300. package/dist/provider/hooks.jsx +35 -7
  301. package/dist/provider/index.d.ts +4 -2
  302. package/dist/provider/index.d.ts.map +1 -1
  303. package/dist/provider/index.jsx +3 -1
  304. package/dist/provider/keep-alive.css +19 -0
  305. package/dist/provider/keep-alive.css.map +1 -0
  306. package/dist/provider/keep-alive.d.ts +23 -0
  307. package/dist/provider/keep-alive.d.ts.map +1 -0
  308. package/dist/provider/keep-alive.jsx +9 -0
  309. package/dist/provider/provider.css +1 -1
  310. package/dist/provider/provider.css.map +1 -1
  311. package/dist/provider/provider.d.ts +13 -1
  312. package/dist/provider/provider.d.ts.map +1 -1
  313. package/dist/provider/provider.jsx +128 -15
  314. package/dist/provider/settings.d.ts +23 -0
  315. package/dist/provider/settings.d.ts.map +1 -1
  316. package/dist/provider/settings.jsx +5 -4
  317. package/dist/provider/theme-css.d.ts +1 -1
  318. package/dist/provider/theme-css.d.ts.map +1 -1
  319. package/dist/provider/theme-css.jsx +21 -10
  320. package/dist/provider/theme-root.d.ts.map +1 -1
  321. package/dist/provider/theme-root.jsx +7 -5
  322. package/dist/provider/theme.css +72 -0
  323. package/dist/provider/theme.css.map +1 -1
  324. package/dist/range-slider/index.d.ts +1 -0
  325. package/dist/range-slider/index.d.ts.map +1 -1
  326. package/dist/range-slider/index.jsx +1 -0
  327. package/dist/range-slider/math.jsx +0 -2
  328. package/dist/range-slider/range-slider.css +82 -0
  329. package/dist/range-slider/range-slider.css.map +1 -1
  330. package/dist/range-slider/range-slider.jsx +0 -2
  331. package/dist/range-slider/step-slider.d.ts +18 -0
  332. package/dist/range-slider/step-slider.d.ts.map +1 -0
  333. package/dist/range-slider/step-slider.jsx +55 -0
  334. package/dist/route/hooks.jsx +0 -2
  335. package/dist/route/router.jsx +0 -2
  336. package/dist/selection/model.jsx +0 -2
  337. package/dist/selection/selection-sheet.d.ts.map +1 -1
  338. package/dist/selection/selection-sheet.jsx +31 -4
  339. package/dist/selection/use-selection-model.jsx +0 -2
  340. package/dist/selection/window.jsx +0 -2
  341. package/dist/sheet/backdrop-scope.d.ts +14 -0
  342. package/dist/sheet/backdrop-scope.d.ts.map +1 -0
  343. package/dist/sheet/backdrop-scope.jsx +25 -0
  344. package/dist/sheet/context.d.ts +22 -0
  345. package/dist/sheet/context.d.ts.map +1 -0
  346. package/dist/sheet/context.jsx +7 -0
  347. package/dist/sheet/frame.d.ts +2 -17
  348. package/dist/sheet/frame.d.ts.map +1 -1
  349. package/dist/sheet/frame.jsx +23 -19
  350. package/dist/sheet/gesture.jsx +1 -3
  351. package/dist/sheet/handoff.jsx +0 -2
  352. package/dist/sheet/header.jsx +3 -3
  353. package/dist/sheet/height-memo.jsx +0 -2
  354. package/dist/sheet/index.d.ts +2 -0
  355. package/dist/sheet/index.d.ts.map +1 -1
  356. package/dist/sheet/index.jsx +2 -0
  357. package/dist/sheet/loadable.jsx +0 -2
  358. package/dist/sheet/motion.jsx +0 -2
  359. package/dist/sheet/options.d.ts +17 -0
  360. package/dist/sheet/options.d.ts.map +1 -1
  361. package/dist/sheet/options.jsx +2 -3
  362. package/dist/sheet/panel-frame.css +204 -0
  363. package/dist/sheet/panel-frame.css.map +1 -0
  364. package/dist/sheet/panel-frame.d.ts +16 -0
  365. package/dist/sheet/panel-frame.d.ts.map +1 -0
  366. package/dist/sheet/panel-frame.jsx +103 -0
  367. package/dist/sheet/processing.jsx +0 -2
  368. package/dist/sheet/scroll-indicator.jsx +0 -2
  369. package/dist/sheet/scroll-region.d.ts +19 -0
  370. package/dist/sheet/scroll-region.d.ts.map +1 -0
  371. package/dist/sheet/scroll-region.jsx +58 -0
  372. package/dist/sheet/service.d.ts.map +1 -1
  373. package/dist/sheet/service.jsx +23 -9
  374. package/dist/sheet/sheet.css +33 -0
  375. package/dist/sheet/sheet.css.map +1 -1
  376. package/dist/sheet/sheet.jsx +0 -2
  377. package/dist/sheet/sizing.d.ts +3 -3
  378. package/dist/sheet/sizing.jsx +0 -2
  379. package/dist/sheet/stack.jsx +0 -2
  380. package/dist/shell/index.d.ts +2 -0
  381. package/dist/shell/index.d.ts.map +1 -0
  382. package/dist/shell/index.jsx +1 -0
  383. package/dist/shell/shell.css +342 -0
  384. package/dist/shell/shell.css.map +1 -0
  385. package/dist/shell/shell.d.ts +121 -0
  386. package/dist/shell/shell.d.ts.map +1 -0
  387. package/dist/shell/shell.jsx +214 -0
  388. package/dist/survey/index.d.ts +2 -0
  389. package/dist/survey/index.d.ts.map +1 -0
  390. package/dist/survey/index.jsx +1 -0
  391. package/dist/survey/survey.css +204 -0
  392. package/dist/survey/survey.css.map +1 -0
  393. package/dist/survey/survey.d.ts +76 -0
  394. package/dist/survey/survey.d.ts.map +1 -0
  395. package/dist/survey/survey.jsx +205 -0
  396. package/dist/swipe/model.jsx +0 -2
  397. package/dist/swipe/swipe-view.jsx +0 -2
  398. package/dist/tab-bar/metrics.jsx +20 -22
  399. package/dist/tab-bar/model.d.ts +2 -0
  400. package/dist/tab-bar/model.d.ts.map +1 -1
  401. package/dist/tab-bar/model.jsx +10 -6
  402. package/dist/tab-bar/tab-bar.css +74 -0
  403. package/dist/tab-bar/tab-bar.css.map +1 -1
  404. package/dist/tab-bar/tab-bar.d.ts +7 -0
  405. package/dist/tab-bar/tab-bar.d.ts.map +1 -1
  406. package/dist/tab-bar/tab-bar.jsx +51 -17
  407. package/dist/tabs/model.jsx +0 -2
  408. package/dist/tabs/tab-view.d.ts +1 -0
  409. package/dist/tabs/tab-view.d.ts.map +1 -1
  410. package/dist/tabs/tab-view.jsx +6 -5
  411. package/dist/tabs/tabs.css +1 -0
  412. package/dist/tabs/tabs.css.map +1 -1
  413. package/dist/toast/service.d.ts.map +1 -1
  414. package/dist/toast/service.jsx +34 -16
  415. package/dist/toast/store.jsx +0 -2
  416. package/dist/toggle/checkbox-math.jsx +0 -2
  417. package/dist/toggle/checkbox.d.ts.map +1 -1
  418. package/dist/toggle/checkbox.jsx +10 -12
  419. package/dist/toggle/chip-group.d.ts.map +1 -1
  420. package/dist/toggle/chip-group.jsx +8 -7
  421. package/dist/toggle/choice.css +254 -0
  422. package/dist/toggle/choice.css.map +1 -0
  423. package/dist/toggle/choice.d.ts +125 -0
  424. package/dist/toggle/choice.d.ts.map +1 -0
  425. package/dist/toggle/choice.jsx +367 -0
  426. package/dist/toggle/index.d.ts +2 -1
  427. package/dist/toggle/index.d.ts.map +1 -1
  428. package/dist/toggle/index.jsx +1 -0
  429. package/dist/toggle/switch.d.ts.map +1 -1
  430. package/dist/toggle/switch.jsx +8 -11
  431. package/package.json +126 -16
  432. package/tailwind/index.d.ts +13 -0
  433. package/tailwind/index.mjs +87 -0
  434. package/tailwind/index.test.mjs +24 -0
  435. package/tailwind/tokens.mjs +98 -0
  436. package/dist/anchor/context.jsx.map +0 -1
  437. package/dist/anchor/hooks.jsx.map +0 -1
  438. package/dist/anchor/measure.jsx.map +0 -1
  439. package/dist/anchor/registry.jsx.map +0 -1
  440. package/dist/anchor/scroll.jsx.map +0 -1
  441. package/dist/base/control.jsx.map +0 -1
  442. package/dist/base/corner-badge.jsx.map +0 -1
  443. package/dist/base/disposer.jsx.map +0 -1
  444. package/dist/base/press.jsx.map +0 -1
  445. package/dist/base/pressable.jsx.map +0 -1
  446. package/dist/base/selection-item.jsx.map +0 -1
  447. package/dist/base/timers.jsx.map +0 -1
  448. package/dist/base/use-controllable-state.jsx.map +0 -1
  449. package/dist/base/use-stable-callback.jsx.map +0 -1
  450. package/dist/button/button.jsx.map +0 -1
  451. package/dist/button/header-action-button.jsx.map +0 -1
  452. package/dist/button/icon-button.jsx.map +0 -1
  453. package/dist/button/nav-card.jsx.map +0 -1
  454. package/dist/button/safe-tap.jsx.map +0 -1
  455. package/dist/button/safe.jsx.map +0 -1
  456. package/dist/button/vertical-icon-text-button.jsx.map +0 -1
  457. package/dist/button/visuals.jsx.map +0 -1
  458. package/dist/cascade/cascade-panel.jsx.map +0 -1
  459. package/dist/cascade/model.jsx.map +0 -1
  460. package/dist/deferred/deferred-content.jsx.map +0 -1
  461. package/dist/deferred/readiness-signal.jsx.map +0 -1
  462. package/dist/display/activity-indicator.jsx.map +0 -1
  463. package/dist/display/culture-date-time-label.jsx.map +0 -1
  464. package/dist/display/progress-bar.jsx.map +0 -1
  465. package/dist/display/separator.jsx.map +0 -1
  466. package/dist/display/shimmer.jsx.map +0 -1
  467. package/dist/display/title-with-line.jsx.map +0 -1
  468. package/dist/edge-panel/edge-panel.jsx.map +0 -1
  469. package/dist/edge-panel/helper.jsx.map +0 -1
  470. package/dist/edge-panel/types.jsx.map +0 -1
  471. package/dist/expander/expander.jsx.map +0 -1
  472. package/dist/fields/dictation.jsx.map +0 -1
  473. package/dist/fields/editor.jsx.map +0 -1
  474. package/dist/fields/input-policy.jsx.map +0 -1
  475. package/dist/fields/notch.jsx.map +0 -1
  476. package/dist/fields/outlined-field.jsx.map +0 -1
  477. package/dist/fields/pin-entry.jsx.map +0 -1
  478. package/dist/fields/search-entry.jsx.map +0 -1
  479. package/dist/fields/slot-layout.jsx.map +0 -1
  480. package/dist/fields/text-entry.jsx.map +0 -1
  481. package/dist/fields/use-dictation.jsx.map +0 -1
  482. package/dist/fields/use-text-input.jsx.map +0 -1
  483. package/dist/fields/validator.jsx.map +0 -1
  484. package/dist/guide/confirm-sheet.jsx.map +0 -1
  485. package/dist/guide/journey.jsx.map +0 -1
  486. package/dist/guide/placement.jsx.map +0 -1
  487. package/dist/guide/service.jsx.map +0 -1
  488. package/dist/guide/settings.jsx.map +0 -1
  489. package/dist/host/back.jsx.map +0 -1
  490. package/dist/host/hooks.jsx.map +0 -1
  491. package/dist/host/host.jsx.map +0 -1
  492. package/dist/host/keyboard.jsx.map +0 -1
  493. package/dist/host/layers.jsx.map +0 -1
  494. package/dist/host/page-loading-overlay.jsx.map +0 -1
  495. package/dist/host/readiness.jsx.map +0 -1
  496. package/dist/host/registry.jsx.map +0 -1
  497. package/dist/icon/icon.jsx.map +0 -1
  498. package/dist/icon/slot.jsx.map +0 -1
  499. package/dist/icon/swatch.jsx.map +0 -1
  500. package/dist/pickers/combo-box.jsx.map +0 -1
  501. package/dist/pickers/date-time-picker.jsx.map +0 -1
  502. package/dist/pickers/date-time.jsx.map +0 -1
  503. package/dist/pickers/picker-sheet.jsx.map +0 -1
  504. package/dist/pickers/picker.jsx.map +0 -1
  505. package/dist/pickers/timespan-picker.jsx.map +0 -1
  506. package/dist/pickers/timespan.jsx.map +0 -1
  507. package/dist/pickers/trigger.jsx.map +0 -1
  508. package/dist/pickers/wheel-column.jsx.map +0 -1
  509. package/dist/plus-button/model.jsx.map +0 -1
  510. package/dist/plus-button/plus-button.jsx.map +0 -1
  511. package/dist/popup/frame.jsx.map +0 -1
  512. package/dist/popup/input-form.jsx.map +0 -1
  513. package/dist/popup/input.jsx.map +0 -1
  514. package/dist/popup/popup-view.jsx.map +0 -1
  515. package/dist/popup/queue.jsx.map +0 -1
  516. package/dist/popup/service.jsx.map +0 -1
  517. package/dist/popup/types.jsx.map +0 -1
  518. package/dist/provider/contexts.jsx.map +0 -1
  519. package/dist/provider/global-events.jsx.map +0 -1
  520. package/dist/provider/hooks.jsx.map +0 -1
  521. package/dist/provider/provider.jsx.map +0 -1
  522. package/dist/provider/settings.jsx.map +0 -1
  523. package/dist/provider/theme-css.jsx.map +0 -1
  524. package/dist/provider/theme-root.jsx.map +0 -1
  525. package/dist/range-slider/math.jsx.map +0 -1
  526. package/dist/range-slider/range-slider.jsx.map +0 -1
  527. package/dist/route/hooks.jsx.map +0 -1
  528. package/dist/route/router.jsx.map +0 -1
  529. package/dist/selection/model.jsx.map +0 -1
  530. package/dist/selection/selection-sheet.jsx.map +0 -1
  531. package/dist/selection/use-selection-model.jsx.map +0 -1
  532. package/dist/selection/window.jsx.map +0 -1
  533. package/dist/sheet/frame.jsx.map +0 -1
  534. package/dist/sheet/gesture.jsx.map +0 -1
  535. package/dist/sheet/handoff.jsx.map +0 -1
  536. package/dist/sheet/header.jsx.map +0 -1
  537. package/dist/sheet/height-memo.jsx.map +0 -1
  538. package/dist/sheet/loadable.jsx.map +0 -1
  539. package/dist/sheet/motion.jsx.map +0 -1
  540. package/dist/sheet/options.jsx.map +0 -1
  541. package/dist/sheet/processing.jsx.map +0 -1
  542. package/dist/sheet/scroll-indicator.jsx.map +0 -1
  543. package/dist/sheet/service.jsx.map +0 -1
  544. package/dist/sheet/sheet.jsx.map +0 -1
  545. package/dist/sheet/sizing.jsx.map +0 -1
  546. package/dist/sheet/stack.jsx.map +0 -1
  547. package/dist/swipe/model.jsx.map +0 -1
  548. package/dist/swipe/swipe-view.jsx.map +0 -1
  549. package/dist/tab-bar/metrics.jsx.map +0 -1
  550. package/dist/tab-bar/model.jsx.map +0 -1
  551. package/dist/tab-bar/tab-bar.jsx.map +0 -1
  552. package/dist/tabs/model.jsx.map +0 -1
  553. package/dist/tabs/tab-view.jsx.map +0 -1
  554. package/dist/toast/service.jsx.map +0 -1
  555. package/dist/toast/store.jsx.map +0 -1
  556. package/dist/toggle/checkbox-math.jsx.map +0 -1
  557. package/dist/toggle/checkbox.jsx.map +0 -1
  558. package/dist/toggle/chip-group.jsx.map +0 -1
  559. package/dist/toggle/switch.jsx.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"sheet/stack.jsx","sources":["../../src/sheet/stack.ts"],"sourcesContent":["import type { ReactNode } from '@lynx-js/react';\nimport type { G9SheetBackAction, G9SheetBackSource, G9SheetOptions } from './options';\n\n// The sheet stack (MAUI G9BottomSheetHelper's stacking, replace, hand-off, back routing and lifecycle), independent\n// of rendering so it can be model-tested. The frame component reports motion ends (`markOpened`, `markClosed`); timer\n// fallbacks make every transition finish even when no motion event arrives.\n\n/** Why a sheet's result settled. Every sheet settles exactly once. */\nexport type G9SheetCloseReason =\n /** `handle.close()` / `closeAsync()`. */\n | 'closed'\n /** `closeAll()` (MAUI `CloseG9BottomSheet`). */\n | 'closeAll'\n /** The header back/close button or `closeTop()`. */\n | 'toolbarButton'\n /** Hardware back / desktop Escape. */\n | 'hardwareButton'\n /** A tap on the scrim. */\n | 'overlayTap'\n /** Dragged closed. */\n | 'drag'\n /** Replaced in place or handed off to a successor. */\n | 'replaced'\n /** A queued request displaced by a newer one before it opened. */\n | 'displaced'\n /** The host unmounted. */\n | 'unmount';\n\n/** The result of one sheet. */\nexport interface G9SheetResult {\n readonly reason: G9SheetCloseReason;\n}\n\n/** What a sheet shows: a node, or a factory built after the open motion (deferred content). */\nexport type G9SheetContent = ReactNode | (() => ReactNode);\n\n/** Lifecycle status of an entry. */\nexport type G9SheetStatus = 'queued' | 'opening' | 'open' | 'closing' | 'closed';\n\n/** One sheet of the stack (read-only snapshot for rendering). */\nexport interface G9SheetEntry {\n readonly id: number;\n /** Identity of the rendered frame; kept by an in-place replace. */\n readonly frameKey: number;\n readonly content: G9SheetContent;\n readonly options: G9SheetOptions;\n readonly status: G9SheetStatus;\n /** Bumped by an in-place replace (the frame cross-fades its body). */\n readonly version: number;\n /** The sheet above this one recedes it. */\n readonly receded: boolean;\n /** Close motion runs at half duration (replace fallback). */\n readonly quickClose: boolean;\n /** The entry is handing its dim to a successor (its scrim is transparent). */\n readonly handingOff: boolean;\n /**\n * The entry took the dim over from the sheet before it (a hand-off, or a sheet shown right after another closed): while\n * it opens its dim stands at full strength from the first frame instead of fading in from nothing.\n */\n readonly inheritsDim: boolean;\n /** Closing without a visible motion (whole-stack teardown keeps recede links static). */\n readonly reason: G9SheetCloseReason | null;\n}\n\n/** A handle to one sheet (MAUI `IG9BottomSheetHandle`, sheet-scoped). */\nexport interface G9SheetHandle {\n readonly id: number;\n /** Settles once with the close reason, after the sheet left the screen. */\n readonly result: Promise<G9SheetResult>;\n /** `true` until the sheet started closing. */\n readonly isOpen: boolean;\n /** Closes this sheet (MAUI owned-handle `Close`). */\n close(): void;\n /** Closes this sheet and resolves when it is gone (MAUI `CloseAsync`). */\n closeAsync(): Promise<void>;\n /** Opens another sheet on top (MAUI `Show`, auto-stacking). */\n show(content: G9SheetContent, options?: G9SheetOptions): G9SheetHandle | null;\n /** Back-routes the top sheet (MAUI `CloseTop`). */\n closeTop(): void;\n}\n\n/** Timing and policy the stack needs from its host. */\nexport interface G9SheetStackConfig {\n /** Monotonic ms. */\n now(): number;\n setTimer(callback: () => void, ms: number): unknown;\n clearTimer(handle: unknown): void;\n /** Open/close durations (ms) for an entry's fallback timers. */\n durations(options: G9SheetOptions): { open: number; close: number };\n /** Hand-off needs the staged pipeline (`settings.stageBeforeShow`). */\n stageBeforeShow(): boolean;\n /**\n * Longest a hand-off waits for its successor to report open before the predecessor closes anyway (ms; MAUI\n * `PreOpenMaxHoldMs`). Default: only the successor's open fallback timer bounds it.\n */\n preOpenMaxHoldMs?(): number;\n /** A lifecycle callback threw. */\n onError?(error: unknown): void;\n}\n\n/** MAUI `G9SafeCommand` throttle window shared by show and replace. */\nexport const g9SheetShowThrottleMs = 369;\n/** Grace after the close motion before cleanup (MAUI page-side reset). */\nexport const g9SheetCloseGraceMs = 48;\n/**\n * A modal sheet shown this soon after another began closing takes its place at once (a successor) instead of waiting\n * for the close to end: «close the menu, open the chosen sheet» in one tap otherwise faded the page's dim out to nothing\n * and in again (AgriPad «فهرست‌ها» → «دانلود تصویر پهپاد», DOOGEE round 2026-11-12, TR-0062).\n */\nexport const g9SheetHandOffWindowMs = 120;\n/** How long the leaving sheet keeps its dim under a successor's newly created one (two frames at 60 Hz). */\nexport const g9SheetDimHandOverMs = 34;\n\ninterface MutableEntry {\n id: number;\n frameKey: number;\n content: G9SheetContent;\n options: G9SheetOptions;\n status: G9SheetStatus;\n version: number;\n receded: boolean;\n quickClose: boolean;\n handingOff: boolean;\n inheritsDim: boolean;\n closeStartedAt: number;\n reason: G9SheetCloseReason | null;\n settle: (result: G9SheetResult) => void;\n handle: G9SheetHandle;\n timer: unknown;\n successorOf: number | null;\n closingStarted: boolean;\n backBusy: boolean;\n}\n\n/** The stack of one host. */\nexport class G9SheetStack {\n private readonly config: G9SheetStackConfig;\n private entries: MutableEntry[] = [];\n private pending: MutableEntry | null = null;\n private lastShow = Number.NEGATIVE_INFINITY;\n private nextId = 1;\n private readonly listeners = new Set<() => void>();\n private snapshot: ReadonlyArray<G9SheetEntry> = [];\n private disposed = false;\n\n constructor(config: G9SheetStackConfig) {\n this.config = config;\n }\n\n // ---- observation ---------------------------------------------------------------------------------------------\n\n /** Entries bottom first (closing ones included until removed). The same array until something changes. */\n getSnapshot(): ReadonlyArray<G9SheetEntry> {\n return this.snapshot;\n }\n\n subscribe(listener: () => void): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n /** Open sheets (MAUI `GetOpenSheetCount`): not closing, not queued. */\n openCount(): number {\n return this.entries.filter((e) => e.status === 'opening' || e.status === 'open').length;\n }\n\n /** The top open sheet, or `null`. */\n top(): G9SheetEntry | null {\n const open = this.live();\n return open.length > 0 ? this.view(open[open.length - 1] as MutableEntry) : null;\n }\n\n // ---- entry points (MAUI helper) ------------------------------------------------------------------------------\n\n /**\n * Shows a sheet (MAUI `ShowG9BottomSheet`): stacks on an open sheet, hands off with `replaceCurrentSheet`, queues\n * behind a closing primary (one pending request; a newer one displaces it), else opens as primary. Returns `null`\n * when throttled (a second show/replace within 369 ms).\n */\n show(content: G9SheetContent, options: G9SheetOptions = {}, throttle = true): G9SheetHandle | null {\n if (this.disposed) return null;\n if (throttle && !this.passThrottle()) return null;\n const entry = this.create(content, options);\n const live = this.live();\n if (options.replaceCurrentSheet && live.length === 1 && this.config.stageBeforeShow()) {\n const old = live[0] as MutableEntry;\n old.handingOff = true;\n entry.inheritsDim = old.options.isModal !== false && options.isModal !== false;\n entry.successorOf = old.id;\n this.push(entry);\n const hold = this.config.preOpenMaxHoldMs?.();\n if (hold !== undefined) {\n this.config.setTimer(() => {\n if (entry.successorOf === old.id && entry.status === 'opening') this.beginClose(old, 'replaced');\n }, hold);\n }\n return entry.handle;\n }\n if (live.length > 0) {\n this.push(entry);\n return entry.handle;\n }\n const leaving = this.entries.find(\n (e) =>\n e.status === 'closing' &&\n e.options.isModal !== false &&\n this.config.now() - e.closeStartedAt <= g9SheetHandOffWindowMs,\n );\n if (leaving && options.isModal !== false) {\n // The one that just began closing goes on underneath; its dim is handed over once the successor's is drawn — a\n // new frame needs a frame or two to exist, and dropping the old dim in the same render lit the page for one frame.\n entry.inheritsDim = true;\n this.push(entry);\n this.config.setTimer(() => {\n if (leaving.status !== 'closing') return;\n leaving.handingOff = true;\n this.emit();\n }, g9SheetDimHandOverMs);\n return entry.handle;\n }\n if (this.entries.some((e) => e.status === 'closing')) {\n if (this.pending) this.finish(this.pending, 'displaced', false);\n entry.status = 'queued';\n this.pending = entry;\n for (const e of this.entries) if (e.status === 'closing') this.hurry(e);\n this.emit();\n return entry.handle;\n }\n this.push(entry);\n return entry.handle;\n }\n\n /**\n * Replaces the open sheet (MAUI `ReplaceG9BottomSheet`): in place (same frame, body cross-fade, old lifecycle not\n * run) when one fit, modal sheet is open and the new one is fit and modal without a full-screen placeholder;\n * otherwise the top sheet quick-closes through its back route and the new one opens. Throttled like `show`.\n */\n replace(content: G9SheetContent, options: G9SheetOptions = {}): G9SheetHandle | null {\n if (this.disposed) return null;\n if (!this.passThrottle()) return null;\n const live = this.live();\n const current = live.length === 1 ? (live[0] as MutableEntry) : null;\n const fit = (o: G9SheetOptions) => o.sizeMode === 'fitToContent';\n const modal = (o: G9SheetOptions) => o.isModal !== false;\n if (\n current &&\n fit(current.options) &&\n modal(current.options) &&\n fit(options) &&\n modal(options) &&\n !options.useFullScreenLoadingPlaceholder\n ) {\n const entry = this.create(content, { ...options, deferContent: false });\n entry.frameKey = current.frameKey;\n entry.version = current.version + 1;\n entry.status = 'open';\n const index = this.entries.indexOf(current);\n this.entries[index] = entry;\n this.clearTimer(current);\n current.status = 'closed';\n current.settle({ reason: 'replaced' });\n this.emit();\n this.safe(() => options.onOpened?.());\n return entry.handle;\n }\n const top = live[live.length - 1];\n if (top) {\n top.quickClose = true;\n void this.requestBack(top.id, 'toolbarButton');\n }\n return this.show(content, options, false);\n }\n\n /** Back-routes the top sheet as the toolbar button would (MAUI `CloseTopG9BottomSheet`). */\n closeTop(): void {\n const top = this.live().pop();\n if (top) void this.requestBack(top.id, 'toolbarButton');\n }\n\n /** Closes every sheet, stacked ones first (MAUI `CloseG9BottomSheet`). */\n closeAll(): void {\n const live = this.live();\n for (let i = live.length - 1; i >= 0; i--) this.beginClose(live[i] as MutableEntry, 'closeAll');\n if (this.pending) this.finish(this.pending, 'displaced', false);\n this.pending = null;\n }\n\n /** Hardware back (MAUI `HandleHardwareBackPressed`): `false` when no sheet is open, else routes it and `true`. */\n handleHardwareBack(): boolean {\n const top = this.live().pop();\n if (!top) return false;\n void this.requestBack(top.id, 'hardwareButton');\n return true;\n }\n\n /**\n * A back request for one sheet (MAUI `HandleBackRequest`): an overlay tap on a non-cancelable sheet is ignored;\n * `onBackRequested` decides when set; otherwise hardware back closes only with `hardwareBackCloses`, every other\n * source closes. Resolves `true` when the sheet closes.\n */\n async requestBack(id: number, source: G9SheetBackSource): Promise<boolean> {\n const entry = this.entries.find((e) => e.id === id);\n if (!entry || (entry.status !== 'open' && entry.status !== 'opening') || entry.backBusy) return false;\n const o = entry.options;\n if ((source === 'overlayTap' || source === 'drag') && o.isCancelable === false) return false;\n let close: boolean;\n if (o.onBackRequested) {\n entry.backBusy = true;\n let action: G9SheetBackAction = 'doNothing';\n try {\n action = await o.onBackRequested(source);\n } catch (error) {\n this.config.onError?.(error);\n } finally {\n entry.backBusy = false;\n }\n close = action === 'close';\n } else {\n close = source !== 'hardwareButton' || o.hardwareBackCloses !== false;\n }\n if (!close) return false;\n const reason: G9SheetCloseReason =\n source === 'toolbarButton'\n ? 'toolbarButton'\n : source === 'hardwareButton'\n ? 'hardwareButton'\n : source === 'overlayTap'\n ? 'overlayTap'\n : 'drag';\n return this.beginClose(entry, reason);\n }\n\n /** Updates the content (and options) of an open sheet in place, without any transition (declarative sheets). */\n update(id: number, content: G9SheetContent, options?: G9SheetOptions): void {\n const entry = this.entries.find((e) => e.id === id);\n if (!entry || entry.status === 'closed') return;\n entry.content = content;\n if (options) entry.options = options;\n this.emit();\n }\n\n /** Closes one sheet (owned handle `Close`). */\n close(id: number, reason: G9SheetCloseReason = 'closed'): boolean {\n const entry = this.entries.find((e) => e.id === id) ?? (this.pending?.id === id ? this.pending : undefined);\n if (!entry) return false;\n if (entry === this.pending) {\n this.pending = null;\n this.finish(entry, reason, false);\n return true;\n }\n return this.beginClose(entry, reason);\n }\n\n // ---- frame reports ---------------------------------------------------------------------------------------------\n\n /** The frame finished its open motion. */\n markOpened(id: number): void {\n const entry = this.entries.find((e) => e.id === id);\n if (entry?.status !== 'opening') return;\n this.clearTimer(entry);\n entry.status = 'open';\n this.emit();\n this.safe(() => entry.options.onOpened?.());\n if (entry.successorOf !== null) {\n const old = this.entries.find((e) => e.id === entry.successorOf);\n if (old) this.beginClose(old, 'replaced');\n }\n }\n\n /** The frame finished its close motion. */\n markClosed(id: number): void {\n const entry = this.entries.find((e) => e.id === id);\n if (entry?.status !== 'closing') return;\n this.clearTimer(entry);\n entry.timer = this.config.setTimer(() => this.remove(entry), g9SheetCloseGraceMs);\n }\n\n /** Host unmount: every sheet settles with `'unmount'`; nothing opens afterwards. */\n dispose(): void {\n if (this.disposed) return;\n this.disposed = true;\n if (this.pending) this.finish(this.pending, 'unmount', false);\n this.pending = null;\n for (const entry of [...this.entries]) {\n this.clearTimer(entry);\n if (entry.status !== 'closed') {\n if (!entry.closingStarted) this.safe(() => entry.options.onClosing?.());\n this.finish(entry, entry.reason ?? 'unmount', true);\n }\n }\n this.entries = [];\n this.emit();\n }\n\n // ---- internals -------------------------------------------------------------------------------------------------\n\n private live(): MutableEntry[] {\n return this.entries.filter((e) => e.status === 'opening' || e.status === 'open');\n }\n\n private passThrottle(): boolean {\n const now = this.config.now();\n if (now - this.lastShow < g9SheetShowThrottleMs) return false;\n this.lastShow = now;\n return true;\n }\n\n private create(content: G9SheetContent, options: G9SheetOptions): MutableEntry {\n const id = this.nextId++;\n let settle!: (result: G9SheetResult) => void;\n const result = new Promise<G9SheetResult>((resolve) => {\n settle = resolve;\n });\n const entry: MutableEntry = {\n id,\n frameKey: id,\n content,\n options,\n status: 'opening',\n version: 0,\n receded: false,\n quickClose: false,\n handingOff: false,\n inheritsDim: false,\n closeStartedAt: Number.NEGATIVE_INFINITY,\n reason: null,\n settle,\n timer: null,\n successorOf: null,\n closingStarted: false,\n backBusy: false,\n handle: {\n id,\n result,\n get isOpen() {\n return entry.status === 'opening' || entry.status === 'open' || entry.status === 'queued';\n },\n close: () => {\n this.close(id);\n },\n closeAsync: async () => {\n this.close(id);\n await result;\n },\n show: (c, o) => this.show(c, o),\n closeTop: () => this.closeTop(),\n },\n };\n return entry;\n }\n\n private push(entry: MutableEntry): void {\n const parent = this.live().pop();\n if (\n parent &&\n entry.successorOf === null &&\n entry.options.recedeParentOnStack !== false &&\n !this.isFullScreen(parent)\n ) {\n parent.receded = true;\n }\n entry.status = 'opening';\n this.entries.push(entry);\n this.safe(() => entry.options.onOpening?.());\n entry.timer = this.config.setTimer(() => this.markOpened(entry.id), this.config.durations(entry.options).open);\n this.emit();\n }\n\n private isFullScreen(entry: MutableEntry): boolean {\n const states = entry.options.states;\n return entry.options.sizeMode !== 'fitToContent' && !!states && states.length === 1 && states[0] === 'large';\n }\n\n private beginClose(entry: MutableEntry, reason: G9SheetCloseReason): boolean {\n if (entry.status === 'closing' || entry.status === 'closed') return false;\n if (entry.status === 'queued') {\n this.finish(entry, reason, false);\n return true;\n }\n this.clearTimer(entry);\n entry.status = 'closing';\n entry.reason = reason;\n entry.closingStarted = true;\n entry.closeStartedAt = this.config.now();\n this.safe(() => entry.options.onClosing?.());\n // A successor still staging hands the primary back.\n for (const e of this.entries) if (e.successorOf === entry.id && e.status !== 'closed') e.successorOf = null;\n // A sheet closing because its successor took over keeps its dim handed over: clearing the flag here brought its\n // scrim back to full strength under the successor's for the whole close motion, then removed it — the page behind\n // went darker and lighter again on every hand-off (AgriPad «عملیات» → «گزارش جدید», TR-0062, 2026-11-12).\n if (reason !== 'replaced') entry.handingOff = false;\n const close = this.config.durations(entry.options).close * (entry.quickClose ? 0.5 : 1);\n entry.timer = this.config.setTimer(() => this.remove(entry), close + g9SheetCloseGraceMs);\n this.restoreParent(entry);\n this.emit();\n return true;\n }\n\n /** Quick close of an entry already closing: its removal comes at half the close duration from now. */\n private hurry(entry: MutableEntry): void {\n if (entry.quickClose) return;\n entry.quickClose = true;\n this.clearTimer(entry);\n const close = this.config.durations(entry.options).close * 0.5;\n entry.timer = this.config.setTimer(() => this.remove(entry), close + g9SheetCloseGraceMs);\n }\n\n private restoreParent(closing: MutableEntry): void {\n const index = this.entries.indexOf(closing);\n const parents = this.entries.slice(0, index).filter((e) => e.status === 'opening' || e.status === 'open');\n const parent = parents[parents.length - 1];\n const stillAbove = this.entries.slice(index + 1).some((e) => e.status === 'opening' || e.status === 'open');\n if (parent && !stillAbove) parent.receded = false;\n }\n\n private remove(entry: MutableEntry): void {\n this.clearTimer(entry);\n const index = this.entries.indexOf(entry);\n if (index >= 0) this.entries.splice(index, 1);\n this.finish(entry, entry.reason ?? 'closed', true);\n if (this.pending && !this.entries.some((e) => e.status === 'closing') && this.live().length === 0) {\n const next = this.pending;\n this.pending = null;\n this.push(next);\n return;\n }\n this.emit();\n }\n\n private finish(entry: MutableEntry, reason: G9SheetCloseReason, runClosed: boolean): void {\n if (entry.status === 'closed') return;\n entry.status = 'closed';\n entry.reason = entry.reason ?? reason;\n if (runClosed) this.safe(() => entry.options.onClosed?.());\n entry.settle({ reason: entry.reason });\n }\n\n private clearTimer(entry: MutableEntry): void {\n if (entry.timer !== null) this.config.clearTimer(entry.timer);\n entry.timer = null;\n }\n\n private safe(action: () => void): void {\n try {\n action();\n } catch (error) {\n this.config.onError?.(error);\n }\n }\n\n private view(entry: MutableEntry): G9SheetEntry {\n return {\n id: entry.id,\n frameKey: entry.frameKey,\n content: entry.content,\n options: entry.options,\n status: entry.status,\n version: entry.version,\n receded: entry.receded,\n quickClose: entry.quickClose,\n handingOff: entry.handingOff,\n inheritsDim: entry.inheritsDim,\n reason: entry.reason,\n };\n }\n\n private emit(): void {\n this.snapshot = this.entries.map((e) => this.view(e));\n for (const listener of [...this.listeners]) listener();\n }\n\n /** The handle of an entry (frames inject it into their content). */\n handleOf(id: number): G9SheetHandle | null {\n return this.entries.find((e) => e.id === id)?.handle ?? null;\n }\n}\n"],"names":["g9SheetShowThrottleMs","g9SheetCloseGraceMs","g9SheetHandOffWindowMs","g9SheetDimHandOverMs","G9SheetStack","listener","e","open","content","options","throttle","entry","live","_this_config","old","hold","undefined","leaving","current","fit","o","modal","index","top","i","id","source","close","action","error","reason","_this_entries_find","_this_pending","_entry_options","_entry_reason","now","settle","result","Promise","resolve","Number","c","parent","states","closing","parents","stillAbove","next","runClosed","config","Set"],"mappings":";;;;;;;;;;AAqGO,MAAMA,wBAAwB;AAE9B,MAAMC,sBAAsB;AAM5B,MAAMC,yBAAyB;AAE/B,MAAMC,uBAAuB;AAwB7B,MAAMC;IAiBX,cAA2C;QACzC,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,UAAUC,QAAoB,EAAc;QAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAACA;QACnB,OAAO;YACL,IAAI,CAAC,SAAS,CAAC,MAAM,CAACA;QACxB;IACF;IAGA,YAAoB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAACC,IAAMA,AAAa,cAAbA,EAAE,MAAM,IAAkBA,AAAa,WAAbA,EAAE,MAAM,EAAa,MAAM;IACzF;IAGA,MAA2B;QACzB,MAAMC,OAAO,IAAI,CAAC,IAAI;QACtB,OAAOA,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,CAACA,IAAI,CAACA,KA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,YAAY;eAAI,IAAI,CAAC,SAAS;SAAC,CAAEA;IAC9C;IAGA,SAASoB,EAAU,EAAwB;;YAClCM;QAAP,OAAO,QAAP,gBAAOA,CAAAA,qBAAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAACzB,IAAMA,EAAE,EAAE,KAAKmB,GAAE,IAApCM,KAAAA,IAAAA,mBAAuC,MAAM,AAAD,IAAC,OAAI;IAC1D;IA/aA,YAAYkB,MAA0B,CAAE;QATxC,uBAAiB,UAAjB;QACA,uBAAQ,WAA0B,EAAE;QACpC,uBAAQ,WAA+B;QACvC,uBAAQ,YAAWT,MAAwB;QAC3C,uBAAQ,UAAS;QACjB,uBAAiB,aAAY,IAAIU;QACjC,uBAAQ,YAAwC,EAAE;QAClD,uBAAQ,YAAW;QAGjB,IAAI,CAAC,MAAM,GAAGD;IAChB;AA8aF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"swipe/model.jsx","sources":["../../src/swipe/model.ts"],"sourcesContent":["import type { G9IconInput } from '../icon/icon';\n\n/** Pane width when an action sets none (MAUI `G9SwipeView.DefaultActionWidth`). */\nexport const g9SwipeDefaultActionWidth = 88;\n/** Outer card radius (MAUI `G9SwipeView.CornerRadius` default, `RadiusMd`). */\nexport const g9SwipeDefaultCornerRadius = 14;\n/** Snap animation after a release or a programmatic open / close. */\nexport const g9SwipeSnapMs = 200;\n\n/** One action pane of a swipe row (MAUI `G9SwipeAction`). Change a field and re-render to update it in place. */\nexport interface G9SwipeAction {\n /** Label under the icon; localize before assigning. */\n readonly text?: string | null;\n readonly icon?: G9IconInput;\n /** Pane fill. Default primary, or error when `isDestructive`. */\n readonly background?: string | null;\n /** Icon and label colour. Default on-primary, or on-error when `isDestructive`. */\n readonly foreground?: string | null;\n readonly isDestructive?: boolean;\n /** Hidden panes keep their place in the list but take no width. Default true. */\n readonly isVisible?: boolean;\n /** A disabled pane ignores taps without dimming. Default true. */\n readonly isEnabled?: boolean;\n /** Icon size. Default 22. */\n readonly iconSize?: number;\n /** Pane width. Default {@link g9SwipeDefaultActionWidth}. */\n readonly widthRequest?: number;\n /** Runs on a tap with `commandParameter`; an async command runs once until it settles (MAUI `Command`). */\n readonly command?: (parameter: unknown) => void | Promise<void>;\n readonly commandParameter?: unknown;\n /** Raised on a tap, before the command (MAUI `Invoked`). */\n readonly onInvoked?: (action: G9SwipeAction) => void;\n}\n\n/** Colours of a pane (MAUI theme resolution with the destructive shortcut; explicit colours win). */\nexport function swipeActionColors(action: G9SwipeAction): { readonly background: string; readonly foreground: string } {\n const destructive = action.isDestructive === true;\n return {\n background: action.background ?? (destructive ? 'var(--g9-error)' : 'var(--g9-primary)'),\n foreground: action.foreground ?? (destructive ? 'var(--g9-on-error)' : 'var(--g9-on-primary)'),\n };\n}\n\n/** Total width of the visible panes on one edge. */\nexport function swipePaneWidth(actions: readonly G9SwipeAction[] | null | undefined): number {\n let width = 0;\n for (const action of actions ?? []) {\n if (action.isVisible === false) continue;\n width += action.widthRequest ?? g9SwipeDefaultActionWidth;\n }\n return width;\n}\n\n/**\n * Physical pane widths: leading actions sit on the reading-start edge (left in LTR, right in RTL), so a positive\n * translation (body moved right) reveals the physical-left pane.\n */\nexport function swipePhysicalWidths(\n leading: number,\n trailing: number,\n rtl: boolean,\n): { readonly left: number; readonly right: number } {\n return rtl ? { left: trailing, right: leading } : { left: leading, right: trailing };\n}\n\n/**\n * Where a released body settles (MAUI Windows drag: past half the pane snaps open, else closed). `translate` is the\n * body's x offset; returns `leftWidth` (left pane open), `-rightWidth` (right pane open) or 0.\n */\nexport function swipeSnap(translate: number, leftWidth: number, rightWidth: number): number {\n if (translate > 0 && leftWidth > 0 && translate > leftWidth / 2) return leftWidth;\n if (translate < 0 && rightWidth > 0 && -translate > rightWidth / 2) return -rightWidth;\n return 0;\n}\n\n/**\n * Where a drag puts the body: inside [-rightWidth, leftWidth]. lynx-ui `Draggable` clamps the finger's DELTA to its bounds,\n * not the resulting position, so with the pane widths as bounds a FULLY open row (at -84) could not be dragged back: every\n * drag toward closed was a delta outside [-84, 0] (AgriPad TR-0070, ITCS-16237 — «once fully open it stays open»). The row\n * gives `Draggable` the whole travel as its delta bounds and clamps the position here, every frame.\n */\nexport function swipeDragTarget(x: number, leftWidth: number, rightWidth: number): number {\n return Math.min(Math.max(x, -rightWidth), leftWidth);\n}\n\n/** Main-thread twin of {@link swipeDragTarget}. */\nexport function swipeDragTargetMT(x: number, leftWidth: number, rightWidth: number): number {\n 'main thread';\n return Math.min(Math.max(x, -rightWidth), leftWidth);\n}\n\n/** Main-thread twin of {@link swipeSnap} (plan/specs/02 §3). */\nexport function swipeSnapMT(translate: number, leftWidth: number, rightWidth: number): number {\n 'main thread';\n if (translate > 0 && leftWidth > 0 && translate > leftWidth / 2) return leftWidth;\n if (translate < 0 && rightWidth > 0 && -translate > rightWidth / 2) return -rightWidth;\n return 0;\n}\n\n/**\n * The single-open policy shared by the rows of a list (one open row at a time): opening a row closes the one open\n * before it. Rows use the nearest {@link G9SwipeGroup} context, else one default group.\n */\nexport interface G9SwipeGroupStore {\n /** Marks `id` open; closes the previously open row. */\n opened(id: string, close: () => void): void;\n /** Marks `id` closed (no-op when another row is the open one). */\n closed(id: string): void;\n /** Closes the open row, if any. */\n closeAll(): void;\n readonly openId: string | null;\n}\n\n/**\n * A swipe group: at most one row of the group is open; opening another closes the previous one (MAUI\n * `G9SwipeGroup`). `<G9SwipeGroup>` creates one; create your own to share it across lists.\n */\nexport function createSwipeGroup(): G9SwipeGroupStore {\n let open: { id: string; close: () => void } | null = null;\n return {\n opened(id, close) {\n if (open && open.id !== id) open.close();\n open = { id, close };\n },\n closed(id) {\n if (open?.id === id) open = null;\n },\n closeAll() {\n const current = open;\n open = null;\n current?.close();\n },\n get openId() {\n return open?.id ?? null;\n },\n };\n}\n"],"names":["g9SwipeDefaultActionWidth","g9SwipeDefaultCornerRadius","g9SwipeSnapMs","swipeActionColors","action","_action_background","_action_foreground","destructive","swipePaneWidth","actions","width","_action_widthRequest","swipePhysicalWidths","leading","trailing","rtl","swipeSnap","translate","leftWidth","rightWidth","swipeDragTarget","x","Math","swipeDragTargetMT","swipeSnapMT","createSwipeGroup","open","id","close","current"],"mappings":"AAGO,MAAMA,4BAA4B;AAElC,MAAMC,6BAA6B;AAEnC,MAAMC,gBAAgB;AA4BtB,SAASC,kBAAkBC,MAAqB;QAGvCC,oBACAC;IAHd,MAAMC,cAAcH,AAAyB,SAAzBA,OAAO,aAAa;IACxC,OAAO;QACL,YAAY,QAAAC,CAAAA,qBAAAA,OAAO,UAAU,AAAD,IAAhBA,qBAAsBE,cAAc,oBAAoB;QACpE,YAAY,QAAAD,CAAAA,qBAAAA,OAAO,UAAU,AAAD,IAAhBA,qBAAsBC,cAAc,uBAAuB;IACzE;AACF;AAGO,SAASC,eAAeC,OAAoD;IACjF,IAAIC,QAAQ;IACZ,KAAK,MAAMN,UAAUK,QAAAA,UAAAA,UAAW,EAAE,CAAE;YAEzBE;QADT,IAAIP,AAAqB,UAArBA,OAAO,SAAS,EACpBM,SAAS,QAAAC,CAAAA,uBAAAA,OAAO,YAAY,AAAD,IAAlBA,uBAAuBX;IAClC;IACA,OAAOU;AACT;AAMO,SAASE,oBACdC,OAAe,EACfC,QAAgB,EAChBC,GAAY;IAEZ,OAAOA,MAAM;QAAE,MAAMD;QAAU,OAAOD;IAAQ,IAAI;QAAE,MAAMA;QAAS,OAAOC;IAAS;AACrF;AAMO,SAASE,UAAUC,SAAiB,EAAEC,SAAiB,EAAEC,UAAkB;IAChF,IAAIF,YAAY,KAAKC,YAAY,KAAKD,YAAYC,YAAY,GAAG,OAAOA;IACxE,IAAID,YAAY,KAAKE,aAAa,KAAK,CAACF,YAAYE,aAAa,GAAG,OAAO,CAACA;IAC5E,OAAO;AACT;AAQO,SAASC,gBAAgBC,CAAS,EAAEH,SAAiB,EAAEC,UAAkB;IAC9E,OAAOG,KAAK,GAAG,CAACA,KAAK,GAAG,CAACD,GAAG,CAACF,aAAaD;AAC5C;AAGO,SAASK,kBAAkBF,CAAS,EAAEH,SAAiB,EAAEC,UAAkB;IAChF;IACA,OAAOG,KAAK,GAAG,CAACA,KAAK,GAAG,CAACD,GAAG,CAACF,aAAaD;AAC5C;AAGO,SAASM,YAAYP,SAAiB,EAAEC,SAAiB,EAAEC,UAAkB;IAClF;IACA,IAAIF,YAAY,KAAKC,YAAY,KAAKD,YAAYC,YAAY,GAAG,OAAOA;IACxE,IAAID,YAAY,KAAKE,aAAa,KAAK,CAACF,YAAYE,aAAa,GAAG,OAAO,CAACA;IAC5E,OAAO;AACT;AAoBO,SAASM;IACd,IAAIC,OAAiD;IACrD,OAAO;QACL,QAAOC,EAAE,EAAEC,KAAK;YACd,IAAIF,QAAQA,KAAK,EAAE,KAAKC,IAAID,KAAK,KAAK;YACtCA,OAAO;gBAAEC;gBAAIC;YAAM;QACrB;QACA,QAAOD,EAAE;YACP,IAAID,AAAAA,CAAAA,QAAAA,OAAAA,KAAAA,IAAAA,KAAM,EAAE,AAAD,MAAMC,IAAID,OAAO;QAC9B;QACA;YACE,MAAMG,UAAUH;YAChBA,OAAO;YACPG,QAAAA,WAAAA,QAAS,KAAK;QAChB;QACA,IAAI;;YACF,OAAO,QAAP,QAAOH,QAAAA,OAAAA,KAAAA,IAAAA,KAAM,EAAE,AAAD,IAAC,OAAI;QACrB;IACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"swipe/swipe-view.jsx","sources":["../../src/swipe/swipe-view.tsx"],"sourcesContent":["import './swipe.css';\nimport { Draggable, type DraggableRef } from '@lynx-js/lynx-ui-draggable';\nimport {\n createContext,\n type ReactNode,\n runOnMainThread,\n useContext,\n useEffect,\n useMainThreadRef,\n useRef,\n useState,\n} from '@lynx-js/react';\nimport { G9Icon } from '../icon/icon';\nimport { useG9Diagnostics, useG9Direction } from '../provider/hooks';\nimport {\n createSwipeGroup,\n type G9SwipeAction,\n type G9SwipeGroupStore,\n g9SwipeDefaultCornerRadius,\n g9SwipeSnapMs,\n swipeActionColors,\n swipeDragTargetMT,\n swipePaneWidth,\n swipePhysicalWidths,\n swipeSnap,\n swipeSnapMT,\n} from './model';\n\nconst defaultGroup = createSwipeGroup();\nlet rowSequence = 0;\nconst SwipeGroupContext = createContext<G9SwipeGroupStore>(defaultGroup);\n\n/** Scopes the one-open-row policy to a list (rows outside any group share one default group). */\nexport function G9SwipeGroup(props: { readonly group?: G9SwipeGroupStore; readonly children?: ReactNode }): ReactNode {\n const own = useRef<G9SwipeGroupStore | null>(null);\n if (own.current === null) own.current = props.group ?? createSwipeGroup();\n return <SwipeGroupContext.Provider value={props.group ?? own.current}>{props.children}</SwipeGroupContext.Provider>;\n}\n\n/** Props of {@link G9SwipeView} (MAUI bindable properties). */\nexport interface G9SwipeViewProps {\n /** Revealed on the leading edge: left in LTR, right in RTL (MAUI `LeftActions`). */\n readonly leftActions?: readonly G9SwipeAction[];\n /** Revealed on the trailing edge: right in LTR, left in RTL (MAUI `RightActions`). */\n readonly rightActions?: readonly G9SwipeAction[];\n /** The card body (MAUI `CardContent`); `children` works too. Give it an opaque, square, strokeless fill. */\n readonly cardContent?: ReactNode;\n readonly children?: ReactNode;\n /** Outer card radius; the panes are clipped to it. Default 14. */\n readonly cornerRadius?: number;\n readonly cardBackground?: string | null;\n readonly cardStroke?: string | null;\n readonly cardStrokeThickness?: number;\n /**\n * The item this row shows. When it changes (a recycled `<list>` row rebound to another item) the row closes\n * instantly, so a reused row never shows the previous item's open pane.\n */\n readonly itemKey?: string | number;\n /** Told when the row opens a side or closes. */\n readonly onOpenChange?: (side: 'leading' | 'trailing' | null) => void;\n readonly className?: string;\n}\n\n/**\n * A card row with swipe-to-reveal action panes on both edges (MAUI `G9SwipeView`). The panes sit behind the body, so\n * the body must be opaque (MAUI's \"flat but opaque\" rule). The drag lives in lynx-ui\n * `Draggable` (touch and mouse, so desktop works like MAUI's Windows drag); release snaps open past half a pane, else\n * closed (`swipeSnapMT` on the main thread, `swipeSnap` on the background, the same rule). One open row at a time per\n * {@link G9SwipeGroup}; a tap on a pane runs its action once and closes; a tap on an open body closes it.\n */\nexport function G9SwipeView(props: G9SwipeViewProps): ReactNode {\n const idRef = useRef<string | null>(null);\n if (idRef.current === null) {\n rowSequence += 1;\n idRef.current = `g9-swipe-${rowSequence}`;\n }\n const id = idRef.current;\n const group = useContext(SwipeGroupContext);\n const diagnostics = useG9Diagnostics();\n const rtl = useG9Direction() === 'rtl';\n const leading = (props.leftActions ?? []).filter((a) => a.isVisible !== false);\n const trailing = (props.rightActions ?? []).filter((a) => a.isVisible !== false);\n const widths = swipePhysicalWidths(swipePaneWidth(leading), swipePaneWidth(trailing), rtl);\n const leftActions = rtl ? trailing : leading;\n const rightActions = rtl ? leading : trailing;\n const [offset, setOffset] = useState(0);\n const offsetRef = useRef(0);\n offsetRef.current = offset;\n const dragRef = useMainThreadRef<DraggableRef | null>(null);\n const running = useRef(new Set<G9SwipeAction>());\n const latest = useRef(props);\n latest.current = props;\n\n const moveMT = (x: number, animated: boolean) => {\n 'main thread';\n dragRef.current?.MTSSetOtherStyles({ transition: animated ? `transform ${g9SwipeSnapMs}ms ease-out` : 'none' });\n dragRef.current?.MTSSetTransform(x, 0);\n };\n const report = (next: number) => {\n const side = next === 0 ? null : next > 0 !== rtl ? 'leading' : 'trailing';\n latest.current.onOpenChange?.(side);\n };\n const settle = (next: number, animated: boolean, fromDrag: boolean) => {\n if (!fromDrag) void runOnMainThread(moveMT)(next, animated);\n if (next === offsetRef.current) return;\n offsetRef.current = next;\n setOffset(next);\n if (next === 0) group.closed(id);\n else group.opened(id, () => settle(0, true, false));\n report(next);\n };\n\n // A recycled row bound to another item starts closed, without animation.\n const boundKey = useRef(props.itemKey);\n useEffect(() => {\n if (boundKey.current === props.itemKey) return;\n boundKey.current = props.itemKey;\n settle(0, false, false);\n }, [props.itemKey]);\n useEffect(() => () => group.closed(id), []);\n\n const leftWidth = widths.left;\n const rightWidth = widths.right;\n const onMTSDragStart = () => {\n 'main thread';\n dragRef.current?.MTSSetOtherStyles({ transition: 'none' });\n };\n // The position stays on the card's travel (see swipeDragTarget): Draggable set start + delta, this pulls it back in.\n const onMTSDragging = (translate: { x: number }) => {\n 'main thread';\n const x = swipeDragTargetMT(translate.x, leftWidth, rightWidth);\n if (x !== translate.x) dragRef.current?.MTSSetTransform(x, 0);\n };\n const onMTSDragEnd = (translate: { x: number }) => {\n 'main thread';\n const target = swipeSnapMT(translate.x, leftWidth, rightWidth);\n dragRef.current?.MTSSetOtherStyles({ transition: `transform ${g9SwipeSnapMs}ms ease-out` });\n dragRef.current?.MTSSetTransform(target, 0);\n };\n const onDragEnd = (translate: { x: number }) => {\n settle(swipeSnap(translate.x, leftWidth, rightWidth), true, true);\n };\n\n const invoke = (action: G9SwipeAction) => {\n if (action.isEnabled === false || running.current.has(action)) return;\n settle(0, true, false);\n try {\n action.onInvoked?.(action);\n const result = action.command?.(action.commandParameter);\n if (result && typeof (result as Promise<void>).then === 'function') {\n running.current.add(action);\n (result as Promise<void>).then(\n () => running.current.delete(action),\n (error: unknown) => {\n running.current.delete(action);\n diagnostics.log({ level: 'error', message: 'G9SwipeView: action failed.', source: 'G9SwipeView', error });\n },\n );\n }\n } catch (error) {\n diagnostics.log({ level: 'error', message: 'G9SwipeView: action failed.', source: 'G9SwipeView', error });\n }\n };\n\n const pane = (actions: readonly G9SwipeAction[], side: 'left' | 'right') =>\n actions.length > 0 ? (\n <view className={`g9-swipe__pane g9-swipe__pane--${side}`} style={{ [side]: '0px' }}>\n {actions.map((action, i) => {\n const colors = swipeActionColors(action);\n return (\n <view\n key={`${side}-${i}`}\n className=\"g9-swipe__action\"\n style={{ width: `${action.widthRequest ?? 88}px`, backgroundColor: colors.background }}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={action.text ?? ''}\n bindtap={() => invoke(action)}\n >\n {action.icon ? (\n <G9Icon icon={action.icon} size={action.iconSize ?? 22} color={colors.foreground} />\n ) : null}\n {action.text ? (\n <text className=\"g9-swipe__action-text\" text-maxline=\"1\" style={{ color: colors.foreground }}>\n {action.text}\n </text>\n ) : null}\n </view>\n );\n })}\n </view>\n ) : null;\n\n const radius = props.cornerRadius ?? g9SwipeDefaultCornerRadius;\n const thickness = props.cardStrokeThickness ?? 0;\n return (\n <view\n className={`g9-swipe${offset !== 0 ? ' g9-swipe--open' : ''} ${props.className ?? ''}`}\n style={{\n borderRadius: `${radius}px`,\n backgroundColor: props.cardBackground ?? 'transparent',\n ...(props.cardStroke && thickness > 0\n ? { borderWidth: `${thickness}px`, borderStyle: 'solid', borderColor: props.cardStroke }\n : {}),\n }}\n >\n {pane(leftActions, 'left')}\n {pane(rightActions, 'right')}\n <Draggable\n className=\"g9-swipe__body\"\n MTSRef={dragRef}\n trigger=\"immediate\"\n allowedDirection={['left', 'right']}\n enableDragging={leftWidth > 0 || rightWidth > 0}\n minTranslateX={-(leftWidth + rightWidth)}\n maxTranslateX={leftWidth + rightWidth}\n minTranslateY={0}\n maxTranslateY={0}\n resetOnEnd={false}\n onMTSDragStart={onMTSDragStart}\n onMTSDragging={onMTSDragging}\n onMTSDragEnd={onMTSDragEnd}\n onDragEnd={onDragEnd}\n draggableProps={{ bindtap: offset !== 0 ? () => settle(0, true, false) : undefined }}\n >\n {props.cardContent ?? props.children}\n </Draggable>\n </view>\n );\n}\n"],"names":["defaultGroup","createSwipeGroup","rowSequence","SwipeGroupContext","createContext","G9SwipeGroup","props","_props_group","_props_group1","own","useRef","G9SwipeView","_props_leftActions","_props_rightActions","_props_cornerRadius","_props_cardStrokeThickness","_props_className","_props_cardBackground","_props_cardContent","idRef","id","group","useContext","diagnostics","useG9Diagnostics","rtl","useG9Direction","leading","a","trailing","widths","swipePhysicalWidths","swipePaneWidth","leftActions","rightActions","offset","setOffset","useState","offsetRef","dragRef","useMainThreadRef","running","Set","latest","moveMT","x","animated","_dragRef_current","_dragRef_current1","g9SwipeSnapMs","report","next","_latest_current","side","settle","fromDrag","runOnMainThread","boundKey","useEffect","leftWidth","rightWidth","onMTSDragStart","onMTSDragging","translate","swipeDragTargetMT","onMTSDragEnd","target","swipeSnapMT","onDragEnd","swipeSnap","invoke","action","result","error","pane","actions","view","i","_action_widthRequest","_action_text","_action_iconSize","colors","swipeActionColors","G9Icon","text","radius","g9SwipeDefaultCornerRadius","thickness","Draggable","undefined"],"mappings":";;;;;;AA4BA,MAAMA,eAAeC;AACrB,IAAIC,cAAc;AAClB,MAAMC,oBAAoBC,cAAiCJ;AAGpD,SAASK,aAAaC,KAA4E;QAE/DC,cACEC;IAF1C,MAAMC,MAAMC,OAAiC;IAC7C,IAAID,AAAgB,SAAhBA,IAAI,OAAO,EAAWA,IAAI,OAAO,GAAG,QAAAF,CAAAA,eAAAA,MAAM,KAAK,AAAD,IAAVA,eAAeN;IACvD,QAAQE,kBAAkB,SAAS,OAAO,QAAAK,CAAAA,gBAAAA,MAAM,KAAK,AAAD,IAAVA,gBAAeC,IAAI,OAAO,GAAGH,MAAM,QAAQ,GAAGH,kBAAkB;AAC5G;AAiCO,SAASQ,YAAYL,KAAuB;QAUhCM,oBACCC,qBAgHHC,qBACGC,4BAGiDC,kBAG5CC,uBAyBhBC;IA1JP,MAAMC,QAAQT,OAAsB;IACpC,IAAIS,AAAkB,SAAlBA,MAAM,OAAO,EAAW;QAC1BjB,eAAe;QACfiB,MAAM,OAAO,GAAG,CAAC,SAAS,EAAEjB,aAAa;IAC3C;IACA,MAAMkB,KAAKD,MAAM,OAAO;IACxB,MAAME,QAAQC,WAAWnB;IACzB,MAAMoB,cAAcC;IACpB,MAAMC,MAAMC,AAAqB,UAArBA;IACZ,MAAMC,UAAU,AAAC,SAAAf,CAAAA,qBAAAA,MAAM,WAAW,AAAD,IAAhBA,qBAAqB,EAAE,AAAD,EAAG,MAAM,CAAC,CAACgB,IAAMA,AAAgB,UAAhBA,EAAE,SAAS;IACnE,MAAMC,WAAW,AAAC,SAAAhB,CAAAA,sBAAAA,MAAM,YAAY,AAAD,IAAjBA,sBAAsB,EAAE,AAAD,EAAG,MAAM,CAAC,CAACe,IAAMA,AAAgB,UA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B,eAAe,GACf,eAAe,GACf,YAAY,OACZ,gBAAgBC,gBAChB,eAAeC,eACf,cAAcG,cACd,WAAWG,WACX,gBAAgB;QAAE,SAASjC,AAAW,MAAXA,SAAe,IAAMmB,OAAO,GAAG,MAAM,SAASmC;IAAU,GACpF;QACC,CAAC,QAAAvE,CAAAA,qBAAAA,MAAM,WAAW,AAAD,IAAhBA,qBAAqBZ,MAAM,QAAQ,CAAC;MACvC,EAAEkF,UAAU;IACd,EAAEZ;AAEN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tab-bar/metrics.jsx","sources":["../../src/tab-bar/metrics.ts"],"sourcesContent":["/**\n * The tab bar's layout constants (MAUI `G9TabBarMetrics`), public for the same reason as in MAUI: `barHeight +\n * barBottomGap` is the bottom inset a page needs so its last row clears a floating bar. Values are the MAUI ones; the\n * shadow-related entries stay for parity but G9 paints no shadows (plan/specs/02 §2), so they are all 0 here as there.\n */\nconst barHeight = 62;\nconst chromeShadowPadding = 14;\nconst barBottomGap = 14;\nconst fabSize = 72;\nconst fabFloatingOverlapRatio = 0.5;\nconst subMenuRowAboveFabGap = 4;\nconst subMenuItemFabRatio = 0.95;\nconst subMenuItemInnerRatio = 0.62;\nconst subMenuRowLabelHeight = 14;\nconst subMenuRowLabelGap = 1;\nconst subMenuRowTopPadding = 4;\nconst subMenuRowBottomPadding = 7;\nconst fabInnerSizeRatio = 0.78;\nconst notchGap = 5;\n\nconst subMenuRowItemInnerSize = fabSize * subMenuItemInnerRatio;\nconst subMenuRowCellHeight =\n subMenuRowTopPadding + subMenuRowItemInnerSize + subMenuRowLabelGap + subMenuRowLabelHeight + subMenuRowBottomPadding;\nconst floatingControlHeight = 106 + chromeShadowPadding + barBottomGap;\n\n/** Reserved control height while the FAB sub-menu row is open (MAUI `ComputeOpenControlHeight`). */\nfunction computeOpenControlHeight(subMenuItemCount: number): number {\n if (subMenuItemCount <= 0) return floatingControlHeight;\n const fabProtrusion = fabSize * fabFloatingOverlapRatio;\n return (\n barHeight + fabProtrusion + subMenuRowAboveFabGap + subMenuRowCellHeight + 8 + chromeShadowPadding + barBottomGap\n );\n}\n\n/** Every size, gap and timing of the tab bar (MAUI `G9TabBar` constants), in px and ms. */\nexport const g9TabBarMetrics = Object.freeze({\n defaultFabIndex: 2,\n // Heights\n barHeight,\n chromeShadowPadding,\n barBottomGap,\n barHorizontalGap: 14,\n compactControlHeight: barHeight + chromeShadowPadding + barBottomGap,\n floatingControlHeight,\n bottomItemHeight: barHeight,\n computeOpenControlHeight,\n // FAB\n fabSize,\n fabIconSize: 44,\n fabRotationOpenDegrees: 135,\n fabIdleScaleMin: 0.72,\n fabFloatingScaleBoost: 0.28,\n fabIdleVerticalOffset: 20,\n fabFloatingOverlapRatio,\n fabHideInvisibleAtCenterProgress: 0.58,\n fabInnerSizeRatio,\n fabInnerSize: fabSize * fabInnerSizeRatio,\n fabPlusArmRatio: 0.34,\n fabPlusStrokeRatio: 0.14,\n // Sub-menu cells\n subMenuItemFabRatio,\n subMenuRowItemSize: fabSize * subMenuItemFabRatio,\n subMenuItemInnerRatio,\n subMenuRowItemInnerSize,\n subMenuRowOuterCornerRadius: 18,\n subMenuRowLabelHeight,\n subMenuRowLabelGap,\n subMenuRowTopPadding,\n subMenuRowBottomPadding,\n subMenuRowCellHeight,\n // Notch: a semicircle derived from the FAB\n notchGap,\n notchCircleRadius: fabSize / 2 + notchGap,\n circleArcKappa: 0.55228475,\n barTopRadius: 18,\n barBottomRadius: 18,\n barShadowOffsetY: 0,\n barShadowBlur: 0,\n barShadowAlpha: 0,\n barStrokeSize: 0,\n barTopHighlightStrokeSize: 1,\n // Bottom items\n bottomIconSize: 24,\n bottomLabelFontSize: 11,\n slotItemMaxWidth: 86,\n slotItemMinWidth: 56,\n slotItemHorizontalPadding: 6,\n selectedItemTranslationY: 0,\n centerItemHiddenTranslationY: 8,\n centerItemHiddenScaleAmount: 0.14,\n centerItemFadeInputThreshold: 0.35,\n selectedReturnRevealStartOpacity: 0.64,\n selectedReturnRevealStartScale: 0.96,\n selectedReturnRevealTranslationY: 6,\n // Sub-menu row\n subMenuRowSpacing: 10,\n subMenuRowAboveFabGap,\n subMenuRowRevealTravelX: 18,\n subMenuRowRevealTravelY: 10,\n subMenuRowStaggerStep: 0.07,\n subMenuRowStaggerCap: 0.28,\n subMenuRowActivationThreshold: 0.72,\n subMenuRowEdgeGuard: 8,\n subMenuRowIconSizeMax: 26,\n subMenuRowFontSizeMax: 9.5,\n // Indicator\n indicatorWidth: 48,\n indicatorHeight: 32,\n indicatorCornerRadius: 13,\n indicatorTopOffset: 5,\n selectedIndicatorDownNudgeY: 4,\n indicatorMaxStretch: 0.22,\n indicatorStretchDistanceDivisor: 240,\n hiddenVisibilityThreshold: 0.001,\n // Overflow (> 5 items)\n maxVisibleBottomItems: 5,\n overflowItemSize: 56,\n overflowItemSpacing: 8,\n overflowAboveBarGap: 14,\n overflowEdgeGuard: 10,\n overflowItemIconSize: 22,\n overflowItemFontSize: 9.5,\n overflowRevealTravelY: 14,\n overflowRevealStaggerStep: 0.08,\n overflowRevealStaggerCap: 0.55,\n overflowActivationThreshold: 0.72,\n overflowStateDurationMs: 280,\n // Animation\n centerStateDurationMs: 240,\n centerStateBouncyDurationMs: 420,\n fabPopBackCoefficient: 1.70158,\n notchPopBackCoefficient: 3.2,\n openStateDurationMs: 300,\n indicatorMoveDurationMs: 320,\n selectedReturnRevealDurationMs: 210,\n animationFrameRate: 16,\n startupSelectionRevealEnabled: true,\n startupSelectionRevealDelayMs: 369,\n reservedHeightShrinkDelayMs: 110,\n // Touch\n defaultRestScale: 1,\n defaultRestOpacity: 1,\n itemHoveredOpacity: 0.86,\n itemPressedOpacity: 0.78,\n touchAnimationDurationMs: 110,\n // Backdrop (outside tap closes)\n backdropZIndex: 1,\n backdropTopInset: 0,\n // Animation names (MAUI animation handles; G9 uses them as CSS transition tags in diagnostics only)\n centerStateAnimationName: 'G9TabBar.CenterState',\n notchBounceAnimationName: 'G9TabBar.NotchBounce',\n openAnimationName: 'G9TabBar.Open',\n indicatorAnimationName: 'G9TabBar.Indicator',\n bottomSelectionRevealAnimationName: 'G9TabBar.BottomSelectionReveal',\n overflowAnimationName: 'G9TabBar.Overflow',\n});\n\n/**\n * The visual style a `G9TabBar` draws itself in (MAUI `G9TabBarStyle`, 1.4.0). Behaviour (selection, the FAB slot,\n * the sub-menu row, overflow, every event) is identical in both; only the surface, the notch, the FAB and the item\n * states differ.\n * - `'classic'` (default): the glass bar with 18 px corners and a lit top edge, a semicircular notch under a 72 px FAB\n * whose centre sits on the bar's top edge, and a pill behind the selected item.\n * - `'sculpted'` («Bottom Navigation / Sculpted»): an opaque 68 px bar with 24 px corners and a soft shadow, a wide\n * S-shouldered cradle, a flat 66 px primary disc sunk 9 px into the bar, and no pill: the selected item switches to\n * its `selectedIcon` and the primary colour.\n */\nexport type G9TabBarStyle = 'classic' | 'sculpted';\n\n/**\n * The shadow painted under the bar and under the FAB disc (MAUI `G9TabBarShadowView`): the bar's own outline, notch\n * included, filled black at `alpha`, blurred with a Gaussian of `blurSigma` (SVG `feGaussianBlur stdDeviation` is the\n * same sigma Skia's `SKMaskFilter.CreateBlur` takes) and dropped `offsetY`; the FAB gets a blurred circle of\n * `fabDiameter` at `fabAlpha`, dropped `offsetY + fabOffsetY`, that fades and scales with the FAB. Drawn inside the\n * `<svg content>` the chrome already is, never as `box-shadow` (plan/specs/02 §2).\n */\nexport interface G9TabBarShadowRecipe {\n readonly alpha: number;\n readonly blurSigma: number;\n readonly offsetY: number;\n readonly fabDiameter: number;\n readonly fabAlpha: number;\n readonly fabOffsetY: number;\n}\n\n/**\n * The geometry that differs between the two {@link G9TabBarStyle}s (MAUI `G9TabBarStyleMetrics`, 1.4.0). What the\n * styles share (the insets around the bar, the sub-menu row, the overflow column, the timings) stays in\n * `g9TabBarMetrics`. Public for the same reason: a host that reserves the bar's height under its content reads\n * `barHeight` from the style it shows (`g9TabBarStyleMetrics.for(style).barHeight`), not the Classic\n * `g9TabBarMetrics.barHeight`, which is 6 px short of a Sculpted bar.\n */\nexport interface G9TabBarStyleMetrics {\n readonly style: G9TabBarStyle;\n /** Height of the visible bar: what a host reserves under its scrolling content. */\n readonly barHeight: number;\n readonly barTopRadius: number;\n readonly barBottomRadius: number;\n /** Inset between the bar's side edges and the first/last item slot. */\n readonly itemsHorizontalPadding: number;\n /** The FAB's tap box (Classic: also its glass shell; Sculpted: transparent). */\n readonly fabSize: number;\n /** The coloured disc that carries the plus. */\n readonly fabInnerSize: number;\n /**\n * The plus box. Classic draws the built-in `plus` glyph at 70 % of it (the port made at MAUI 1.2.0); Sculpted draws\n * MAUI's plus.\n */\n readonly fabIconSize: number;\n /** Each arm of the plus, as a fraction of `fabIconSize` (round caps add half a stroke at each end). */\n readonly fabPlusArmRatio: number;\n /** The plus stroke as a fraction of `fabIconSize` (at least 2 px). */\n readonly fabPlusStrokeRatio: number;\n /** How far below the bar's top edge the floating FAB's centre sits (Classic 0: on the edge; Sculpted 9). */\n readonly fabCenterBelowBarTop: number;\n /** How far the floating FAB's box rises above the bar's top edge (`fabSize / 2 − fabCenterBelowBarTop`). */\n readonly fabProtrusionAboveBar: number;\n /** Room reserved above the bar while the FAB floats. */\n readonly floatingHeadroom: number;\n /** The shape carved under a floating FAB: a semicircle (Classic) or the S-shouldered cradle (Sculpted). */\n readonly notchShape: 'semicircle' | 'cradle';\n /** Multiplier on the cradle's design path (drawn around a 48 px disc); 1 for Classic. */\n readonly cradleScale: number;\n /** Half the notch's opening along the top edge. */\n readonly notchHalfWidth: number;\n readonly bottomIconSize: number;\n readonly bottomLabelFontSize: number;\n /** Gap between an item's icon and its label. */\n readonly bottomContentSpacing: number;\n /** Classic paints a pill behind the selected item; Sculpted does not. */\n readonly showsSelectionIndicator: boolean;\n /** How far the selection pill sits below its default top (Classic 4, Sculpted 0). */\n readonly selectedItemNudgeY: number;\n /** Classic draws the 1 px lit top edge; the opaque Sculpted bar does not. */\n readonly drawsTopHighlight: boolean;\n /**\n * The shadow recipe, or `null` for none. Classic keeps the flat chrome of the port made at MAUI 1.2.0 (MAUI paints\n * a 50 % Skia halo there, see the migration table); Sculpted paints MAUI's 12 % bar and 30 % disc shadow, because\n * its opaque bar has no other separation from the page.\n */\n readonly shadow: G9TabBarShadowRecipe | null;\n /** Control height while the FAB rests inline: `barHeight` + the two shadow insets. */\n readonly compactControlHeight: number;\n /** Control height while the FAB floats. */\n readonly floatingControlHeight: number;\n /** Control height while the FAB's sub-menu row is open. */\n computeOpenControlHeight(subMenuItemCount: number): number;\n}\n\nfunction styleMetrics(\n values: Omit<\n G9TabBarStyleMetrics,\n 'fabProtrusionAboveBar' | 'compactControlHeight' | 'floatingControlHeight' | 'computeOpenControlHeight'\n >,\n): G9TabBarStyleMetrics {\n const fabProtrusionAboveBar = values.fabSize / 2 - values.fabCenterBelowBarTop;\n const floatingControlHeight = values.barHeight + values.floatingHeadroom + chromeShadowPadding + barBottomGap;\n return Object.freeze({\n ...values,\n fabProtrusionAboveBar,\n compactControlHeight: values.barHeight + chromeShadowPadding + barBottomGap,\n floatingControlHeight,\n computeOpenControlHeight: (subMenuItemCount: number) =>\n subMenuItemCount <= 0\n ? floatingControlHeight\n : values.barHeight +\n fabProtrusionAboveBar +\n subMenuRowAboveFabGap +\n subMenuRowCellHeight +\n 8 +\n chromeShadowPadding +\n barBottomGap,\n });\n}\n\n// The Sculpted disc, and how much larger than Figma's the cradle is drawn (its path was drawn around a 48 px disc).\n// Independent on purpose (MAUI ADR-0030, amended 2026-10-05): change the disc to change the gap around it, the scale\n// to change the cradle; never the cradle's design constants.\nconst sculptedFabDisc = 66;\nconst sculptedCradleScale = 56 / 48;\nconst cradleHalfWidth = 57;\n\n/**\n * The two styles' geometry (MAUI `G9TabBarStyleMetrics.Classic` / `.Sculpted` / `.For(style)` / `CradleHalfWidth`).\n * `classic` reproduces `g9TabBarMetrics` exactly. `sculpted` is the Figma «Bottom Navigation / Sculpted» component\n * after the owner's two device reviews (2026-10-05): a 68 px bar (Figma 64), the cradle path × 56/48, a 66 px disc in a\n * 74 px tap box with a 30 px plus, its centre 9 px below the bar's top edge (5.8 px from the bowl at its tightest).\n */\nexport const g9TabBarStyleMetrics = Object.freeze({\n classic: styleMetrics({\n style: 'classic',\n barHeight,\n barTopRadius: 18,\n barBottomRadius: 18,\n itemsHorizontalPadding: 0,\n fabSize,\n fabInnerSize: fabSize * fabInnerSizeRatio,\n fabIconSize: 44,\n fabPlusArmRatio: 0.34,\n fabPlusStrokeRatio: 0.14,\n fabCenterBelowBarTop: 0,\n floatingHeadroom: 44,\n notchShape: 'semicircle',\n cradleScale: 1,\n notchHalfWidth: fabSize / 2 + notchGap,\n bottomIconSize: 24,\n bottomLabelFontSize: 11,\n bottomContentSpacing: 3,\n showsSelectionIndicator: true,\n selectedItemNudgeY: 4,\n drawsTopHighlight: true,\n shadow: null,\n }),\n sculpted: styleMetrics({\n style: 'sculpted',\n barHeight: 68,\n barTopRadius: 24,\n barBottomRadius: 24,\n itemsHorizontalPadding: 8,\n // The tap box is the disc plus 4 px all round, as in the component (48 in 56).\n fabSize: sculptedFabDisc + 8,\n fabInnerSize: sculptedFabDisc,\n fabIconSize: 30,\n // The design's plus is two 24 × 2.7 bars; round caps add half a stroke at each end.\n fabPlusArmRatio: 0.444,\n fabPlusStrokeRatio: 0.1125,\n fabCenterBelowBarTop: 9,\n floatingHeadroom: 37,\n notchShape: 'cradle',\n cradleScale: sculptedCradleScale,\n notchHalfWidth: cradleHalfWidth * sculptedCradleScale,\n bottomIconSize: 24,\n bottomLabelFontSize: 12,\n bottomContentSpacing: 4,\n showsSelectionIndicator: false,\n selectedItemNudgeY: 0,\n drawsTopHighlight: false,\n // Figma DROP_SHADOW blur 8, y 1, black 12 % (a Gaussian sigma is about half the CSS-style blur); the disc's own\n // lift is darker and dropped 2 px further, traced around the DISC (its box is transparent).\n shadow: Object.freeze({\n alpha: 0.12,\n blurSigma: 4,\n offsetY: 1,\n fabDiameter: sculptedFabDisc,\n fabAlpha: 0.3,\n fabOffsetY: 2,\n }),\n }),\n /** Half the cradle's opening along the top edge in design px, before `cradleScale` (MAUI `CradleHalfWidth`). */\n cradleHalfWidth,\n /** The metrics of `style` (MAUI `G9TabBarStyleMetrics.For`); anything but `'sculpted'` is Classic. */\n for: (style: G9TabBarStyle | null | undefined): G9TabBarStyleMetrics =>\n style === 'sculpted' ? g9TabBarStyleMetrics.sculpted : g9TabBarStyleMetrics.classic,\n});\n\n/** The Sculpted cradle in design px from the notch centre (x) and the top edge (y); multiplied by `cradleScale`. */\nexport const tabBarCradleDesign = Object.freeze({\n halfWidth: cradleHalfWidth,\n shoulderHandleX: 42,\n shoulderInnerX: 39,\n shoulderInnerY: 10,\n shoulderEndX: 32,\n shoulderEndY: 23,\n bowlHandleX: 19,\n bowlHandleY: 47,\n});\n\n/** CSS `cubic-bezier` for MAUI's ease-out-back with coefficient `c` (1.70158 is the standard back curve). */\nexport function easeOutBackCss(c: number): string {\n // Matches easeOutBack's overshoot: y1 grows with the coefficient (1.70158 → 1.56, the usual 0.34,1.56,0.64,1).\n const y1 = 1 + c * 0.329;\n return `cubic-bezier(0.34, ${y1.toFixed(2)}, 0.64, 1)`;\n}\n"],"names":["barHeight","chromeShadowPadding","barBottomGap","fabSize","fabFloatingOverlapRatio","subMenuRowAboveFabGap","subMenuItemFabRatio","subMenuItemInnerRatio","subMenuRowLabelHeight","subMenuRowLabelGap","subMenuRowTopPadding","subMenuRowBottomPadding","fabInnerSizeRatio","notchGap","subMenuRowItemInnerSize","subMenuRowCellHeight","floatingControlHeight","computeOpenControlHeight","subMenuItemCount","fabProtrusion","g9TabBarMetrics","Object","styleMetrics","values","fabProtrusionAboveBar","sculptedFabDisc","sculptedCradleScale","cradleHalfWidth","g9TabBarStyleMetrics","style","tabBarCradleDesign","easeOutBackCss","c","y1"],"mappings":"AAKA,MAAMA,YAAY;AAClB,MAAMC,sBAAsB;AAC5B,MAAMC,eAAe;AACrB,MAAMC,UAAU;AAChB,MAAMC,0BAA0B;AAChC,MAAMC,wBAAwB;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C,MAAMC,KAAK,IAAID,AAAI,QAAJA;IACf,OAAO,CAAC,mBAAmB,EAAEC,GAAG,OAAO,CAAC,GAAG,UAAU,CAAC;AACxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tab-bar/model.jsx","sources":["../../src/tab-bar/model.ts"],"sourcesContent":["import type { G9IconInput } from '../icon/icon';\nimport {\n type G9TabBarStyle,\n type G9TabBarStyleMetrics,\n g9TabBarStyleMetrics,\n g9TabBarMetrics as M,\n tabBarCradleDesign,\n} from './metrics';\n\n/** One bar, sub-menu or overflow item (MAUI `G9TabBarItem`). */\nexport interface G9TabBarItem {\n readonly text?: string;\n /** Default `'check'` (MAUI `G9Glyph.Check`). */\n readonly icon?: G9IconInput;\n /**\n * The icon while this item is the selected tab, typically the filled twin of an outline `icon` (MAUI 1.4.0\n * `SelectedIcon`). Used by the `'sculpted'` style, whose selected state is \"filled icon + primary colour\"; Classic\n * ignores it (its pill already marks the selection). Unset keeps `icon` in both states.\n */\n readonly selectedIcon?: G9IconInput;\n /** Runs first on a tap (MAUI `Clicked`). */\n readonly onClick?: (context: G9TabBarClickContext) => void;\n /** Runs after `onClick` with `commandParameter` unless `canExecute` is false (MAUI `Command`). */\n readonly command?: (parameter: unknown) => void;\n readonly canExecute?: boolean;\n readonly commandParameter?: unknown;\n /** Test identifier, set as the item's `id` (MAUI `AutomationId`). */\n readonly automationId?: string;\n /** Legacy radial-menu polar angle; the row layout ignores it, kept so old item lists still type-check. */\n readonly angleDegrees?: number;\n}\n\n/**\n * Builds an item (MAUI `new G9TabBarItem()` / `new G9TabBarItem(text, icon)` / `new G9TabBarItem(text, icon,\n * selectedIcon)`: pass `{ selectedIcon }` in `extra`).\n */\nexport function g9TabBarItem(text = '', icon: G9IconInput = 'check', extra: Partial<G9TabBarItem> = {}): G9TabBarItem {\n return { text, icon, angleDegrees: Number.NaN, ...extra };\n}\n\n/** What a tapped item learns (MAUI `G9TabBarClickContext`). */\nexport interface G9TabBarClickContext {\n readonly index: number;\n readonly item: G9TabBarItem;\n readonly isSubMenuItem: boolean;\n}\n\n/** Payload of `onItemSelected` (MAUI `G9TabBarSelectionChangedEventArgs`). */\nexport type G9TabBarSelectionChangedEventArgs = G9TabBarClickContext;\n\n/** Payload of `onFabTapped`, raised before any state changes (MAUI `G9TabBarFabTappedEventArgs`). */\nexport interface G9TabBarFabTappedEventArgs {\n /** Set `true` to suppress the built-in fan-out for this tap. */\n handled: boolean;\n}\n\n/** The four bits of bar state (MAUI `SelectedIndex`, `IsCenterFloating`, `IsFabOpen`, `IsOverflowOpen`). */\nexport interface G9TabBarState {\n readonly selectedIndex: number;\n readonly isCenterFloating: boolean;\n readonly isFabOpen: boolean;\n readonly isOverflowOpen: boolean;\n}\n\n/** Inputs the transitions depend on. */\nexport interface G9TabBarConfig {\n readonly itemCount: number;\n readonly subMenuCount: number;\n readonly fabIndex: number;\n readonly resetCenterOnMenuSelection: boolean;\n /** The style whose heights apply (`tabBarReservedHeight`). Default `'classic'`. */\n readonly barStyle?: G9TabBarStyle;\n}\n\n/** Something to run after a transition: an item's callbacks and the `onItemSelected` event. */\nexport interface G9TabBarEffect {\n readonly index: number;\n readonly isSubMenuItem: boolean;\n}\n\n/** The result of one tab-bar input: the next state and what to run as a consequence (pure; see `tabBarItemTap`). */\nexport interface G9TabBarTransition {\n readonly state: G9TabBarState;\n /** The item to execute and report as selected, if any. */\n readonly effect: G9TabBarEffect | null;\n}\n\n/** More items than slots: the extras collapse behind a More trigger in the last slot. */\nexport function tabBarHasOverflow(itemCount: number): boolean {\n return itemCount > M.maxVisibleBottomItems;\n}\n\n/** Slot of the overflow trigger (the last visible slot). */\nexport const tabBarOverflowSlot = M.maxVisibleBottomItems - 1;\n\n/** The FAB index honoured at runtime: -1 when unset, out of range, or folded into the overflow (MAUI `ResolvedFabIndex`). */\nexport function resolveTabBarFabIndex(fabIndex: number, itemCount: number): number {\n if (fabIndex < 0 || fabIndex >= itemCount) return -1;\n if (tabBarHasOverflow(itemCount) && fabIndex >= tabBarOverflowSlot) return -1;\n return fabIndex;\n}\n\n/** A visible slot: a bar item, or the More trigger. */\nexport type G9TabBarSlot = { readonly kind: 'item'; readonly index: number } | { readonly kind: 'overflow' };\n\n/** The visible slots in logical order. */\nexport function tabBarSlots(itemCount: number): G9TabBarSlot[] {\n const overflow = tabBarHasOverflow(itemCount);\n const visible = overflow ? tabBarOverflowSlot : itemCount;\n const slots: G9TabBarSlot[] = [];\n for (let i = 0; i < visible; i++) slots.push({ kind: 'item', index: i });\n if (overflow) slots.push({ kind: 'overflow' });\n return slots;\n}\n\n/** Source indices behind the More trigger. */\nexport function tabBarOverflowIndices(itemCount: number): number[] {\n const out: number[] = [];\n if (!tabBarHasOverflow(itemCount)) return out;\n for (let i = tabBarOverflowSlot; i < itemCount; i++) out.push(i);\n return out;\n}\n\nconst withState = (state: G9TabBarState, patch: Partial<G9TabBarState>): G9TabBarState => ({ ...state, ...patch });\n\n/** Initial state from `defaultSelectedIndex` (MAUI `ApplyDefaultSelectedIndex`). */\nexport function initialTabBarState(config: G9TabBarConfig, defaultSelectedIndex: number): G9TabBarState {\n const base: G9TabBarState = { selectedIndex: 0, isCenterFloating: false, isFabOpen: false, isOverflowOpen: false };\n if (config.itemCount <= 0) return base;\n const index = Math.min(Math.max(defaultSelectedIndex, 0), config.itemCount - 1);\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n return { ...base, selectedIndex: index, isCenterFloating: fab >= 0 && index === fab };\n}\n\n/** A tap on a bar slot item (MAUI `OnBottomItemTapped`). */\nexport function tabBarItemTap(state: G9TabBarState, config: G9TabBarConfig, index: number): G9TabBarTransition {\n if (index < 0 || index >= config.itemCount) return { state, effect: null };\n let next = withState(state, { isOverflowOpen: false });\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n if (fab >= 0 && index === fab) {\n next = withState(next, { selectedIndex: index });\n next = next.isCenterFloating\n ? withState(next, { isFabOpen: !next.isFabOpen })\n : withState(next, { isCenterFloating: true, isFabOpen: false });\n return { state: next, effect: { index, isSubMenuItem: false } };\n }\n next = withState(next, { selectedIndex: index, isFabOpen: false });\n if (config.resetCenterOnMenuSelection) next = withState(next, { isCenterFloating: false });\n return { state: next, effect: { index, isSubMenuItem: false } };\n}\n\n/** A tap on the floating FAB that nobody handled (MAUI `OnFabTapped` after `FabTapped`). */\nexport function tabBarFabTap(state: G9TabBarState, config: G9TabBarConfig): G9TabBarTransition {\n let next = withState(state, { isOverflowOpen: false });\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n if (fab >= 0) next = withState(next, { selectedIndex: fab });\n if (!next.isCenterFloating)\n return { state: withState(next, { isCenterFloating: true, isFabOpen: false }), effect: null };\n return { state: withState(next, { isFabOpen: !next.isFabOpen }), effect: null };\n}\n\n/** A tap on a sub-menu cell (MAUI `OnSubMenuItemTapped`): runs it and closes the row; the selection stays. */\nexport function tabBarSubMenuTap(state: G9TabBarState, config: G9TabBarConfig, index: number): G9TabBarTransition {\n if (index < 0 || index >= config.subMenuCount) return { state, effect: null };\n return { state: withState(state, { isFabOpen: false }), effect: { index, isSubMenuItem: true } };\n}\n\n/** A tap on the More trigger (MAUI `OnOverflowTriggerTapped`): toggles the column, closing the FAB row. */\nexport function tabBarOverflowTriggerTap(state: G9TabBarState, config: G9TabBarConfig): G9TabBarTransition {\n if (!tabBarHasOverflow(config.itemCount)) return { state, effect: null };\n return { state: withState(state, { isFabOpen: false, isOverflowOpen: !state.isOverflowOpen }), effect: null };\n}\n\n/** A tap on an overflow item (MAUI `OnOverflowItemTapped`): selects its source index and closes everything. */\nexport function tabBarOverflowItemTap(state: G9TabBarState, config: G9TabBarConfig, index: number): G9TabBarTransition {\n if (index < 0 || index >= config.itemCount) return { state, effect: null };\n let next = withState(state, { selectedIndex: index, isOverflowOpen: false, isFabOpen: false });\n if (config.resetCenterOnMenuSelection) next = withState(next, { isCenterFloating: false });\n return { state: next, effect: { index, isSubMenuItem: false } };\n}\n\n/** A tap on the backdrop (MAUI `OnBackdropTapped`): closes both menus; the selection stays. */\nexport function tabBarBackdropTap(state: G9TabBarState, config: G9TabBarConfig): G9TabBarState {\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n let next = withState(state, { isFabOpen: false, isOverflowOpen: false });\n if (next.isCenterFloating && config.resetCenterOnMenuSelection && fab < 0) {\n next = withState(next, { isCenterFloating: false });\n }\n return next;\n}\n\n/**\n * A selection written in code brings the FAB state with it (MAUI `ReconcileFabStateWithSelection`): the FAB tab\n * selected floats the FAB (closed); another tab returns it to the bar when `resetCenterOnMenuSelection`. With no FAB\n * (index -1, out of range, folded into the overflow) nothing floats (MAUI `ResetFabStateIfNoFab`).\n */\nexport function reconcileTabBarState(state: G9TabBarState, config: G9TabBarConfig): G9TabBarState {\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n let next = state;\n if (config.itemCount > 0) {\n const clamped = Math.min(Math.max(next.selectedIndex, 0), config.itemCount - 1);\n if (clamped !== next.selectedIndex) next = withState(next, { selectedIndex: clamped });\n }\n if (!tabBarHasOverflow(config.itemCount) && next.isOverflowOpen) next = withState(next, { isOverflowOpen: false });\n if (fab < 0) {\n return next.isCenterFloating || next.isFabOpen\n ? withState(next, { isCenterFloating: false, isFabOpen: false })\n : next;\n }\n if (next.selectedIndex === fab) {\n return next.isCenterFloating ? next : withState(next, { isCenterFloating: true, isFabOpen: false });\n }\n if (!config.resetCenterOnMenuSelection) return next;\n return next.isCenterFloating || next.isFabOpen\n ? withState(next, { isCenterFloating: false, isFabOpen: false })\n : next;\n}\n\n/** Slot the selection pill sits on: the More trigger for an overflow selection; -1 while the FAB carries it. */\nexport function tabBarIndicatorSlot(state: G9TabBarState, config: G9TabBarConfig): number {\n if (config.itemCount <= 0) return -1;\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n if (fab >= 0 && state.selectedIndex === fab && state.isCenterFloating) return -1;\n if (tabBarHasOverflow(config.itemCount) && state.selectedIndex >= tabBarOverflowSlot) return tabBarOverflowSlot;\n return state.selectedIndex;\n}\n\n/** Reserved control height for the state (compact, floating FAB, open sub-menu row), in the config's style. */\nexport function tabBarReservedHeight(state: G9TabBarState, config: G9TabBarConfig): number {\n const m = g9TabBarStyleMetrics.for(config.barStyle);\n if (state.isOverflowOpen && tabBarHasOverflow(config.itemCount)) {\n const count = config.itemCount - tabBarOverflowSlot;\n return (\n M.barBottomGap +\n m.barHeight +\n M.overflowAboveBarGap +\n count * (M.overflowItemSize + M.overflowItemSpacing) +\n M.chromeShadowPadding\n );\n }\n if (state.isFabOpen) return m.computeOpenControlHeight(config.subMenuCount);\n if (state.isCenterFloating && resolveTabBarFabIndex(config.fabIndex, config.itemCount) >= 0) {\n return m.floatingControlHeight;\n }\n return m.compactControlHeight;\n}\n\n/**\n * Centre x of a logical slot inside a control `width` wide (RTL mirrors). The slots share the drawn bar minus the\n * style's `itemsHorizontalPadding` (MAUI `ResolveSlotSpan`), so items, the FAB and the overflow column agree.\n */\nexport function tabBarSlotCenterX(\n slot: number,\n slotCount: number,\n width: number,\n rtl: boolean,\n itemsHorizontalPadding = 0,\n): number {\n const left = M.barHorizontalGap + itemsHorizontalPadding;\n const inner = Math.max(width - left * 2, 0);\n const visual = rtl ? slotCount - 1 - slot : slot;\n return left + ((visual + 0.5) * inner) / Math.max(slotCount, 1);\n}\n\n/**\n * Clamps a notch centre so the whole notch (and the corner radius beside it) fits on the bar `[barLeft, barRight]`\n * (MAUI `G9TabBarOutline.ClampNotchCenter`); unchanged when the bar is too narrow to clamp. `progress` (0..1) scales the\n * notch's half-width.\n */\nexport function clampTabBarNotchCenter(\n style: G9TabBarStyle,\n barLeft: number,\n barRight: number,\n centerX: number,\n progress = 1,\n): number {\n const m = g9TabBarStyleMetrics.for(style);\n const half = m.notchHalfWidth * Math.min(Math.max(progress, 0), 1);\n const min = barLeft + half + m.barTopRadius + 2;\n const max = barRight - half - m.barTopRadius - 2;\n return min < max ? Math.min(Math.max(centerX, min), max) : centerX;\n}\n\n/**\n * Centre x of the FAB (MAUI `ResolveFabCenterX`): its slot's centre, clamped exactly as the notch is, so the FAB and its\n * notch can never part company near the bar's ends.\n */\nexport function tabBarFabCenterX(\n fabIndex: number,\n slotCount: number,\n width: number,\n rtl: boolean,\n style: G9TabBarStyle = 'classic',\n): number {\n const m = g9TabBarStyleMetrics.for(style);\n const raw = tabBarSlotCenterX(fabIndex, slotCount, width, rtl, m.itemsHorizontalPadding);\n return clampTabBarNotchCenter(style, M.barHorizontalGap, width - M.barHorizontalGap, raw);\n}\n\n/** Stagger rank from the centre outward (0 for the middle cell(s)). */\nexport function centerOutwardRank(index: number, count: number): number {\n const distance = Math.abs(index - (count - 1) / 2);\n return Math.round(count % 2 === 0 ? distance - 0.5 : distance);\n}\n\n/** Layout of the sub-menu row: left edge of the row and per-cell x and reveal delay, edge-guarded inside `width`. */\nexport function subMenuRowLayout(\n count: number,\n fabCenterX: number,\n width: number,\n): { readonly left: number; readonly cells: ReadonlyArray<{ readonly x: number; readonly delayMs: number }> } {\n const size = M.subMenuRowItemSize;\n const rowWidth = count * size + Math.max(count - 1, 0) * M.subMenuRowSpacing;\n const max = width - M.subMenuRowEdgeGuard - rowWidth;\n const left = Math.max(M.subMenuRowEdgeGuard, Math.min(fabCenterX - rowWidth / 2, max));\n const cells: Array<{ x: number; delayMs: number }> = [];\n for (let i = 0; i < count; i++) {\n const fraction = Math.min(centerOutwardRank(i, count) * M.subMenuRowStaggerStep, M.subMenuRowStaggerCap);\n cells.push({ x: i * (size + M.subMenuRowSpacing), delayMs: Math.round(fraction * M.openStateDurationMs) });\n }\n return { left, cells };\n}\n\n/** Overflow column: centre x (edge-guarded) and per-item bottom offset and delay, closest to the trigger first. */\nexport function overflowColumnLayout(\n count: number,\n triggerCenterX: number,\n width: number,\n style: G9TabBarStyle = 'classic',\n): { readonly left: number; readonly items: ReadonlyArray<{ readonly bottom: number; readonly delayMs: number }> } {\n const size = M.overflowItemSize;\n const barHeight = g9TabBarStyleMetrics.for(style).barHeight;\n const left = Math.max(M.overflowEdgeGuard, Math.min(triggerCenterX - size / 2, width - M.overflowEdgeGuard - size));\n const items: Array<{ bottom: number; delayMs: number }> = [];\n for (let k = 0; k < count; k++) {\n const fraction = Math.min(k * M.overflowRevealStaggerStep, M.overflowRevealStaggerCap);\n items.push({\n bottom: M.barBottomGap + barHeight + M.overflowAboveBarGap + k * (size + M.overflowItemSpacing),\n delayMs: Math.round(fraction * M.overflowStateDurationMs),\n });\n }\n return { left, items };\n}\n\nconst n = (value: number) => Number(value.toFixed(2));\n\n/**\n * The Sculpted outline (MAUI `G9TabBarOutline.Build` with the cradle notch), traced exactly as MAUI traces it:\n * quadratic corners, and the cradle's three cubics (shoulder, bowl, shoulder) scaled by `progress × cradleScale` from\n * the clamped notch centre, so at 0 it collapses onto a flat top edge. `ox`/`oy` move the whole outline (the shadow\n * padding of the SVG).\n */\nfunction sculptedOutline(\n width: number,\n height: number,\n notchCenterX: number | null,\n progress: number,\n ox = 0,\n oy = 0,\n): string {\n const m = g9TabBarStyleMetrics.sculpted;\n const p = Math.min(Math.max(progress, 0), 1);\n const topR = m.barTopRadius;\n const botR = m.barBottomRadius;\n const x = (v: number) => n(ox + v);\n const y = (v: number) => n(oy + v);\n const parts = [`M ${x(0)} ${y(topR)}`, `Q ${x(0)} ${y(0)} ${x(topR)} ${y(0)}`];\n if (notchCenterX !== null && p > 0.001) {\n const cx = clampTabBarNotchCenter('sculpted', 0, width, notchCenterX, p);\n const k = p * m.cradleScale;\n const d = tabBarCradleDesign;\n const X = (dx: number) => x(cx + dx * k);\n const Y = (dy: number) => y(dy * k);\n parts.push(\n `L ${X(-d.halfWidth)} ${y(0)}`,\n `C ${X(-d.shoulderHandleX)} ${y(0)} ${X(-d.shoulderInnerX)} ${Y(d.shoulderInnerY)} ${X(-d.shoulderEndX)} ${Y(d.shoulderEndY)}`,\n `C ${X(-d.bowlHandleX)} ${Y(d.bowlHandleY)} ${X(d.bowlHandleX)} ${Y(d.bowlHandleY)} ${X(d.shoulderEndX)} ${Y(d.shoulderEndY)}`,\n `C ${X(d.shoulderInnerX)} ${Y(d.shoulderInnerY)} ${X(d.shoulderHandleX)} ${y(0)} ${X(d.halfWidth)} ${y(0)}`,\n );\n }\n parts.push(\n `L ${x(width - topR)} ${y(0)}`,\n `Q ${x(width)} ${y(0)} ${x(width)} ${y(topR)}`,\n `L ${x(width)} ${y(height - botR)}`,\n `Q ${x(width)} ${y(height)} ${x(width - botR)} ${y(height)}`,\n `L ${x(botR)} ${y(height)}`,\n `Q ${x(0)} ${y(height)} ${x(0)} ${y(height - botR)}`,\n 'Z',\n );\n return parts.join(' ');\n}\n\n/**\n * The bar outline as an SVG path, in the bar's own coordinates (MAUI `G9TabBarChromeDrawable` / `G9TabBarOutline`).\n * Classic: a rounded rectangle with a semicircular notch of radius `notchCircleRadius` around `notchCenterX` when set;\n * `notchDepth` (0..1) scales its depth. Sculpted: 24 px quadratic corners and the S-shouldered cradle, clamped like the\n * FAB (`clampTabBarNotchCenter`); `notchDepth` grows the cradle from its centre, as MAUI's notch progress does.\n */\nexport function tabBarChromePath(\n width: number,\n height: number,\n notchCenterX: number | null,\n notchDepth = 1,\n style: G9TabBarStyle = 'classic',\n): string {\n if (style === 'sculpted') return sculptedOutline(width, height, notchCenterX, notchDepth);\n const r = Math.min(M.barTopRadius, height / 2, width / 2);\n const rb = Math.min(M.barBottomRadius, height / 2, width / 2);\n const parts = [`M ${n(r)} 0`];\n if (notchCenterX !== null && notchDepth > 0) {\n const R = M.notchCircleRadius;\n const cx = Math.max(r + R, Math.min(notchCenterX, width - r - R));\n parts.push(`L ${n(cx - R)} 0`, `A ${n(R)} ${n(R * Math.min(notchDepth, 1))} 0 0 0 ${n(cx + R)} 0`);\n }\n parts.push(\n `L ${n(width - r)} 0`,\n `A ${n(r)} ${n(r)} 0 0 1 ${n(width)} ${n(r)}`,\n `L ${n(width)} ${n(height - rb)}`,\n `A ${n(rb)} ${n(rb)} 0 0 1 ${n(width - rb)} ${n(height)}`,\n `L ${n(rb)} ${n(height)}`,\n `A ${n(rb)} ${n(rb)} 0 0 1 0 ${n(height - rb)}`,\n `L 0 ${n(r)}`,\n `A ${n(r)} ${n(r)} 0 0 1 ${n(r)} 0`,\n 'Z',\n );\n return parts.join(' ');\n}\n\nconst svgDoc = (w: number, h: number, body: string) =>\n `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${n(w)}\" height=\"${n(h)}\" viewBox=\"0 0 ${n(w)} ${n(h)}\">${body}</svg>`;\n\n/** The blur filter of a shadow recipe: a Gaussian of the recipe's sigma over a region wide enough for its halo. */\nconst blurFilter = (sigma: number) =>\n `<defs><filter id=\"g9tb-shadow\" x=\"-25%\" y=\"-50%\" width=\"150%\" height=\"200%\"><feGaussianBlur stdDeviation=\"${sigma}\"/></filter></defs>`;\n\n/**\n * The chrome as an `<svg content>` document. Classic (`width` × `height`): the fill plus the 1 px top-edge glass\n * highlight. Sculpted: the opaque fill without a highlight, over the bar's own outline blurred into its shadow\n * (MAUI's Skia recipe, `g9TabBarStyleMetrics.sculpted.shadow`); the document is `chromeShadowPadding` larger on every\n * side so the halo is not clipped, and is placed that far up and left of the bar.\n */\nexport function tabBarChromeSvg(\n width: number,\n height: number,\n notchCenterX: number | null,\n fill: string,\n stroke: string,\n style: G9TabBarStyle = 'classic',\n): string {\n if (style === 'sculpted') {\n const shadow = g9TabBarStyleMetrics.sculpted.shadow as NonNullable<G9TabBarStyleMetrics['shadow']>;\n const pad = M.chromeShadowPadding;\n const halo = sculptedOutline(width, height, notchCenterX, 1, pad, pad + shadow.offsetY);\n const body = sculptedOutline(width, height, notchCenterX, 1, pad, pad);\n return svgDoc(\n width + pad * 2,\n height + pad * 2,\n `${blurFilter(shadow.blurSigma)}<path d=\"${halo}\" fill=\"#000000\" fill-opacity=\"${shadow.alpha}\" filter=\"url(#g9tb-shadow)\"/><path d=\"${body}\" fill=\"${fill}\"/>`,\n );\n }\n const d = tabBarChromePath(width, height, notchCenterX);\n return svgDoc(\n width,\n height,\n `<path d=\"${d}\" fill=\"${fill}\" stroke=\"${stroke}\" stroke-width=\"${M.barTopHighlightStrokeSize}\"/>`,\n );\n}\n\n/**\n * The FAB disc's shadow as an `<svg content>` document `fabSize + 2 × chromeShadowPadding` square, placed that far up\n * and left of the FAB box so it scales and fades with the FAB (MAUI draws it in the shadow view with the FAB's scale\n * and visibility). `null` when the style paints no shadow.\n */\nexport function tabBarFabShadowSvg(style: G9TabBarStyle = 'classic'): string | null {\n const m = g9TabBarStyleMetrics.for(style);\n if (!m.shadow) return null;\n const pad = M.chromeShadowPadding;\n const size = m.fabSize + pad * 2;\n const c = size / 2;\n return svgDoc(\n size,\n size,\n `${blurFilter(m.shadow.blurSigma)}<circle cx=\"${n(c)}\" cy=\"${n(c + m.shadow.offsetY + m.shadow.fabOffsetY)}\" r=\"${n(m.shadow.fabDiameter / 2)}\" fill=\"#000000\" fill-opacity=\"${m.shadow.fabAlpha}\" filter=\"url(#g9tb-shadow)\"/>`,\n );\n}\n\n/**\n * The FAB's plus (MAUI `G9FabPlusIconDrawable`) as an `<svg content>` document `size` square: two round-capped bars,\n * each arm `size × armRatio` from the centre, `max(2, size × strokeRatio)` thick, in `color` (a literal colour).\n */\nexport function tabBarFabPlusSvg(size: number, armRatio: number, strokeRatio: number, color: string): string {\n const c = size / 2;\n const arm = size * armRatio;\n const stroke = Math.max(2, size * strokeRatio);\n return svgDoc(\n size,\n size,\n `<path d=\"M ${n(c - arm)} ${n(c)} L ${n(c + arm)} ${n(c)} M ${n(c)} ${n(c - arm)} L ${n(c)} ${n(c + arm)}\" fill=\"none\" stroke=\"${color}\" stroke-width=\"${n(stroke)}\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>`,\n );\n}\n"],"names":["g9TabBarItem","text","icon","extra","Number","tabBarHasOverflow","itemCount","M","tabBarOverflowSlot","resolveTabBarFabIndex","fabIndex","tabBarSlots","overflow","visible","slots","i","tabBarOverflowIndices","out","withState","state","patch","initialTabBarState","config","defaultSelectedIndex","base","index","Math","fab","tabBarItemTap","next","tabBarFabTap","tabBarSubMenuTap","tabBarOverflowTriggerTap","tabBarOverflowItemTap","tabBarBackdropTap","reconcileTabBarState","clamped","tabBarIndicatorSlot","tabBarReservedHeight","m","g9TabBarStyleMetrics","count","tabBarSlotCenterX","slot","slotCount","width","rtl","itemsHorizontalPadding","left","inner","visual","clampTabBarNotchCenter","style","barLeft","barRight","centerX","progress","half","min","max","tabBarFabCenterX","raw","centerOutwardRank","distance","subMenuRowLayout","fabCenterX","size","rowWidth","cells","fraction","overflowColumnLayout","triggerCenterX","barHeight","items","k","n","value","sculptedOutline","height","notchCenterX","ox","oy","p","topR","botR","x","v","y","parts","cx","d","tabBarCradleDesign","X","dx","Y","dy","tabBarChromePath","notchDepth","r","rb","R","svgDoc","w","h","body","blurFilter","sigma","tabBarChromeSvg","fill","stroke","shadow","pad","halo","tabBarFabShadowSvg","c","tabBarFabPlusSvg","armRatio","strokeRatio","color","arm"],"mappings":";AAoCO,SAASA,aAAaC,OAAO,EAAE,EAAEC,OAAoB,OAAO,EAAEC,QAA+B,CAAC,CAAC;IACpG,OAAO;QAAEF;QAAMC;QAAM,cAAcE,KAAU;QAAE,GAAGD,KAAK;IAAC;AAC1D;AAkDO,SAASE,kBAAkBC,SAAiB;IACjD,OAAOA,YAAYC,gBAAAA,qBAAuB;AAC5C;AAGO,MAAMC,qBAAqBD,gBAAAA,qBAAuB,GAAG;AAGrD,SAASE,sBAAsBC,QAAgB,EAAEJ,SAAiB;IACvE,IAAII,WAAW,KAAKA,YAAYJ,WAAW,OAAO;IAClD,IAAID,kBAAkBC,cAAcI,YAAYF,oBAAoB,OAAO;IAC3E,OAAOE;AACT;AAMO,SAASC,YAAYL,SAAiB;IAC3C,MAAMM,WAAWP,kBAAkBC;IACnC,MAAMO,UAAUD,WAAWJ,qBAAqBF;IAChD,MAAMQ,QAAwB,EAAE;IAChC,IAAK,IAAIC,IAAI,GAAGA,IAAIF,SAASE,IAAKD,MAAM,IAAI,CAAC;QAAE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B,EAAEC,WAAmB,EAAEC,KAAa;IACjG,MAAMJ,IAAIhD,OAAO;IACjB,MAAMqD,MAAMrD,OAAOkD;IACnB,MAAMP,SAASnF,KAAK,GAAG,CAAC,GAAGwC,OAAOmD;IAClC,OAAOhB,OACLnC,MACAA,MACA,CAAC,WAAW,EAAES,EAAEuC,IAAIK,KAAK,CAAC,EAAE5C,EAAEuC,GAAG,GAAG,EAAEvC,EAAEuC,IAAIK,KAAK,CAAC,EAAE5C,EAAEuC,GAAG,GAAG,EAAEvC,EAAEuC,GAAG,CAAC,EAAEvC,EAAEuC,IAAIK,KAAK,GAAG,EAAE5C,EAAEuC,GAAG,CAAC,EAAEvC,EAAEuC,IAAIK,KAAK,sBAAsB,EAAED,MAAM,gBAAgB,EAAE3C,EAAEkC,QAAQ,kDAAkD,CAAC;AAE1N"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tab-bar/tab-bar.jsx","sources":["../../src/tab-bar/tab-bar.tsx"],"sourcesContent":["import './tab-bar.css';\nimport { g9Ms } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useRef, useState } from '@lynx-js/react';\nimport { usePressVisual } from '../base/press';\nimport { startTimer, stopTimer } from '../base/timers';\nimport { useControllableState } from '../base/use-controllable-state';\nimport { useG9Back } from '../host/hooks';\nimport { G9Icon } from '../icon/icon';\nimport { useG9Diagnostics, useG9Direction, useG9Strings, useG9Theme, useG9Window } from '../provider/hooks';\nimport {\n easeOutBackCss,\n type G9TabBarStyle,\n type G9TabBarStyleMetrics,\n g9TabBarStyleMetrics,\n g9TabBarMetrics as M,\n} from './metrics';\nimport {\n type G9TabBarClickContext,\n type G9TabBarConfig,\n type G9TabBarFabTappedEventArgs,\n type G9TabBarItem,\n type G9TabBarSelectionChangedEventArgs,\n type G9TabBarState,\n type G9TabBarTransition,\n initialTabBarState,\n overflowColumnLayout,\n reconcileTabBarState,\n resolveTabBarFabIndex,\n subMenuRowLayout,\n tabBarBackdropTap,\n tabBarChromeSvg,\n tabBarFabCenterX,\n tabBarFabPlusSvg,\n tabBarFabShadowSvg,\n tabBarFabTap,\n tabBarHasOverflow,\n tabBarIndicatorSlot,\n tabBarItemTap,\n tabBarOverflowIndices,\n tabBarOverflowItemTap,\n tabBarOverflowSlot,\n tabBarOverflowTriggerTap,\n tabBarReservedHeight,\n tabBarSlotCenterX,\n tabBarSlots,\n tabBarSubMenuTap,\n} from './model';\n\n/** Props of {@link G9TabBar}. */\nexport interface G9TabBarProps {\n /** Bar items (MAUI `Items`). More than 5 collapse the extras behind a More trigger. */\n readonly items: readonly G9TabBarItem[];\n /** Items of the FAB's horizontal sub-menu row (MAUI `SubMenuItems`). */\n readonly subMenuItems?: readonly G9TabBarItem[];\n /** Which item becomes the floating action button; -1 = none (MAUI `FabIndex`). Default 2. */\n readonly fabIndex?: number;\n /**\n * Element id of the floating FAB disc (automation taps it; the item's own `automationId` stays on its bar slot).\n * Keep it to `[A-Za-z0-9_-]`.\n */\n readonly fabAutomationId?: string;\n /** Controlled selection (MAUI `SelectedIndex`, two-way). */\n readonly selectedIndex?: number;\n /** Initial selection while uncontrolled (MAUI `DefaultSelectedIndex`). Default 0. */\n readonly defaultSelectedIndex?: number;\n readonly onSelectedIndexChange?: (index: number) => void;\n /** Controlled FAB-floating state (MAUI `IsCenterFloating`, two-way). */\n readonly isCenterFloating?: boolean;\n readonly onCenterFloatingChange?: (floating: boolean) => void;\n /** Controlled sub-menu state (MAUI `IsFabOpen`, two-way). */\n readonly isFabOpen?: boolean;\n readonly onFabOpenChange?: (open: boolean) => void;\n /** Controlled overflow column state (MAUI `IsOverflowOpen`, two-way). */\n readonly isOverflowOpen?: boolean;\n readonly onOverflowOpenChange?: (open: boolean) => void;\n /** Selecting a non-FAB item returns the FAB to the bar (MAUI `ResetCenterOnMenuSelection`). Default true. */\n readonly resetCenterOnMenuSelection?: boolean;\n /** Label of the More trigger (MAUI `OverflowText`). Default: the app's `More` string, else \"More\". */\n readonly overflowText?: string | null;\n /** A bar, overflow or sub-menu item was tapped (MAUI `ItemSelected`), after its own callbacks. */\n readonly onItemSelected?: (args: G9TabBarSelectionChangedEventArgs) => void;\n /**\n * The FAB was tapped, before any state changes (MAUI `FabTapped`). Set `args.handled = true` (or return\n * `'handled'`) to replace the built-in fan-out; the bar then changes nothing.\n */\n readonly onFabTapped?: (args: G9TabBarFabTappedEventArgs) => undefined | 'handled' | undefined;\n /**\n * The visual style (MAUI 1.4.0 `BarStyle`): `'classic'` (default: the glass bar, semicircle notch, selection pill) or\n * `'sculpted'` (the opaque bar with a soft shadow, the S-shouldered cradle, the flat primary disc, filled-icon\n * selection). Behaviour is identical; switching at runtime keeps the selection and the FAB and overflow state. A host\n * reserving the bar's height reads `g9TabBarStyleMetrics.for(barStyle)` (MAUI `CurrentMetrics`).\n */\n readonly barStyle?: G9TabBarStyle;\n readonly className?: string;\n}\n\nconst PRESS = Object.freeze({\n property: 'opacity' as const,\n rest: M.defaultRestOpacity,\n pressed: M.itemPressedOpacity,\n hovered: M.itemHoveredOpacity,\n get inMs() {\n return g9Ms(M.touchAnimationDurationMs);\n },\n get outMs() {\n return g9Ms(M.touchAnimationDurationMs);\n },\n});\n\n/**\n * Bottom navigation with a floating action button (MAUI `G9TabBar`): the FAB rises out of a notch and fans out a\n * horizontal sub-menu row; more than five items collapse behind a More trigger with a vertical overflow column; a tap\n * outside the open menus (on the backdrop) closes them. The state machine is the pure transitions in `./model`. Two\n * styles (`barStyle`): Classic (a flat `<svg>` chrome with a 1 px highlight, a semicircular notch, an animated pill on\n * the selection; no shadow) and Sculpted (an opaque chrome over its own blurred outline, the cradle notch, a flat\n * primary disc with its shadow, the selected item in its `selectedIcon` and the primary colour).\n */\nexport function G9TabBar(props: G9TabBarProps): ReactNode {\n const items = props.items;\n const subMenuItems = props.subMenuItems ?? [];\n const barStyle: G9TabBarStyle = props.barStyle === 'sculpted' ? 'sculpted' : 'classic';\n const metrics = g9TabBarStyleMetrics.for(barStyle);\n const sculpted = barStyle === 'sculpted';\n const config: G9TabBarConfig = {\n itemCount: items.length,\n subMenuCount: subMenuItems.length,\n fabIndex: props.fabIndex ?? M.defaultFabIndex,\n resetCenterOnMenuSelection: props.resetCenterOnMenuSelection ?? true,\n barStyle,\n };\n const initial = useRef<G9TabBarState | null>(null);\n if (initial.current === null) initial.current = initialTabBarState(config, props.defaultSelectedIndex ?? 0);\n const [selectedIndex, setSelectedIndex] = useControllableState<number>({\n value: props.selectedIndex,\n defaultValue: initial.current.selectedIndex,\n onChange: props.onSelectedIndexChange,\n name: 'G9TabBar.selectedIndex',\n });\n const [isCenterFloating, setCenterFloating] = useControllableState<boolean>({\n value: props.isCenterFloating,\n defaultValue: initial.current.isCenterFloating,\n onChange: props.onCenterFloatingChange,\n name: 'G9TabBar.isCenterFloating',\n });\n const [isFabOpen, setFabOpen] = useControllableState<boolean>({\n value: props.isFabOpen,\n defaultValue: false,\n onChange: props.onFabOpenChange,\n name: 'G9TabBar.isFabOpen',\n });\n const [isOverflowOpen, setOverflowOpen] = useControllableState<boolean>({\n value: props.isOverflowOpen,\n defaultValue: false,\n onChange: props.onOverflowOpenChange,\n name: 'G9TabBar.isOverflowOpen',\n });\n const state: G9TabBarState = { selectedIndex, isCenterFloating, isFabOpen, isOverflowOpen };\n const apply = (next: G9TabBarState) => {\n if (next.selectedIndex !== state.selectedIndex) setSelectedIndex(next.selectedIndex);\n if (next.isCenterFloating !== state.isCenterFloating) setCenterFloating(next.isCenterFloating);\n if (next.isFabOpen !== state.isFabOpen) setFabOpen(next.isFabOpen);\n if (next.isOverflowOpen !== state.isOverflowOpen) setOverflowOpen(next.isOverflowOpen);\n };\n\n // Programmatic selection / FabIndex / Items changes bring the FAB state with them (MAUI ReconcileFabStateWithSelection).\n useEffect(() => {\n apply(reconcileTabBarState(state, config));\n }, [selectedIndex, config.fabIndex, config.itemCount, config.resetCenterOnMenuSelection]);\n\n // Startup reveal of the selected item, once (MAUI StartupSelectionReveal).\n const [revealing, setRevealing] = useState<boolean>(M.startupSelectionRevealEnabled);\n const revealTimer = useRef<ReturnType<typeof startTimer> | null>(null);\n useEffect(() => {\n if (!revealing) return;\n revealTimer.current = startTimer(() => setRevealing(false), M.startupSelectionRevealDelayMs);\n return () => stopTimer(revealTimer.current);\n }, []);\n const cancelReveal = () => {\n if (!revealing) return;\n stopTimer(revealTimer.current);\n setRevealing(false);\n };\n\n const diagnostics = useG9Diagnostics();\n const run = (effect: G9TabBarTransition['effect']) => {\n if (!effect) return;\n const item = (effect.isSubMenuItem ? subMenuItems : items)[effect.index] as G9TabBarItem;\n const context: G9TabBarClickContext = { index: effect.index, item, isSubMenuItem: effect.isSubMenuItem };\n try {\n item.onClick?.(context);\n if (item.command && item.canExecute !== false) item.command(item.commandParameter);\n props.onItemSelected?.(context);\n } catch (error) {\n diagnostics.log({ level: 'error', message: 'G9TabBar: item handler failed.', source: 'G9TabBar', error });\n }\n };\n const transition = (t: G9TabBarTransition) => {\n cancelReveal();\n apply(t.state);\n run(t.effect);\n };\n const onFab = () => {\n cancelReveal();\n const args: G9TabBarFabTappedEventArgs = { handled: false };\n const result = props.onFabTapped?.(args);\n if (args.handled || result === 'handled') return;\n transition(tabBarFabTap(state, config));\n };\n\n const open = isFabOpen || isOverflowOpen;\n useG9Back(\n () => {\n apply(tabBarBackdropTap(state, config));\n return true;\n },\n { enabled: open },\n );\n\n const rtl = useG9Direction() === 'rtl';\n const strings = useG9Strings();\n const palette = useG9Theme().palette;\n const win = useG9Window();\n const [measured, setMeasured] = useState(0);\n const width = measured > 0 ? measured : win.width;\n const barWidth = Math.max(width - M.barHorizontalGap * 2, 0);\n const slots = tabBarSlots(items.length);\n const slotCount = slots.length;\n const fab = resolveTabBarFabIndex(config.fabIndex, config.itemCount);\n const floating = isCenterFloating && fab >= 0;\n const fabCenterX = fab >= 0 ? tabBarFabCenterX(fab, slotCount, width, rtl, barStyle) : 0;\n const indicatorSlot = tabBarIndicatorSlot(state, config);\n const overflowLabel = props.overflowText || strings.resolve('More') || 'More';\n const overflowSelected = tabBarHasOverflow(items.length) && selectedIndex >= tabBarOverflowSlot;\n const reserved = tabBarReservedHeight(state, config);\n const bounce = easeOutBackCss(M.fabPopBackCoefficient);\n\n // SVG content cannot read CSS variables: the chrome takes literal palette colours.\n const chromeFill = sculpted ? palette.CardBackground : palette.SurfaceContainerHigh;\n const chromeStroke = palette.OutlineVariant;\n const pad = M.chromeShadowPadding;\n // Sculpted's chrome carries its shadow, so its SVG is `pad` larger on every side and sits `pad` up and left of the bar.\n const chromeBox = sculpted\n ? {\n left: `${-pad}px`,\n top: `${-pad}px`,\n width: `${barWidth + pad * 2}px`,\n height: `${metrics.barHeight + pad * 2}px`,\n }\n : { height: `${metrics.barHeight}px` };\n const fabShadow = tabBarFabShadowSvg(barStyle);\n const visualSlot = (slot: number) => (rtl ? slotCount - 1 - slot : slot);\n\n const slotViews = slots.map((slot, i) => {\n const isOverflow = slot.kind === 'overflow';\n const index = slot.kind === 'item' ? slot.index : -1;\n const item = isOverflow ? { text: overflowLabel, icon: 'menu' } : (items[index] as G9TabBarItem);\n const selected = isOverflow ? overflowSelected : index === selectedIndex;\n const hiddenUnderFab = index === fab && floating;\n const revealPose = revealing && selected && !hiddenUnderFab;\n return (\n <TabBarSlot\n key={isOverflow ? 'overflow' : `item-${index}`}\n item={item as G9TabBarItem}\n selected={selected}\n hidden={hiddenUnderFab}\n revealPose={revealPose}\n order={visualSlot(i)}\n metrics={metrics}\n onTap={() =>\n transition(isOverflow ? tabBarOverflowTriggerTap(state, config) : tabBarItemTap(state, config, index))\n }\n />\n );\n });\n\n const sub = subMenuRowLayout(subMenuItems.length, fabCenterX, width);\n const overflowIndices = tabBarOverflowIndices(items.length);\n const column = overflowColumnLayout(\n overflowIndices.length,\n tabBarSlotCenterX(tabBarOverflowSlot, slotCount, width, rtl, metrics.itemsHorizontalPadding),\n width,\n barStyle,\n );\n\n return (\n <view\n className={`g9-tab-bar${sculpted ? ' g9-tab-bar--sculpted' : ''} ${props.className ?? ''}`}\n style={{ height: `${reserved}px` }}\n bindlayoutchange={(e: { detail?: { width?: number } }) => {\n const w = Number(e.detail?.width);\n if (Number.isFinite(w) && w > 0 && w !== measured) setMeasured(w);\n }}\n >\n {open ? (\n <view\n className=\"g9-tab-bar__backdrop\"\n style={{ zIndex: M.backdropZIndex, top: `${M.backdropTopInset}px` }}\n bindtap={() => apply(tabBarBackdropTap(state, config))}\n />\n ) : null}\n <view className=\"g9-tab-bar__chrome\" style={{ zIndex: 2, height: `${metrics.barHeight}px` }}>\n <svg\n className=\"g9-tab-bar__chrome-flat\"\n content={tabBarChromeSvg(barWidth, metrics.barHeight, null, chromeFill, chromeStroke, barStyle)}\n style={{\n ...chromeBox,\n opacity: floating ? 0 : 1,\n transition: `opacity ${g9Ms(M.centerStateDurationMs)}ms ease-out`,\n }}\n />\n {fab >= 0 ? (\n <svg\n className=\"g9-tab-bar__chrome-notched\"\n content={tabBarChromeSvg(\n barWidth,\n metrics.barHeight,\n fabCenterX - M.barHorizontalGap,\n chromeFill,\n chromeStroke,\n barStyle,\n )}\n style={{\n ...chromeBox,\n opacity: floating ? 1 : 0,\n transition: `opacity ${g9Ms(M.centerStateDurationMs)}ms ease-out`,\n }}\n />\n ) : null}\n <view\n className=\"g9-tab-bar__slots\"\n style={\n metrics.itemsHorizontalPadding > 0\n ? { left: `${metrics.itemsHorizontalPadding}px`, right: `${metrics.itemsHorizontalPadding}px` }\n : {}\n }\n >\n {indicatorSlot >= 0 && metrics.showsSelectionIndicator ? (\n <view\n className=\"g9-tab-bar__indicator\"\n style={{\n left: `${((visualSlot(slots.findIndex((s) => (s.kind === 'item' ? s.index === indicatorSlot : indicatorSlot === tabBarOverflowSlot))) + 0.5) * 100) / slotCount}%`,\n transition: `left ${g9Ms(M.indicatorMoveDurationMs)}ms cubic-bezier(0.215, 0.61, 0.355, 1)`,\n top: `${M.indicatorTopOffset + metrics.selectedItemNudgeY}px`,\n }}\n />\n ) : null}\n {slotViews}\n </view>\n </view>\n {/* The idle FAB sits, invisible, over the centre slot: it must not take that slot's taps (MAUI InputTransparent). */}\n {fab >= 0 ? (\n <view\n className={`g9-tab-bar__fab${floating ? ' g9-tab-bar__fab--floating' : ''}`}\n {...(props.fabAutomationId ? { id: props.fabAutomationId } : {})}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={(items[fab] as G9TabBarItem).text ?? ''}\n style={{\n zIndex: 3,\n width: `${metrics.fabSize}px`,\n height: `${metrics.fabSize}px`,\n borderRadius: `${metrics.fabSize / 2}px`,\n left: `${fabCenterX - metrics.fabSize / 2}px`,\n // The box rises fabProtrusionAboveBar above the bar's top edge (Classic: half of it; Sculpted: the disc's\n // centre sinks 9 px into the cradle).\n bottom: `${M.barBottomGap + metrics.barHeight - (metrics.fabSize - metrics.fabProtrusionAboveBar)}px`,\n opacity: floating ? 1 : 0,\n transform: floating\n ? 'translateY(0px) scale(1)'\n : `translateY(${M.fabIdleVerticalOffset}px) scale(${M.fabIdleScaleMin})`,\n transition: floating\n ? `transform ${g9Ms(M.centerStateBouncyDurationMs)}ms ${bounce}, opacity ${g9Ms(M.centerStateDurationMs)}ms ease-out`\n : `transform ${g9Ms(M.centerStateDurationMs)}ms cubic-bezier(0.55, 0.055, 0.675, 0.19), opacity ${g9Ms(M.centerStateDurationMs)}ms ease-in`,\n }}\n bindtap={floating ? onFab : undefined}\n user-interaction-enabled={floating}\n >\n {fabShadow ? (\n <svg\n className=\"g9-tab-bar__fab-shadow\"\n content={fabShadow}\n style={{\n left: `${-pad}px`,\n top: `${-pad}px`,\n width: `${metrics.fabSize + pad * 2}px`,\n height: `${metrics.fabSize + pad * 2}px`,\n }}\n />\n ) : null}\n <view\n className=\"g9-tab-bar__fab-inner\"\n style={{\n width: `${metrics.fabInnerSize}px`,\n height: `${metrics.fabInnerSize}px`,\n borderRadius: `${metrics.fabInnerSize / 2}px`,\n }}\n >\n <view\n className=\"g9-tab-bar__fab-icon\"\n style={{\n transform: `rotate(${isFabOpen ? M.fabRotationOpenDegrees : 0}deg)`,\n transition: `transform ${M.openStateDurationMs}ms ease-out`,\n }}\n >\n {sculpted ? (\n <svg\n className=\"g9-tab-bar__fab-plus\"\n content={tabBarFabPlusSvg(\n metrics.fabIconSize,\n metrics.fabPlusArmRatio,\n metrics.fabPlusStrokeRatio,\n palette.OnPrimary,\n )}\n style={{ width: `${metrics.fabIconSize}px`, height: `${metrics.fabIconSize}px` }}\n />\n ) : (\n <G9Icon icon=\"plus\" size={M.fabIconSize * 0.7} color=\"var(--g9-on-primary)\" />\n )}\n </view>\n </view>\n </view>\n ) : null}\n {isFabOpen && subMenuItems.length > 0 ? (\n <view\n className=\"g9-tab-bar__submenu\"\n style={{\n zIndex: 3,\n left: `${sub.left}px`,\n height: `${M.subMenuRowCellHeight}px`,\n bottom: `${M.barBottomGap + metrics.barHeight + metrics.fabProtrusionAboveBar + M.subMenuRowAboveFabGap}px`,\n }}\n >\n {subMenuItems.map((item, i) => (\n <MenuCell\n key={`sub-${i}`}\n className=\"g9-tab-bar__submenu-cell\"\n item={item}\n size={M.subMenuRowItemSize}\n height={M.subMenuRowCellHeight}\n left={(sub.cells[i] as { x: number }).x}\n bottom={0}\n delayMs={(sub.cells[i] as { delayMs: number }).delayMs}\n durationMs={M.openStateDurationMs}\n travelX={M.subMenuRowRevealTravelX * (i < (subMenuItems.length - 1) / 2 ? 1 : -1)}\n travelY={M.subMenuRowRevealTravelY}\n iconSize={M.subMenuRowIconSizeMax}\n fontSize={M.subMenuRowFontSizeMax}\n selected={false}\n onAccent={sculpted}\n onTap={() => transition(tabBarSubMenuTap(state, config, i))}\n />\n ))}\n </view>\n ) : null}\n {isOverflowOpen && overflowIndices.length > 0 ? (\n <view className=\"g9-tab-bar__overflow\" style={{ zIndex: 3, left: `${column.left}px` }}>\n {overflowIndices.map((source, k) => (\n <MenuCell\n key={`overflow-${source}`}\n className=\"g9-tab-bar__overflow-item\"\n item={items[source] as G9TabBarItem}\n size={M.overflowItemSize}\n height={M.overflowItemSize}\n left={0}\n bottom={(column.items[k] as { bottom: number }).bottom}\n delayMs={(column.items[k] as { delayMs: number }).delayMs}\n durationMs={M.overflowStateDurationMs}\n travelX={0}\n travelY={M.overflowRevealTravelY}\n iconSize={M.overflowItemIconSize}\n fontSize={M.overflowItemFontSize}\n selected={source === selectedIndex}\n onAccent={false}\n onTap={() => transition(tabBarOverflowItemTap(state, config, source))}\n />\n ))}\n </view>\n ) : null}\n </view>\n );\n}\n\nfunction TabBarSlot(props: {\n readonly item: G9TabBarItem;\n readonly selected: boolean;\n readonly hidden: boolean;\n readonly revealPose: boolean;\n readonly order: number;\n readonly metrics: G9TabBarStyleMetrics;\n readonly onTap: () => void;\n}): ReactNode {\n const press = usePressVisual(PRESS, false);\n const { item, selected, hidden, revealPose, metrics } = props;\n // Classic: ink on the pill; Sculpted (no pill): the selection IS the primary colour and the filled icon.\n const sculpted = metrics.style === 'sculpted';\n const color = sculpted\n ? selected\n ? 'var(--g9-primary)'\n : 'var(--g9-text-secondary)'\n : selected\n ? 'var(--g9-on-primary-container)'\n : 'var(--g9-on-surface-variant)';\n const icon = sculpted && selected && item.selectedIcon !== undefined ? item.selectedIcon : (item.icon ?? 'check');\n const pose = hidden\n ? {\n opacity: 0,\n transform: `translateY(${M.centerItemHiddenTranslationY}px) scale(${1 - M.centerItemHiddenScaleAmount})`,\n transition: `opacity ${M.centerStateDurationMs}ms ease-out, transform ${M.centerStateDurationMs}ms ease-out`,\n }\n : revealPose\n ? {\n opacity: M.selectedReturnRevealStartOpacity,\n transform: `translateY(${M.selectedReturnRevealTranslationY}px) scale(${M.selectedReturnRevealStartScale})`,\n }\n : {\n opacity: 1,\n transform: `translateY(${M.selectedItemTranslationY}px) scale(1)`,\n transition: `opacity ${M.selectedReturnRevealDurationMs}ms ease-out, transform ${M.selectedReturnRevealDurationMs}ms ease-out`,\n };\n return (\n <view\n className={`g9-tab-bar__slot${selected ? ' g9-tab-bar__slot--selected' : ''}${hidden ? ' g9-tab-bar__slot--hidden' : ''}`}\n {...(item.automationId ? { id: item.automationId } : {})}\n style={{ order: props.order, minWidth: `${M.slotItemMinWidth}px`, maxWidth: `${M.slotItemMaxWidth}px` }}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={item.text ?? ''}\n bindtap={hidden ? undefined : props.onTap}\n {...press}\n >\n <view className=\"g9-tab-bar__slot-body\" style={{ ...pose, rowGap: `${metrics.bottomContentSpacing}px` }}>\n <G9Icon icon={icon} size={metrics.bottomIconSize} color={color} />\n <text\n className=\"g9-tab-bar__label\"\n text-maxline=\"1\"\n style={{ color, fontSize: `${metrics.bottomLabelFontSize}px`, fontWeight: selected ? '700' : '400' }}\n >\n {item.text ?? ''}\n </text>\n </view>\n </view>\n );\n}\n\nfunction MenuCell(props: {\n readonly className: string;\n readonly item: G9TabBarItem;\n readonly size: number;\n readonly height: number;\n readonly left: number;\n readonly bottom: number;\n readonly delayMs: number;\n readonly durationMs: number;\n readonly travelX: number;\n readonly travelY: number;\n readonly iconSize: number;\n readonly fontSize: number;\n readonly selected: boolean;\n /** The icon sits on a solid primary accent (Sculpted sub-menu cells): `OnPrimary`. */\n readonly onAccent: boolean;\n readonly onTap: () => void;\n}): ReactNode {\n const [shown, setShown] = useState(false);\n useEffect(() => {\n const t = startTimer(() => setShown(true), 16);\n return () => stopTimer(t);\n }, []);\n const press = usePressVisual(PRESS, false);\n const bounce = easeOutBackCss(M.fabPopBackCoefficient);\n const color = props.selected ? 'var(--g9-on-primary)' : 'var(--g9-on-surface)';\n const iconColor = props.onAccent ? 'var(--g9-on-primary)' : color;\n return (\n <view\n className={`${props.className}${props.selected ? ` ${props.className}--selected` : ''}`}\n {...(props.item.automationId ? { id: props.item.automationId } : {})}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={props.item.text ?? ''}\n style={{\n left: `${props.left}px`,\n bottom: `${props.bottom}px`,\n width: `${props.size}px`,\n height: `${props.height}px`,\n opacity: shown ? 1 : 0,\n transform: shown\n ? 'translate(0px, 0px) scale(1)'\n : `translate(${props.travelX}px, ${props.travelY}px) scale(${M.fabIdleScaleMin})`,\n transition: `opacity ${props.durationMs}ms ease-out ${props.delayMs}ms, transform ${props.durationMs}ms ${bounce} ${props.delayMs}ms`,\n }}\n bindtap={props.onTap}\n {...press}\n >\n <view className=\"g9-tab-bar__cell-accent\">\n <G9Icon icon={props.item.icon ?? 'check'} size={props.iconSize} color={iconColor} />\n </view>\n <text className=\"g9-tab-bar__cell-label\" text-maxline=\"1\" style={{ fontSize: `${props.fontSize}px`, color }}>\n {props.item.text ?? ''}\n </text>\n </view>\n );\n}\n"],"names":["PRESS","Object","M","g9Ms","G9TabBar","props","_props_subMenuItems","_props_fabIndex","_props_resetCenterOnMenuSelection","_props_defaultSelectedIndex","_props_className","_items_fab_text","items","subMenuItems","barStyle","metrics","g9TabBarStyleMetrics","sculpted","config","initial","useRef","initialTabBarState","selectedIndex","setSelectedIndex","useControllableState","isCenterFloating","setCenterFloating","isFabOpen","setFabOpen","isOverflowOpen","setOverflowOpen","state","apply","next","useEffect","reconcileTabBarState","revealing","setRevealing","useState","revealTimer","startTimer","stopTimer","cancelReveal","diagnostics","useG9Diagnostics","run","effect","item","context","error","transition","t","onFab","args","result","tabBarFabTap","open","useG9Back","tabBarBackdropTap","rtl","useG9Direction","strings","useG9Strings","palette","useG9Theme","win","useG9Window","measured","setMeasured","width","barWidth","Math","slots","tabBarSlots","slotCount","fab","resolveTabBarFabIndex","floating","fabCenterX","tabBarFabCenterX","indicatorSlot","tabBarIndicatorSlot","overflowLabel","overflowSelected","tabBarHasOverflow","tabBarOverflowSlot","reserved","tabBarReservedHeight","bounce","easeOutBackCss","chromeFill","chromeStroke","pad","chromeBox","fabShadow","tabBarFabShadowSvg","visualSlot","slot","slotViews","i","isOverflow","index","selected","hiddenUnderFab","revealPose","TabBarSlot","tabBarOverflowTriggerTap","tabBarItemTap","sub","subMenuRowLayout","overflowIndices","tabBarOverflowIndices","column","overflowColumnLayout","tabBarSlotCenterX","view","e","_e_detail","w","Number","svg","tabBarChromeSvg","s","undefined","tabBarFabPlusSvg","G9Icon","MenuCell","tabBarSubMenuTap","source","k","tabBarOverflowItemTap","_item_icon","_item_text","_item_text1","press","usePressVisual","hidden","color","icon","pose","text","_props_item_text","_props_item_icon","_props_item_text1","shown","setShown","iconColor"],"mappings":";;;;;;;;;;;AAgGA,MAAMA,QAAQC,OAAO,MAAM,CAAC;IAC1B,UAAU;IACV,MAAMC,gBAAAA,kBAAoB;IAC1B,SAASA,gBAAAA,kBAAoB;IAC7B,SAASA,gBAAAA,kBAAoB;IAC7B,IAAI;QACF,OAAOC,KAAKD,gBAAAA,wBAA0B;IACxC;IACA,IAAI;QACF,OAAOC,KAAKD,gBAAAA,wBAA0B;IACxC;AACF;AAUO,SAASE,SAASC,KAAoB;QAEtBC,qBAOTC,iBACkBC,mCAI6CC,6BA2JJC,kBAsE1CC;IA9O7B,MAAMC,QAAQP,MAAM,KAAK;IACzB,MAAMQ,eAAe,QAAAP,CAAAA,sBAAAA,MAAM,YAAY,AAAD,IAAjBA,sBAAsB,EAAE;IAC7C,MAAMQ,WAA0BT,AAAmB,eAAnBA,MAAM,QAAQ,GAAkB,aAAa;IAC7E,MAAMU,UAAUC,oBAAoB,CAApBA,MAAwB,CAACF;IACzC,MAAMG,WAAWH,AAAa,eAAbA;IACjB,MAAMI,SAAyB;QAC7B,WAAWN,MAAM,MAAM;QACvB,cAAcC,aAAa,MAAM;QACjC,UAAU,QAAAN,CAAAA,kBAAAA,MAAM,QAAQ,AAAD,IAAbA,kBAAkBL,gBAAAA,eAAiB;QAC7C,4BAA4B,QAAAM,CAAAA,oCAAAA,MAAM,0BAA0B,AAAD,IAA/BA,oCAAoC;QAChEM;IACF;IACA,MAAMK,UAAUC,OAA6B;IAC7C,IAAID,AAAoB,SAApBA,QAAQ,OAAO,EAAWA,QAAQ,OAAO,GAAGE,mBAAmBH,QAAQ,QAAAT,CAAAA,8BAAAA,MAAM,oBAAoB,AAAD,IAAzBA,8BAA8B;IACzG,MAAM,CAACa,eAAeC,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OAAO,GAAGA,MAAM,IAAI,CAAC,EAAE,CAAC;QACxB,QAAQ,GAAGA,MAAM,MAAM,CAAC,EAAE,CAAC;QAC3B,SAAS2I,QAAQ,IAAI;QACrB,WAAWA,QACP,iCACA,CAAC,UAAU,EAAE3I,MAAM,OAAO,CAAC,IAAI,EAAEA,MAAM,OAAO,CAAC,UAAU,EAAEH,gBAAAA,eAAiB,CAAC,CAAC,CAAC;QACnF,YAAY,CAAC,QAAQ,EAAEG,MAAM,UAAU,CAAC,YAAY,EAAEA,MAAM,OAAO,CAAC,cAAc,EAAEA,MAAM,UAAU,CAAC,GAAG,EAAEmF,OAAO,CAAC,EAAEnF,MAAM,OAAO,CAAC,EAAE,CAAC;IACvI,GACA,SAASA,MAAM,KAAK,GACnB,GAAGiI,KAAK,EACV;MACC,CAACnB,KAAK,UAAU,0BAA0B;QACxC,CAACU,OAAO,MAAM,QAAAiB,CAAAA,mBAAAA,MAAM,IAAI,CAAC,IAAI,AAAD,IAAdA,mBAAmB,SAAS,MAAMzI,MAAM,QAAQ,EAAE,OAAO6I,YAAa;MACtF,EAAE/B,KAAK;MACP,CAACyB,KAAK,UAAU,yBAAyB,aAAa,IAAI,OAAO;QAAE,UAAU,GAAGvI,MAAM,QAAQ,CAAC,EAAE,CAAC;QAAEoI;IAAM,GAAG;QAC3G,CAAC,QAAAM,CAAAA,oBAAAA,MAAM,IAAI,CAAC,IAAI,AAAD,IAAdA,oBAAmB,GAAG;MACzB,EAAEH,KAAK;IACT,EAAEzB;AAEN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tabs/model.jsx","sources":["../../src/tabs/model.ts"],"sourcesContent":["import { formatNumber, type G9ImageSource, type G9NumberingSystem } from '@g9tm/lynxcontrols-foundation';\nimport type { ReactNode } from '@lynx-js/react';\nimport type { G9IconInput } from '../icon/icon';\n\n/** Visual treatment of the bar (MAUI `G9TabStyle`). */\nexport type G9TabStyle = 'underlined' | 'pill';\n/** Cell sizing (MAUI `G9TabMode`): equal full-width cells, or auto-width cells in a horizontal scroller. */\nexport type G9TabMode = 'fixed' | 'scrollable';\n/** Where the bar sits relative to the content (MAUI `G9TabBarPosition`). */\nexport type G9TabBarPosition = 'top' | 'bottom';\n\n/**\n * One tab (MAUI `G9TabItem`). A plain descriptor: change a field and re-render, and only that cell updates (MAUI\n * `VisualChanged` + in-place `UpdateCellContent`). Icon slot precedence as everywhere: emoji → icon → image path →\n * image source.\n */\nexport interface G9TabItem {\n /** Stable identity; keeps a realized body (and its state) with its tab across reorders. Default: the index. */\n readonly key?: string;\n readonly text?: string | null;\n readonly emoji?: string | null;\n readonly icon?: G9IconInput;\n readonly imagePath?: string | null;\n readonly image?: G9ImageSource | null;\n /** Inline pill badge with the formatted count; 0 = none. */\n readonly badgeCount?: number;\n /** Inline pill badge with custom text; wins over `badgeCount`. */\n readonly badgeText?: string | null;\n /** A 7×7 dot instead of a pill. */\n readonly badgeDot?: boolean;\n /** Badge fill. Default `var(--g9-primary)` for the pill, `var(--g9-error)` for the dot (MAUI CreateBadge). */\n readonly badgeColor?: string | null;\n /** The body shown while this tab is active (MAUI `TabContent`); a function is called when the tab realizes. */\n readonly content?: ReactNode | (() => ReactNode);\n}\n\n/** Tab view metrics (MAUI `G9Metrics` tab constants and `G9TabView` private constants). */\nexport const g9TabViewMetrics = Object.freeze({\n tabHeight: 52,\n barInnerPadding: 4,\n barRadius: 26,\n pillVerticalInset: 2,\n pillRadius: 18,\n barToContentGap: 8,\n underlineThickness: 2.5,\n edgeLineThickness: 1,\n separatorVerticalInset: 12,\n indicatorMoveMs: 240,\n contentTransitionMs: 160,\n contentSlidePx: 6,\n lazyRealizeDelayMs: 240,\n contentPadding: Object.freeze([10, 10, 10, 0] as const),\n});\n\n/** The index actually shown: the selection clamped into the items (MAUI `EffectiveIndex`); -1 with no items. */\nexport function effectiveTabIndex(selectedIndex: number, count: number): number {\n if (count <= 0) return -1;\n if (!Number.isFinite(selectedIndex)) return 0;\n return Math.min(Math.max(Math.trunc(selectedIndex), 0), count - 1);\n}\n\n/** The identity of a tab: its `key`, else its index. */\nexport function tabKey(item: G9TabItem, index: number): string {\n return item.key ?? `#${index}`;\n}\n\n/** The inline badge of a tab: `null`, `'dot'`, or the pill text (custom text wins; counts are `N0`-grouped). */\nexport function tabBadge(item: G9TabItem, numberingSystem: G9NumberingSystem): 'dot' | string | null {\n if (item.badgeText != null && item.badgeText.trim() !== '') return item.badgeText;\n const count = item.badgeCount ?? 0;\n if (Number.isFinite(count) && count > 0) return formatNumber(Math.trunc(count), { numberingSystem });\n return item.badgeDot ? 'dot' : null;\n}\n\n/** Visual (left-to-right) order of the cells: reversed in RTL so the first tab sits at the reading start. */\nexport function tabVisualOrder(count: number, rtl: boolean): number[] {\n const order: number[] = [];\n for (let i = 0; i < count; i++) order.push(rtl ? count - 1 - i : i);\n return order;\n}\n\n/** Content slide start offset: forward arrives from the trailing edge, back from the leading edge; RTL mirrors. */\nexport function tabContentSlideFrom(previous: number, next: number, rtl: boolean): number {\n const forward = previous < 0 || next > previous;\n const sign = (forward ? 1 : -1) * (rtl ? -1 : 1);\n return g9TabViewMetrics.contentSlidePx * sign;\n}\n\n/** CSS padding from a MAUI-style thickness: one value, `[h, v]` or `[l, t, r, b]`. */\nexport function thicknessCss(value: number | readonly number[]): string {\n const parts = typeof value === 'number' ? [value] : value;\n const [l = 0, t = l, r = l, b = t] = parts.length === 2 ? [parts[0], parts[1], parts[0], parts[1]] : parts;\n return `${t}px ${r}px ${b}px ${l}px`;\n}\n\n/**\n * Lazy-once realization (MAUI \"Lazy tab-body rendering\"): a body is built on its first activation, after\n * `lazyRealizeDelayMs` (a spinner meanwhile), and then stays built, hidden while inactive, so its state survives. A\n * pending token makes rapid switches realize only the latest selection. `eager` builds everything up front.\n */\nexport class G9TabRealizer {\n private readonly realized = new Set<string>();\n private pending: string | null = null;\n private generation = 0;\n\n constructor(private readonly eager: () => boolean) {}\n\n isRealized(key: string): boolean {\n return this.eager() || this.realized.has(key);\n }\n\n /** Marks `key` active: returns `'shown'` when it is already built, else a token to pass to {@link realize}. */\n activate(key: string): 'shown' | number {\n if (this.isRealized(key)) {\n this.pending = null;\n return 'shown';\n }\n this.pending = key;\n this.generation += 1;\n return this.generation;\n }\n\n /** Realizes the pending key when `token` is still the latest activation; returns whether it did. */\n realize(token: number): boolean {\n if (token !== this.generation || this.pending === null) return false;\n this.realized.add(this.pending);\n this.pending = null;\n return true;\n }\n\n /** Drops keys that are no longer in the items (a removed tab's body is released). */\n retain(keys: readonly string[]): void {\n const live = new Set(keys);\n for (const key of Array.from(this.realized)) if (!live.has(key)) this.realized.delete(key);\n if (this.pending !== null && !live.has(this.pending)) this.pending = null;\n }\n\n get pendingKey(): string | null {\n return this.pending;\n }\n}\n"],"names":["g9TabViewMetrics","Object","effectiveTabIndex","selectedIndex","count","Number","Math","tabKey","item","index","_item_key","tabBadge","numberingSystem","_item_badgeCount","formatNumber","tabVisualOrder","rtl","order","i","tabContentSlideFrom","previous","next","forward","sign","thicknessCss","value","parts","l","t","r","b","G9TabRealizer","key","token","keys","live","Set","Array","eager"],"mappings":";;;;;;;;;;;AAqCO,MAAMA,mBAAmBC,OAAO,MAAM,CAAC;IAC5C,WAAW;IACX,iBAAiB;IACjB,WAAW;IACX,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,wBAAwB;IACxB,iBAAiB;IACjB,qBAAqB;IACrB,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgBA,OAAO,MAAM,CAAC;QAAC;QAAI;QAAI;QAAI;KAAE;AAC/C;AAGO,SAASC,kBAAkBC,aAAqB,EAAEC,KAAa;IACpE,IAAIA,SAAS,GAAG,OAAO;IACvB,IAAI,CAACC,OAAO,QAAQ,CAACF,gBAAgB,OAAO;IAC5C,OAAOG,KAAK,GAAG,CAACA,KAAK,GAAG,CAACA,KAAK,KAAK,CAACH,gBAAgB,IAAIC,QAAQ;AAClE;AAGO,SAASG,OAAOC,IAAe,EAAEC,KAA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U,GAAG;IAE+B;AAmCtD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tabs/tab-view.jsx","sources":["../../src/tabs/tab-view.tsx"],"sourcesContent":["import './tabs.css';\nimport type { G9SegmentInput } from '@g9tm/lynxcontrols-foundation';\nimport { ViewPager, type ViewPagerRef } from '@lynx-js/lynx-ui-view-pager';\nimport { type ReactNode, useEffect, useMemo, useRef, useState } from '@lynx-js/react';\nimport { useG9Anchor, useG9AnchorRegistry } from '../anchor/hooks';\nimport { g9RowStyle } from '../base/control';\nimport { startTimer, stopTimer } from '../base/timers';\nimport { useControllableState } from '../base/use-controllable-state';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { type G9NodeRef, invokeNodeWhenReady } from '../fields/use-text-input';\nimport { G9IconSlot } from '../icon/slot';\nimport { useG9Culture, useG9Direction } from '../provider/hooks';\nimport { useG9Place } from '../route/hooks';\nimport {\n effectiveTabIndex,\n type G9TabBarPosition,\n type G9TabItem,\n type G9TabMode,\n G9TabRealizer,\n type G9TabStyle,\n g9TabViewMetrics,\n tabBadge,\n tabContentSlideFrom,\n tabKey,\n tabVisualOrder,\n thicknessCss,\n} from './model';\n\n/** Props of {@link G9TabView}. */\nexport interface G9TabViewProps {\n /**\n * Element `id` of the tab view: it registers as an anchor (`@g9tm/lynxcontrols/anchor`) that lists and selects its tabs,\n * and each tab cell as `${id}_Tab_${key}` (a guide can point at a tab, an automation can press it).\n */\n readonly id?: string;\n /**\n * The navigation place of the selected tab (`@g9tm/lynxcontrols/route`): a segment for its key, or null when the tab is\n * not a place of its own (the first tab of a header strip is often the page itself). Declared as an inner place; the\n * router leaves it by selecting the first tab.\n */\n readonly routeSegment?: (key: string) => G9SegmentInput | null;\n /** The tab view is on screen (a kept-alive page passes its own `active`). Default true. */\n readonly routeActive?: boolean;\n /** The tabs (MAUI `Items`). Add, remove or reorder freely; give tabs a `key` so their bodies follow them. */\n readonly items: readonly G9TabItem[];\n /** Controlled selection (MAUI `SelectedIndex`, two-way). Out-of-range values show the nearest tab. */\n readonly selectedIndex?: number;\n /** Initial selection while uncontrolled. Default 0. */\n readonly defaultSelectedIndex?: number;\n /** A tab was chosen by a tap or a swipe (MAUI `SelectionChanged`). */\n readonly onSelectionChange?: (index: number) => void;\n /** Bar height (MAUI `TabHeight`). Default 52. */\n readonly tabHeight?: number;\n /** Bar background (MAUI `TabBarBackground`). Default transparent (underlined) / surface-container-low (pill). */\n readonly tabBarBackground?: string | null;\n /** Underline colour (underlined) or active text colour (pill) (MAUI `IndicatorColor`). Default primary. */\n readonly indicatorColor?: string | null;\n /** `'fixed'` (default): equal full-width cells. `'scrollable'`: auto-width cells that scroll. */\n readonly mode?: G9TabMode;\n /** `'top'` (default) or `'bottom'`. */\n readonly barPosition?: G9TabBarPosition;\n /** `'underlined'` (default) or `'pill'` (MAUI `Style`). */\n readonly tabStyle?: G9TabStyle;\n /** Only the bar: no content panel; drive your own host from `onSelectionChange` (MAUI `HeaderOnly`). */\n readonly headerOnly?: boolean;\n /** Border and rounded corners around the content (MAUI `ShowFrame`). Default false. */\n readonly showFrame?: boolean;\n /** Content border radius when `showFrame` (MAUI `FrameCornerRadius`). Default 0. */\n readonly frameCornerRadius?: number;\n /** Inset around the active body (MAUI `ContentPadding`): one value, `[h, v]` or `[l, t, r, b]`. Default 10,10,10,0. */\n readonly contentPadding?: number | readonly number[];\n /** Build every body up front instead of lazily on first activation (MAUI `EagerContent`). Default false. */\n readonly eagerContent?: boolean;\n /** Swipe between bodies (lynx-ui ViewPager). A Lynx addition; default false, as in MAUI. */\n readonly swipeEnabled?: boolean;\n readonly className?: string;\n}\n\n/**\n * Tabs with a bar and lazily realized bodies (MAUI `G9TabView`). Underlined (default) or pill style, fixed or\n * scrollable cells, bar on top or bottom, header-only; the indicator slides between cells; bodies are built on first\n * activation (spinner, then {@link g9TabViewMetrics} `lazyRealizeDelayMs`) and kept, hidden, so scroll and form state\n * survive; RTL reverses the cell order. With `swipeEnabled` the bodies sit in a lynx-ui ViewPager.\n */\nexport function G9TabView(props: G9TabViewProps): ReactNode {\n const items = props.items;\n const tabStyle = props.tabStyle ?? 'underlined';\n const mode = props.mode ?? 'fixed';\n const barPosition = props.barPosition ?? 'top';\n const tabHeight = props.tabHeight ?? g9TabViewMetrics.tabHeight;\n const rtl = useG9Direction() === 'rtl';\n const culture = useG9Culture();\n const [selected, setSelected] = useControllableState<number>({\n value: props.selectedIndex,\n defaultValue: props.defaultSelectedIndex ?? 0,\n onChange: props.onSelectionChange,\n name: 'G9TabView.selectedIndex',\n });\n const count = items.length;\n const effective = effectiveTabIndex(selected, count);\n const keys = items.map((item, i) => tabKey(item, i));\n const activeKey = effective >= 0 ? (keys[effective] as string) : null;\n\n const eager = props.eagerContent === true;\n const eagerRef = useRef(eager);\n eagerRef.current = eager;\n const realizer = useMemo(() => new G9TabRealizer(() => eagerRef.current), []);\n realizer.retain(keys);\n const [, setVersion] = useState(0);\n const [pending, setPending] = useState<string | null>(null);\n\n // Lazy-once realization of the active body; rapid switches realize only the latest.\n useEffect(() => {\n if (activeKey === null || props.headerOnly) {\n setPending(null);\n return;\n }\n const token = realizer.activate(activeKey);\n if (token === 'shown') {\n setPending(null);\n return;\n }\n setPending(activeKey);\n const t = startTimer(() => {\n if (realizer.realize(token)) {\n setPending(null);\n setVersion((v) => v + 1);\n }\n }, g9TabViewMetrics.lazyRealizeDelayMs);\n return () => stopTimer(t);\n }, [activeKey, props.headerOnly]);\n\n // Directional reveal of the newly active body (6 px slide + fade, 160 ms CubicOut).\n const previous = useRef(-1);\n const [reveal, setReveal] = useState<{ key: string | null; from: number; settled: boolean }>({\n key: activeKey,\n from: 0,\n settled: true,\n });\n useEffect(() => {\n const prev = previous.current;\n previous.current = effective;\n if (prev === effective || prev < 0) return;\n setReveal({ key: activeKey, from: tabContentSlideFrom(prev, effective, rtl), settled: false });\n const t = startTimer(() => setReveal((r) => ({ ...r, settled: true })), 16);\n return () => stopTimer(t);\n }, [effective]);\n\n const select = (index: number) => {\n if (index !== effective) setSelected(index);\n };\n const anchor = useG9Anchor(\n props.id,\n {\n kind: 'tab-view',\n capabilities: {\n itemKeys: () => keys,\n getValue: () => activeKey,\n selectItem: (key) => {\n const at = keys.indexOf(key);\n if (at >= 0) select(at);\n },\n },\n },\n props.id ? { domId: props.id } : {},\n );\n const routeSegment = activeKey !== null && props.routeSegment ? props.routeSegment(activeKey) : null;\n useG9Place(routeSegment ? { segment: routeSegment, layer: 'inner', close: () => select(0) } : null, {\n active: props.routeActive ?? true,\n });\n\n const pager = useRef<ViewPagerRef | null>(null);\n const swipe = props.swipeEnabled === true && !props.headerOnly;\n const order = tabVisualOrder(count, rtl);\n const visualIndex = order.indexOf(effective);\n useEffect(() => {\n if (!swipe || visualIndex < 0) return;\n try {\n pager.current?.scrollToPage(visualIndex, true);\n } catch {\n // The pager is gone (unmounted mid-switch).\n }\n }, [visualIndex, swipe]);\n\n const bar = (\n <TabBarStrip\n items={items}\n order={order}\n effective={effective}\n tabStyle={tabStyle}\n mode={mode}\n tabHeight={tabHeight}\n background={props.tabBarBackground ?? null}\n indicatorColor={props.indicatorColor ?? null}\n numbering={culture.numberingSystem}\n onSelect={select}\n anchorId={props.id ?? null}\n />\n );\n\n const bodyOf = (index: number): ReactNode => {\n const item = items[index] as G9TabItem;\n const key = keys[index] as string;\n const active = index === effective;\n if (!realizer.isRealized(key)) {\n return active && pending === key ? <Spinner /> : null;\n }\n const revealing = active && reveal.key === key && !reveal.settled;\n const style = {\n display: (active || swipe ? 'flex' : 'none') as 'flex' | 'none',\n transform: `translateX(${revealing ? reveal.from : 0}px)`,\n opacity: revealing ? 0 : 1,\n transition:\n revealing || swipe\n ? 'none'\n : `transform ${g9TabViewMetrics.contentTransitionMs}ms ease-out, opacity ${g9TabViewMetrics.contentTransitionMs}ms ease-out`,\n };\n const content = typeof item.content === 'function' ? (item.content as () => ReactNode)() : item.content;\n return (\n <view key={key} className={`g9-tabs__panel${active ? ' g9-tabs__panel--active' : ''}`} style={style}>\n {content}\n </view>\n );\n };\n\n const frame = props.showFrame\n ? {\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: 'var(--g9-outline-variant)',\n borderRadius: `${props.frameCornerRadius ?? 0}px`,\n }\n : {};\n const content = props.headerOnly ? null : (\n <view\n className=\"g9-tabs__content\"\n style={{ padding: thicknessCss(props.contentPadding ?? g9TabViewMetrics.contentPadding), ...frame }}\n >\n {swipe ? (\n <ViewPager\n ref={pager}\n className=\"g9-tabs__pager\"\n data={order}\n getItemKey={(index: number) => keys[index] as string}\n initialSelectIndex={Math.max(visualIndex, 0)}\n onPageChange={(event) => {\n const next = order[Number(event.detail.index)];\n if (next !== undefined) select(next);\n }}\n >\n {(index: number) => <view className=\"g9-tabs__page\">{bodyOf(index)}</view>}\n </ViewPager>\n ) : (\n <>\n {items.map((_, i) => bodyOf(i))}\n {pending !== null && pending === activeKey ? <Spinner /> : null}\n </>\n )}\n </view>\n );\n\n return (\n <view\n {...anchor.props}\n className={`g9-tabs g9-tabs--${tabStyle} g9-tabs--${barPosition}${props.headerOnly ? ' g9-tabs--header-only' : ''} ${props.className ?? ''}`}\n >\n {barPosition === 'bottom' ? content : null}\n {bar}\n {barPosition === 'top' ? content : null}\n </view>\n );\n}\n\nfunction Spinner(): ReactNode {\n return (\n <view className=\"g9-tabs__spinner\">\n <G9ActivityIndicator running size={24} />\n </view>\n );\n}\n\ninterface StripProps {\n readonly items: readonly G9TabItem[];\n readonly order: readonly number[];\n readonly effective: number;\n readonly tabStyle: G9TabStyle;\n readonly mode: G9TabMode;\n readonly tabHeight: number;\n readonly background: string | null;\n readonly indicatorColor: string | null;\n readonly numbering: Parameters<typeof tabBadge>[1];\n readonly onSelect: (index: number) => void;\n /** The tab view's anchor id: each cell registers as `${anchorId}_Tab_${key}`. */\n readonly anchorId: string | null;\n}\n\nfunction TabBarStrip(props: StripProps): ReactNode {\n const { items, order, effective, tabStyle, mode } = props;\n const count = order.length;\n const pill = tabStyle === 'pill';\n const direction = useG9Direction();\n const indicator = props.indicatorColor ?? 'var(--g9-primary)';\n const fixed = mode === 'fixed';\n const cellRefs = useRef<Array<G9NodeRef | null>>([]);\n const registry = useG9AnchorRegistry();\n const latest = useRef(props);\n latest.current = props;\n const cellKeys = items.map((item, i) => tabKey(item, i)).join('|');\n useEffect(() => {\n const base = props.anchorId;\n if (!registry || !base) return undefined;\n const offs = latest.current.items.map((item, index) =>\n registry.register(\n `${base}_Tab_${tabKey(item, index)}`,\n () => ({\n kind: 'tab',\n label: () => latest.current.items[index]?.text ?? null,\n capabilities: { activate: () => latest.current.onSelect(index) },\n }),\n { node: () => cellRefs.current[index] ?? null, scrollerId: null, layer: 'page' },\n ),\n );\n return () => {\n for (const off of offs) off();\n };\n }, [registry, props.anchorId, cellKeys]);\n useEffect(() => {\n if (fixed || effective < 0) return;\n invokeNodeWhenReady({ current: cellRefs.current[effective] ?? null }, 'scrollIntoView', {\n scrollIntoViewOptions: { behavior: 'smooth', block: 'center', inline: 'center' },\n });\n }, [effective, fixed]);\n\n const cells = order.map((index, position) => {\n const item = items[index] as G9TabItem;\n const active = index === effective;\n const badge = tabBadge(item, props.numbering);\n const textColor = active\n ? pill\n ? (props.indicatorColor ?? 'var(--g9-on-primary-container)')\n : 'var(--g9-on-surface)'\n : 'var(--g9-on-surface-variant)';\n return (\n <view\n key={tabKey(item, index)}\n ref={(node: G9NodeRef | null) => {\n cellRefs.current[index] = node;\n }}\n className={`g9-tabs__cell${active ? ' g9-tabs__cell--active' : ''}`}\n style={fixed ? { flex: '1' } : {}}\n accessibility-element\n accessibility-traits=\"button\"\n accessibility-label={item.text ?? ''}\n bindtap={() => props.onSelect(index)}\n >\n {/* Sibling order is paint order in Lynx: the active pill goes first, behind the label. */}\n {!fixed && active ? (\n <view\n className={pill ? 'g9-tabs__cell-pill' : 'g9-tabs__cell-underline'}\n style={pill ? {} : { backgroundColor: indicator }}\n />\n ) : null}\n {position > 0 && !pill ? <view className=\"g9-tabs__separator\" /> : null}\n <view className=\"g9-tabs__cell-row\" style={g9RowStyle(direction)}>\n <G9IconSlot\n emoji={item.emoji}\n icon={item.icon}\n imagePath={item.imagePath}\n image={item.image}\n size={18}\n color={textColor}\n />\n {item.text ? (\n <text className=\"g9-tabs__label\" style={{ color: textColor, fontWeight: active ? '600' : '400' }}>\n {item.text}\n </text>\n ) : null}\n {badge === 'dot' ? (\n <view className=\"g9-tabs__badge-dot\" style={{ backgroundColor: item.badgeColor ?? 'var(--g9-error)' }} />\n ) : badge !== null ? (\n // MAUI CreateBadge: `badgeColor ?? palette.Primary` (only the dot defaults to Error).\n <view className=\"g9-tabs__badge\" style={{ backgroundColor: item.badgeColor ?? 'var(--g9-primary)' }}>\n <text className=\"g9-tabs__badge-text\">{badge}</text>\n </view>\n ) : null}\n </view>\n </view>\n );\n });\n\n const position = order.indexOf(effective);\n const slider =\n fixed && position >= 0 ? (\n <view\n className={pill ? 'g9-tabs__pill' : 'g9-tabs__underline'}\n style={{\n left: `${(position * 100) / count}%`,\n width: `${100 / count}%`,\n transition: `left ${g9TabViewMetrics.indicatorMoveMs}ms cubic-bezier(0.215, 0.61, 0.355, 1)`,\n }}\n >\n <view\n className={pill ? 'g9-tabs__pill-fill' : 'g9-tabs__underline-fill'}\n style={pill ? {} : { backgroundColor: indicator }}\n />\n </view>\n ) : null;\n\n const barStyle = {\n height: `${props.tabHeight}px`,\n backgroundColor: props.background ?? (pill ? 'var(--g9-surface-container-low)' : 'transparent'),\n };\n return (\n <view className=\"g9-tabs__bar\" style={barStyle}>\n {fixed ? (\n <view className=\"g9-tabs__cells\">\n {slider}\n {cells}\n </view>\n ) : (\n <scroll-view className=\"g9-tabs__scroller\" scroll-orientation=\"horizontal\">\n <view className=\"g9-tabs__cells g9-tabs__cells--scrollable\">{cells}</view>\n </scroll-view>\n )}\n </view>\n );\n}\n"],"names":["G9TabView","props","_props_tabStyle","_props_mode","_props_barPosition","_props_tabHeight","_props_defaultSelectedIndex","_props_routeActive","_props_tabBarBackground","_props_indicatorColor","_props_id","_props_frameCornerRadius","_props_contentPadding","_props_className","items","tabStyle","mode","barPosition","tabHeight","g9TabViewMetrics","rtl","useG9Direction","culture","useG9Culture","selected","setSelected","useControllableState","count","effective","effectiveTabIndex","keys","item","i","tabKey","activeKey","eager","eagerRef","useRef","realizer","useMemo","G9TabRealizer","setVersion","useState","pending","setPending","useEffect","token","t","startTimer","v","stopTimer","previous","reveal","setReveal","prev","tabContentSlideFrom","r","select","index","anchor","useG9Anchor","key","at","routeSegment","useG9Place","pager","swipe","order","tabVisualOrder","visualIndex","_pager_current","bar","TabBarStrip","bodyOf","active","Spinner","revealing","style","content","view","frame","thicknessCss","ViewPager","Math","event","next","Number","undefined","_","G9ActivityIndicator","_props_background","pill","direction","indicator","fixed","cellRefs","registry","useG9AnchorRegistry","latest","cellKeys","base","offs","_latest_current_items_index","_cellRefs_current_index","off","_cellRefs_current_effective","invokeNodeWhenReady","cells","position","_item_text","_item_badgeColor","_item_badgeColor1","badge","tabBadge","textColor","node","g9RowStyle","G9IconSlot","text","slider","barStyle","scroll-view"],"mappings":";;;;;;;;;;;;;AAoFO,SAASA,UAAUC,KAAqB;QAE5BC,iBACJC,aACOC,oBACFC,kBAKFC,6BA0ENC,oBAwBMC,yBACIC,uBAGNC,WAkCSC,0BAMYC,uBA4BsFC;IAnLzH,MAAMC,QAAQb,MAAM,KAAK;IACzB,MAAMc,WAAW,QAAAb,CAAAA,kBAAAA,MAAM,QAAQ,AAAD,IAAbA,kBAAkB;IACnC,MAAMc,OAAO,QAAAb,CAAAA,cAAAA,MAAM,IAAI,AAAD,IAATA,cAAc;IAC3B,MAAMc,cAAc,QAAAb,CAAAA,qBAAAA,MAAM,WAAW,AAAD,IAAhBA,qBAAqB;IACzC,MAAMc,YAAY,QAAAb,CAAAA,mBAAAA,MAAM,SAAS,AAAD,IAAdA,mBAAmBc,iBAAiB,SAAS;IAC/D,MAAMC,MAAMC,AAAqB,UAArBA;IACZ,MAAMC,UAAUC;IAChB,MAAM,CAACC,UAAUC,YAAY,GAAG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,2BACzC,OAAOA,OAAO,CAAC,IAAI;QAAE,iBAAiBE;IAAU,IAChD;MACJ,EAAEd,QACA;IAEN,MAAMyC,WAAW;QACf,QAAQ,GAAGvH,MAAM,SAAS,CAAC,EAAE,CAAC;QAC9B,iBAAiB,QAAAyF,CAAAA,oBAAAA,MAAM,UAAU,AAAD,IAAfA,oBAAqBC,OAAO,oCAAoC;IACnF;IACA,QACGZ,KAAK,UAAU,eAAe,OAAOyC,UAAU;MAC9C,CAAC1B,SACEf,KAAK,UAAU,iBAAiB;UAC/B,CAACwC,OAAO;UACR,CAACZ,MAAM;QACT,EAAE5B,SAED0C,YAAY,UAAU,oBAAoB,mBAAmB,aAAa;UACzE,CAAC1C,KAAK,UAAU,6CAA6C4B,QAAQ5B,KAAK;QAC5E,EAAE0C,aACF;IACJ,EAAE1C;AAEN"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"toast/service.jsx","sources":["../../src/toast/service.tsx"],"sourcesContent":["import './toast.css';\nimport { formatColor, type G9ColorToken, g9Ms, toNativeDigits, withAlpha } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useEffect, useState, useSyncExternalStore } from '@lynx-js/react';\nimport { g9RowStyle } from '../base/control';\nimport { useG9Press } from '../base/press';\nimport { startTimer, stopTimer } from '../base/timers';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { useG9Host, useG9HostInsets } from '../host/hooks';\nimport { type G9HostHandle, g9Hosts } from '../host/registry';\nimport { G9IconSlot } from '../icon/slot';\nimport { useG9Culture, useG9Direction, useG9Executor, useG9Settings, useG9Theme } from '../provider/hooks';\nimport {\n type G9LoadingLease,\n type G9ToastEntry,\n type G9ToastHandle,\n type G9ToastOptions,\n type G9ToastPosition,\n G9ToastStore,\n type G9ToastType,\n g9ToastTimings,\n} from './store';\n\n/** Margin between a toast stack and the screen edge (MAUI 16 dp) and between toasts (8 dp). */\nexport const g9ToastMetrics = Object.freeze({ edgeMargin: 16, gap: 8, loaderScrimOpacity: 0.55 });\n\n/** The toasts of a host (MAUI `G9ToastHelper`). */\nexport interface G9ToastService {\n /** A typed, auto-dismissing toast (MAUI `ShowToastAsync`). */\n showToast(message: string, type?: G9ToastType, options?: G9ToastOptions): G9ToastHandle;\n /** Dismisses one toast or every typed toast (MAUI `DismissToastAsync`). */\n dismissToast(id?: number): void;\n /** Full-screen blocking loader, reference-counted (MAUI `ShowLoadingAsync`). */\n showLoading(text?: string): void;\n /** Lease form of `showLoading` (MAUI `BeginLoadingAsync`). */\n beginLoading(text?: string): G9LoadingLease;\n /** Releases one anonymous hold (MAUI `DismissLoadingAsync`). */\n dismissLoading(): void;\n /** Compact non-blocking loading toast (MAUI `ShowLoadingToastAsync`). */\n showLoadingToast(text?: string, position?: G9ToastPosition | null): void;\n dismissLoadingToast(): void;\n /** Progress toast (MAUI `ShowProgressToastAsync`). */\n showProgressToast(title: string, detail?: string | null, progress?: number, position?: G9ToastPosition | null): void;\n updateProgressToast(title?: string | null, detail?: string | null, progress?: number | null): void;\n dismissProgressToast(): void;\n /**\n * Re-anchors live toasts after the bottom clearance changed (MAUI `RefreshBottomInsetsAsync`, ADR-0027: an explicit\n * call, not a subscription). `animate` glides 220 ms; false snaps.\n */\n refreshBottomInsets(animate?: boolean): void;\n /** The space a bottom bar (tab bar) takes above the safe area; call `refreshBottomInsets` after changing it. */\n setBottomClearance(px: number): void;\n /** A bottom-anchored overlay (MAUI `IG9BottomAnchoredOverlay`): bottom stacks sit above its height. */\n setBottomOverlay(key: string, heightPx: number | null): void;\n /** Clears every toast, loader and progress (MAUI `DismissAllAsync`). */\n dismissAll(): void;\n readonly store: G9ToastStore;\n}\n\nconst FEATURE = 'g9.toasts';\n\ninterface State {\n service: G9ToastService;\n clearance: number;\n committedClearance: number;\n rtl: boolean;\n /** Set by the layer (the provider's safe executor); a toast cannot show before the layer renders. */\n run?: (action: () => unknown) => void;\n}\n\n/** MAUI G9ToastHelper.ResolveTypeVisuals: the card is filled with the type's colour, its text and glyph in the On colour. */\nconst ACCENT: Record<G9ToastType, readonly [G9ColorToken, G9ColorToken]> = {\n information: ['Info', 'OnInfo'],\n success: ['Success', 'OnSuccess'],\n warning: ['Warning', 'OnWarning'],\n error: ['Error', 'OnError'],\n};\n\ntype Palette = ReturnType<typeof useG9Theme>['palette'];\n\nconst paletteColor = (palette: Palette, token: G9ColorToken, alpha = 1): string =>\n formatColor(withAlpha(palette[token], alpha));\n\n/**\n * MAUI's countdown: a layer in the On colour at 14 % grows from the reading start over the toast's lifetime (a refresh\n * restarts it). Mounted at scale 0, then the transition to 1 starts on the next frame.\n */\nfunction ToastCountdown(props: {\n readonly durationMs: number;\n readonly color: string;\n readonly rtl: boolean;\n}): ReactNode {\n const [run, setRun] = useState(false);\n useEffect(() => {\n const t = setTimeout(() => setRun(true), 16);\n return () => clearTimeout(t);\n }, []);\n return (\n <view\n className=\"g9-toast__countdown\"\n style={{\n backgroundColor: props.color,\n transformOrigin: props.rtl ? 'right center' : 'left center',\n transform: `scaleX(${run ? 1 : 0})`,\n transition: run ? `transform ${props.durationMs}ms linear` : 'none',\n }}\n />\n );\n}\n\nfunction ToastCard(props: {\n readonly entry: G9ToastEntry;\n readonly store: G9ToastStore;\n readonly bottom: boolean;\n}): ReactNode {\n const { entry, store } = props;\n const glyphs = useG9Settings().glyphs;\n const action = useG9Press(() => store.pressAction(entry.id), { source: 'G9Toast', guardMs: 0 });\n const palette = useG9Theme().palette;\n const [fillToken, onToken] = ACCENT[entry.type];\n const fill = paletteColor(palette, fillToken);\n const on = paletteColor(palette, onToken);\n const icon =\n entry.icon ??\n (entry.type === 'success'\n ? glyphs.success\n : entry.type === 'warning'\n ? glyphs.warning\n : entry.type === 'error'\n ? glyphs.error\n : glyphs.info);\n const offset = props.bottom ? '12px' : '-12px';\n const direction = useG9Direction();\n return (\n <view\n className={`g9-toast g9-toast--${entry.type} g9-toast--${entry.status}`}\n accessibility-element={true}\n accessibility-label={entry.message}\n style={{\n ...g9RowStyle(direction),\n backgroundColor: fill,\n borderColor: paletteColor(palette, onToken, 0.35),\n opacity: entry.status === 'shown' || entry.status === 'entering' ? 1 : 0,\n transform: `translateY(${entry.status === 'leaving' ? offset : '0px'})`,\n transition: `opacity ${g9Ms(entry.status === 'leaving' ? g9ToastTimings.exitMs : g9ToastTimings.enterMs)}ms, transform ${g9Ms(g9ToastTimings.enterMs)}ms`,\n }}\n >\n {entry.durationMs > 0 ? (\n <ToastCountdown\n key={entry.refreshes}\n durationMs={entry.durationMs}\n color={paletteColor(palette, onToken, 0.14)}\n rtl={direction === 'rtl'}\n />\n ) : null}\n <G9IconSlot icon={icon} size={20} color={on} />\n <text className=\"g9-toast__message\" style={{ color: on }}>\n {entry.message}\n </text>\n {entry.actionText ? (\n <view\n className=\"g9-toast__action\"\n accessibility-element={true}\n accessibility-traits=\"button\"\n bindtap={action}\n style={{ backgroundColor: paletteColor(palette, onToken, 0.16) }}\n >\n <text className=\"g9-toast__action-text\" style={{ color: on }}>\n {entry.actionText}\n </text>\n </view>\n ) : null}\n </view>\n );\n}\n\nfunction anchorStyle(position: G9ToastPosition, top: number, bottom: number): Record<string, string> {\n const m = `${g9ToastMetrics.edgeMargin}px`;\n const style: Record<string, string> = {};\n if (position.startsWith('top')) style.top = `${top}px`;\n else if (position.startsWith('bottom')) style.bottom = `${bottom}px`;\n else {\n style.top = '0px';\n style.bottom = '0px';\n }\n // MAUI: every inline toast fills the width between the margins, whatever the horizontal part of its position.\n style.left = m;\n style.right = m;\n return style;\n}\n\n/** The feedback layer: stacks per position, the compact loading toast, the progress toast, the full-screen loader. */\nfunction ToastLayer(props: { readonly state: State; readonly host: G9HostHandle }): ReactNode {\n const { state, host } = props;\n // MAUI ResolveBottomInset: the tab-bar clearance applies only while no sheet is open — a sheet covers the bar, so a\n // toast then falls back to the plain safe-area gap instead of floating over the sheet's middle. Read when the\n // toasts render (a toast shows), like MAUI's GetOpenSheetCount at show time; a closing sheet no longer counts.\n const sheets = host.getFeature('g9.sheets') as { readonly service?: { getOpenCount(): number } } | undefined;\n const sheetOpen = (sheets?.service?.getOpenCount() ?? 0) > 0;\n const store = state.service.store;\n const snap = useSyncExternalStore(\n (l) => store.subscribe(l),\n () => store.getSnapshot(),\n );\n const insets = useG9HostInsets();\n const culture = useG9Culture();\n const rtl = useG9Direction() === 'rtl';\n state.rtl = rtl;\n const executor = useG9Executor();\n state.run = (action) =>\n void executor.run(() => action(), { source: 'G9Toast', enableThrottle: false, preventConcurrentExecution: false });\n // The clearance is read when insets are refreshed (or a toast shows): a change alone does not move live toasts.\n const [clearance, setClearance] = useState(state.committedClearance);\n useEffect(() => {\n state.committedClearance = state.clearance;\n setClearance(state.clearance);\n }, [snap.insetVersion, snap.toasts.length]);\n useEffect(() => () => store.dispose(), [store]);\n const top = insets.top + g9ToastMetrics.edgeMargin;\n const bottom = insets.bottom + (sheetOpen ? 0 : clearance) + snap.bottomOverlayHeight + g9ToastMetrics.edgeMargin;\n const positions = new Set<G9ToastPosition>(snap.toasts.map((t) => t.position));\n if (snap.loadingToast) positions.add(snap.loadingToast.position);\n if (snap.progress) positions.add(snap.progress.position);\n const glide = snap.reanchorAnimated\n ? `top ${g9Ms(g9ToastTimings.reanchorMs)}ms cubic-bezier(0.215, 0.61, 0.355, 1), bottom ${g9Ms(g9ToastTimings.reanchorMs)}ms cubic-bezier(0.215, 0.61, 0.355, 1)`\n : 'none';\n const percent = (p: number) => toNativeDigits(`${Math.round(p * 100)}%`, culture.numberingSystem);\n return (\n <view className={`g9-toast-layer g9-dir-${rtl ? 'rtl' : 'ltr'}`} event-through={true}>\n {[...positions].map((position) => {\n const bottomStack = position.startsWith('bottom');\n return (\n <view\n key={position}\n className={`g9-toast-stack g9-toast-stack--${position}${bottomStack ? ' g9-toast-stack--bottom' : ''}`}\n event-through={true}\n style={{ ...anchorStyle(position, top, bottom), transition: glide }}\n >\n {snap.toasts\n .filter((t) => t.position === position)\n .map((t) => (\n <ToastCard key={t.id} entry={t} store={store} bottom={bottomStack} />\n ))}\n {snap.loadingToast && snap.loadingToast.position === position ? (\n <view className=\"g9-toast g9-toast--loading\" accessibility-label={snap.loadingToast.text}>\n <G9ActivityIndicator running size={18} />\n <text className=\"g9-toast__message\">{snap.loadingToast.text}</text>\n </view>\n ) : null}\n {snap.progress && snap.progress.position === position ? (\n <view className=\"g9-toast g9-toast--progress\" accessibility-value={percent(snap.progress.progress)}>\n <view\n className=\"g9-toast__fill\"\n style={{\n transform: `scaleX(${snap.progress.progress})`,\n transformOrigin: rtl ? 'right center' : 'left center',\n }}\n />\n <view className=\"g9-toast__progress-text\">\n <text className=\"g9-toast__message\">{snap.progress.title}</text>\n {snap.progress.detail ? <text className=\"g9-toast__detail\">{snap.progress.detail}</text> : null}\n </view>\n <view className=\"g9-toast__pill\">\n <text className=\"g9-toast__pill-text\">{percent(snap.progress.progress)}</text>\n </view>\n </view>\n ) : null}\n </view>\n );\n })}\n {snap.loader ? (\n <view\n className={`g9-loader g9-loader--${snap.loader.status}`}\n style={{\n opacity: snap.loader.status === 'leaving' ? 0 : 1,\n transition: `opacity ${snap.loader.status === 'leaving' ? g9ToastTimings.loaderFadeOutMs : g9ToastTimings.loaderFadeInMs}ms`,\n }}\n event-through={false}\n bindtap={() => {}}\n >\n <view className=\"g9-loader__scrim\" style={{ opacity: g9ToastMetrics.loaderScrimOpacity }} />\n <view className=\"g9-loader__card\">\n <G9ActivityIndicator running size={36} color=\"var(--g9-inverse-on-surface)\" />\n {snap.loader.text ? <text className=\"g9-loader__text\">{snap.loader.text}</text> : null}\n </view>\n </view>\n ) : null}\n </view>\n );\n}\n\nfunction createToastService(host: G9HostHandle): State {\n const state = { clearance: 0, committedClearance: 0, rtl: false } as State;\n const store = new G9ToastStore({\n setTimer: (cb, ms) => startTimer(cb, ms),\n clearTimer: (h) => stopTimer(h as never),\n runAction: (action) => state.run?.(action),\n defaultPosition: () => (state.rtl ? 'bottomLeft' : 'bottomRight'),\n });\n state.service = {\n store,\n showToast: (message, type, options) => store.show(message, type, options),\n dismissToast: (id) => store.dismissToast(id),\n showLoading: (text) => store.showLoading(text),\n beginLoading: (text) => store.beginLoading(text),\n dismissLoading: () => store.dismissLoading(),\n showLoadingToast: (text, position) => store.showLoadingToast(text, position ?? null),\n dismissLoadingToast: () => store.dismissLoadingToast(),\n showProgressToast: (title, detail, progress, position) =>\n store.showProgress(title, detail ?? null, progress ?? 0, position ?? null),\n updateProgressToast: (title, detail, progress) => store.updateProgress(title, detail, progress),\n dismissProgressToast: () => store.dismissProgress(),\n refreshBottomInsets: (animate = true) => store.refreshBottomInsets(animate),\n setBottomClearance: (px) => {\n state.clearance = Math.max(0, px);\n },\n setBottomOverlay: (key, height) => store.setBottomOverlay(key, height),\n dismissAll: () => store.dismissAll(),\n };\n host.attachFeature(FEATURE, state);\n host.registerLayerItem('feedback', { key: FEATURE, element: <ToastLayer state={state} host={host} />, order: 0 });\n return state;\n}\n\n/** The toast service of a host (created once as a host feature). */\nexport function toastServiceOf(host: G9HostHandle): G9ToastService {\n const existing = host.getFeature(FEATURE) as State | undefined;\n return (existing ?? createToastService(host)).service;\n}\n\n/** The toasts of the nearest `G9Host` (MAUI `G9ToastHelper`), in its `feedback` layer above popups and sheets. */\nexport function useG9Toasts(): G9ToastService {\n return toastServiceOf(useG9Host());\n}\n\n/** The toasts of the active host, for code outside components. Throws `host-missing` without a host. */\nexport function g9Toasts(): G9ToastService {\n return toastServiceOf(g9Hosts.require());\n}\n"],"names":["g9ToastMetrics","Object","FEATURE","ACCENT","paletteColor","palette","token","alpha","formatColor","withAlpha","ToastCountdown","props","run","setRun","useState","useEffect","t","setTimeout","clearTimeout","view","ToastCard","_entry_icon","entry","store","glyphs","useG9Settings","action","useG9Press","useG9Theme","fillToken","onToken","fill","on","icon","offset","direction","useG9Direction","g9RowStyle","g9Ms","g9ToastTimings","G9IconSlot","text","anchorStyle","position","top","bottom","m","style","ToastLayer","_sheets_service","state","host","sheets","sheetOpen","snap","useSyncExternalStore","l","insets","useG9HostInsets","culture","useG9Culture","rtl","executor","useG9Executor","clearance","setClearance","positions","Set","glide","percent","p","toNativeDigits","Math","bottomStack","G9ActivityIndicator","createToastService","G9ToastStore","cb","ms","startTimer","h","stopTimer","message","type","options","id","text1","title","detail","progress","animate","px","key","height","toastServiceOf","existing","useG9Toasts","useG9Host","g9Toasts","g9Hosts"],"mappings":";;;;;;;;;;;;AAuBO,MAAMA,iBAAiBC,OAAO,MAAM,CAAC;IAAE,YAAY;IAAI,KAAK;IAAG,oBAAoB;AAAK;AAmC/F,MAAMC,UAAU;AAYhB,MAAMC,SAAqE;IACzE,aAAa;QAAC;QAAQ;KAAS;IAC/B,SAAS;QAAC;QAAW;KAAY;IACjC,SAAS;QAAC;QAAW;KAAY;IACjC,OAAO;QAAC;QAAS;KAAU;AAC7B;AAIA,MAAMC,eAAe,CAACC,SAAkBC,OAAqBC,QAAQ,CAAC,GACpEC,YAAYC,UAAUJ,OAAO,CAACC,MAAM,EAAEC;AAMxC,SAASG,eAAeC,KAIvB;IACC,MAAM,CAACC,KAAKC,OAAO,GAAGC,SAAS;IAC/BC,UAAU;QACR,MAAMC,IAAIC,WAAW,IAAMJ,OAAO,OAAO;QACzC,OAAO,IAAMK,aAAaF;IAC5B,GAAG,EAAE;IACL,QACGG,KACC,UAAU,sBACV,OAAO;QACL,iBAAiBR,MAAM,KAAK;QAC5B,iBAAiBA,MAAM,GAAG,GAAG,iBAAiB;QAC9C,WAAW,CAAC,OAAO,EAAEC,MAAM,IAAI,EAAE,CAAC,CAAC;QACnC,YAAYA,MAAM,CAAC,UAAU,EAAED,MAAM,UAAU,CAAC,SAAS,CAAC,GAAG;IAC/D;AAGN;AAEA,SAASS,UAAUT,KAIlB;QASGU;IARF,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGZ;IACzB,MAAMa,SAASC,gBAAgB,MAAM;IACrC,MAAMC,SAASC,WAAW,IAAMJ,MAAM,WAAW,CAACD,MAAM,EAAE,GAAG;QAAE,QAAQ;QAAW,SAAS;IAAE;IAC7F,MAAMjB,UAAU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