@g9tm/lynxcontrols 0.0.0-stage → 1.4.2

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 (561) hide show
  1. package/README.md +29 -2
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/base/base.css +16 -0
  4. package/dist/base/base.css.map +1 -0
  5. package/dist/base/control.d.ts +68 -0
  6. package/dist/base/control.d.ts.map +1 -0
  7. package/dist/base/control.jsx +36 -0
  8. package/dist/base/control.jsx.map +1 -0
  9. package/dist/base/corner-badge.d.ts +35 -0
  10. package/dist/base/corner-badge.d.ts.map +1 -0
  11. package/dist/base/corner-badge.jsx +45 -0
  12. package/dist/base/corner-badge.jsx.map +1 -0
  13. package/dist/base/disposer.d.ts +28 -0
  14. package/dist/base/disposer.d.ts.map +1 -0
  15. package/dist/base/disposer.jsx +61 -0
  16. package/dist/base/disposer.jsx.map +1 -0
  17. package/dist/base/index.d.ts +10 -0
  18. package/dist/base/index.d.ts.map +1 -0
  19. package/dist/base/index.jsx +9 -0
  20. package/dist/base/press.d.ts +38 -0
  21. package/dist/base/press.d.ts.map +1 -0
  22. package/dist/base/press.jsx +73 -0
  23. package/dist/base/press.jsx.map +1 -0
  24. package/dist/base/pressable.d.ts +25 -0
  25. package/dist/base/pressable.d.ts.map +1 -0
  26. package/dist/base/pressable.jsx +38 -0
  27. package/dist/base/pressable.jsx.map +1 -0
  28. package/dist/base/selection-item.d.ts +29 -0
  29. package/dist/base/selection-item.d.ts.map +1 -0
  30. package/dist/base/selection-item.jsx +6 -0
  31. package/dist/base/selection-item.jsx.map +1 -0
  32. package/dist/base/timers.d.ts +7 -0
  33. package/dist/base/timers.d.ts.map +1 -0
  34. package/dist/base/timers.jsx +10 -0
  35. package/dist/base/timers.jsx.map +1 -0
  36. package/dist/base/use-controllable-state.d.ts +30 -0
  37. package/dist/base/use-controllable-state.d.ts.map +1 -0
  38. package/dist/base/use-controllable-state.jsx +49 -0
  39. package/dist/base/use-controllable-state.jsx.map +1 -0
  40. package/dist/base/use-stable-callback.d.ts +8 -0
  41. package/dist/base/use-stable-callback.d.ts.map +1 -0
  42. package/dist/base/use-stable-callback.jsx +12 -0
  43. package/dist/base/use-stable-callback.jsx.map +1 -0
  44. package/dist/button/button.css +162 -0
  45. package/dist/button/button.css.map +1 -0
  46. package/dist/button/button.d.ts +52 -0
  47. package/dist/button/button.d.ts.map +1 -0
  48. package/dist/button/button.jsx +88 -0
  49. package/dist/button/button.jsx.map +1 -0
  50. package/dist/button/header-action-button.d.ts +34 -0
  51. package/dist/button/header-action-button.d.ts.map +1 -0
  52. package/dist/button/header-action-button.jsx +51 -0
  53. package/dist/button/header-action-button.jsx.map +1 -0
  54. package/dist/button/icon-button.d.ts +46 -0
  55. package/dist/button/icon-button.d.ts.map +1 -0
  56. package/dist/button/icon-button.jsx +69 -0
  57. package/dist/button/icon-button.jsx.map +1 -0
  58. package/dist/button/index.d.ts +9 -0
  59. package/dist/button/index.d.ts.map +1 -0
  60. package/dist/button/index.jsx +8 -0
  61. package/dist/button/nav-card.d.ts +58 -0
  62. package/dist/button/nav-card.d.ts.map +1 -0
  63. package/dist/button/nav-card.jsx +96 -0
  64. package/dist/button/nav-card.jsx.map +1 -0
  65. package/dist/button/safe-tap.d.ts +27 -0
  66. package/dist/button/safe-tap.d.ts.map +1 -0
  67. package/dist/button/safe-tap.jsx +46 -0
  68. package/dist/button/safe-tap.jsx.map +1 -0
  69. package/dist/button/safe.d.ts +84 -0
  70. package/dist/button/safe.d.ts.map +1 -0
  71. package/dist/button/safe.jsx +116 -0
  72. package/dist/button/safe.jsx.map +1 -0
  73. package/dist/button/vertical-icon-text-button.d.ts +18 -0
  74. package/dist/button/vertical-icon-text-button.d.ts.map +1 -0
  75. package/dist/button/vertical-icon-text-button.jsx +21 -0
  76. package/dist/button/vertical-icon-text-button.jsx.map +1 -0
  77. package/dist/button/visuals.d.ts +53 -0
  78. package/dist/button/visuals.d.ts.map +1 -0
  79. package/dist/button/visuals.jsx +92 -0
  80. package/dist/button/visuals.jsx.map +1 -0
  81. package/dist/cascade/cascade-panel.d.ts +80 -0
  82. package/dist/cascade/cascade-panel.d.ts.map +1 -0
  83. package/dist/cascade/cascade-panel.jsx +179 -0
  84. package/dist/cascade/cascade-panel.jsx.map +1 -0
  85. package/dist/cascade/cascade.css +70 -0
  86. package/dist/cascade/cascade.css.map +1 -0
  87. package/dist/cascade/index.d.ts +3 -0
  88. package/dist/cascade/index.d.ts.map +1 -0
  89. package/dist/cascade/index.jsx +2 -0
  90. package/dist/cascade/model.d.ts +68 -0
  91. package/dist/cascade/model.d.ts.map +1 -0
  92. package/dist/cascade/model.jsx +161 -0
  93. package/dist/cascade/model.jsx.map +1 -0
  94. package/dist/deferred/deferred-content.d.ts +82 -0
  95. package/dist/deferred/deferred-content.d.ts.map +1 -0
  96. package/dist/deferred/deferred-content.jsx +263 -0
  97. package/dist/deferred/deferred-content.jsx.map +1 -0
  98. package/dist/deferred/deferred.css +62 -0
  99. package/dist/deferred/deferred.css.map +1 -0
  100. package/dist/deferred/index.d.ts +3 -0
  101. package/dist/deferred/index.d.ts.map +1 -0
  102. package/dist/deferred/index.jsx +2 -0
  103. package/dist/deferred/readiness-signal.d.ts +16 -0
  104. package/dist/deferred/readiness-signal.d.ts.map +1 -0
  105. package/dist/deferred/readiness-signal.jsx +29 -0
  106. package/dist/deferred/readiness-signal.jsx.map +1 -0
  107. package/dist/display/activity-indicator.d.ts +21 -0
  108. package/dist/display/activity-indicator.d.ts.map +1 -0
  109. package/dist/display/activity-indicator.jsx +22 -0
  110. package/dist/display/activity-indicator.jsx.map +1 -0
  111. package/dist/display/culture-date-time-label.d.ts +64 -0
  112. package/dist/display/culture-date-time-label.d.ts.map +1 -0
  113. package/dist/display/culture-date-time-label.jsx +73 -0
  114. package/dist/display/culture-date-time-label.jsx.map +1 -0
  115. package/dist/display/display.css +217 -0
  116. package/dist/display/display.css.map +1 -0
  117. package/dist/display/index.d.ts +7 -0
  118. package/dist/display/index.d.ts.map +1 -0
  119. package/dist/display/index.jsx +6 -0
  120. package/dist/display/progress-bar.d.ts +38 -0
  121. package/dist/display/progress-bar.d.ts.map +1 -0
  122. package/dist/display/progress-bar.jsx +57 -0
  123. package/dist/display/progress-bar.jsx.map +1 -0
  124. package/dist/display/separator.d.ts +30 -0
  125. package/dist/display/separator.d.ts.map +1 -0
  126. package/dist/display/separator.jsx +55 -0
  127. package/dist/display/separator.jsx.map +1 -0
  128. package/dist/display/shimmer.d.ts +41 -0
  129. package/dist/display/shimmer.d.ts.map +1 -0
  130. package/dist/display/shimmer.jsx +41 -0
  131. package/dist/display/shimmer.jsx.map +1 -0
  132. package/dist/display/title-with-line.d.ts +13 -0
  133. package/dist/display/title-with-line.d.ts.map +1 -0
  134. package/dist/display/title-with-line.jsx +21 -0
  135. package/dist/display/title-with-line.jsx.map +1 -0
  136. package/dist/edge-panel/edge-panel.css +132 -0
  137. package/dist/edge-panel/edge-panel.css.map +1 -0
  138. package/dist/edge-panel/edge-panel.d.ts +87 -0
  139. package/dist/edge-panel/edge-panel.d.ts.map +1 -0
  140. package/dist/edge-panel/edge-panel.jsx +326 -0
  141. package/dist/edge-panel/edge-panel.jsx.map +1 -0
  142. package/dist/edge-panel/helper.d.ts +27 -0
  143. package/dist/edge-panel/helper.d.ts.map +1 -0
  144. package/dist/edge-panel/helper.jsx +118 -0
  145. package/dist/edge-panel/helper.jsx.map +1 -0
  146. package/dist/edge-panel/index.d.ts +4 -0
  147. package/dist/edge-panel/index.d.ts.map +1 -0
  148. package/dist/edge-panel/index.jsx +3 -0
  149. package/dist/edge-panel/types.d.ts +155 -0
  150. package/dist/edge-panel/types.d.ts.map +1 -0
  151. package/dist/edge-panel/types.jsx +139 -0
  152. package/dist/edge-panel/types.jsx.map +1 -0
  153. package/dist/expander/expander.css +54 -0
  154. package/dist/expander/expander.css.map +1 -0
  155. package/dist/expander/expander.d.ts +46 -0
  156. package/dist/expander/expander.d.ts.map +1 -0
  157. package/dist/expander/expander.jsx +112 -0
  158. package/dist/expander/expander.jsx.map +1 -0
  159. package/dist/expander/index.d.ts +2 -0
  160. package/dist/expander/index.d.ts.map +1 -0
  161. package/dist/expander/index.jsx +1 -0
  162. package/dist/fields/dictation.d.ts +43 -0
  163. package/dist/fields/dictation.d.ts.map +1 -0
  164. package/dist/fields/dictation.jsx +124 -0
  165. package/dist/fields/dictation.jsx.map +1 -0
  166. package/dist/fields/editor.d.ts +26 -0
  167. package/dist/fields/editor.d.ts.map +1 -0
  168. package/dist/fields/editor.jsx +46 -0
  169. package/dist/fields/editor.jsx.map +1 -0
  170. package/dist/fields/fields.css +164 -0
  171. package/dist/fields/fields.css.map +1 -0
  172. package/dist/fields/index.d.ts +13 -0
  173. package/dist/fields/index.d.ts.map +1 -0
  174. package/dist/fields/index.jsx +12 -0
  175. package/dist/fields/input-policy.d.ts +48 -0
  176. package/dist/fields/input-policy.d.ts.map +1 -0
  177. package/dist/fields/input-policy.jsx +215 -0
  178. package/dist/fields/input-policy.jsx.map +1 -0
  179. package/dist/fields/notch.d.ts +10 -0
  180. package/dist/fields/notch.d.ts.map +1 -0
  181. package/dist/fields/notch.jsx +9 -0
  182. package/dist/fields/notch.jsx.map +1 -0
  183. package/dist/fields/outlined-field.d.ts +152 -0
  184. package/dist/fields/outlined-field.d.ts.map +1 -0
  185. package/dist/fields/outlined-field.jsx +199 -0
  186. package/dist/fields/outlined-field.jsx.map +1 -0
  187. package/dist/fields/pin-entry.d.ts +65 -0
  188. package/dist/fields/pin-entry.d.ts.map +1 -0
  189. package/dist/fields/pin-entry.jsx +294 -0
  190. package/dist/fields/pin-entry.jsx.map +1 -0
  191. package/dist/fields/search-entry.d.ts +35 -0
  192. package/dist/fields/search-entry.d.ts.map +1 -0
  193. package/dist/fields/search-entry.jsx +118 -0
  194. package/dist/fields/search-entry.jsx.map +1 -0
  195. package/dist/fields/slot-layout.d.ts +33 -0
  196. package/dist/fields/slot-layout.d.ts.map +1 -0
  197. package/dist/fields/slot-layout.jsx +33 -0
  198. package/dist/fields/slot-layout.jsx.map +1 -0
  199. package/dist/fields/text-entry.d.ts +62 -0
  200. package/dist/fields/text-entry.d.ts.map +1 -0
  201. package/dist/fields/text-entry.jsx +82 -0
  202. package/dist/fields/text-entry.jsx.map +1 -0
  203. package/dist/fields/use-dictation.d.ts +34 -0
  204. package/dist/fields/use-dictation.d.ts.map +1 -0
  205. package/dist/fields/use-dictation.jsx +80 -0
  206. package/dist/fields/use-dictation.jsx.map +1 -0
  207. package/dist/fields/use-text-input.d.ts +150 -0
  208. package/dist/fields/use-text-input.d.ts.map +1 -0
  209. package/dist/fields/use-text-input.jsx +247 -0
  210. package/dist/fields/use-text-input.jsx.map +1 -0
  211. package/dist/fields/validator.d.ts +14 -0
  212. package/dist/fields/validator.d.ts.map +1 -0
  213. package/dist/fields/validator.jsx +20 -0
  214. package/dist/fields/validator.jsx.map +1 -0
  215. package/dist/host/back.d.ts +42 -0
  216. package/dist/host/back.d.ts.map +1 -0
  217. package/dist/host/back.jsx +47 -0
  218. package/dist/host/back.jsx.map +1 -0
  219. package/dist/host/hooks.d.ts +90 -0
  220. package/dist/host/hooks.d.ts.map +1 -0
  221. package/dist/host/hooks.jsx +166 -0
  222. package/dist/host/hooks.jsx.map +1 -0
  223. package/dist/host/host.css +81 -0
  224. package/dist/host/host.css.map +1 -0
  225. package/dist/host/host.d.ts +70 -0
  226. package/dist/host/host.d.ts.map +1 -0
  227. package/dist/host/host.jsx +229 -0
  228. package/dist/host/host.jsx.map +1 -0
  229. package/dist/host/index.d.ts +9 -0
  230. package/dist/host/index.d.ts.map +1 -0
  231. package/dist/host/index.jsx +8 -0
  232. package/dist/host/keyboard.d.ts +24 -0
  233. package/dist/host/keyboard.d.ts.map +1 -0
  234. package/dist/host/keyboard.jsx +28 -0
  235. package/dist/host/keyboard.jsx.map +1 -0
  236. package/dist/host/layers.d.ts +69 -0
  237. package/dist/host/layers.d.ts.map +1 -0
  238. package/dist/host/layers.jsx +111 -0
  239. package/dist/host/layers.jsx.map +1 -0
  240. package/dist/host/page-loading-overlay.d.ts +17 -0
  241. package/dist/host/page-loading-overlay.d.ts.map +1 -0
  242. package/dist/host/page-loading-overlay.jsx +16 -0
  243. package/dist/host/page-loading-overlay.jsx.map +1 -0
  244. package/dist/host/readiness.d.ts +57 -0
  245. package/dist/host/readiness.d.ts.map +1 -0
  246. package/dist/host/readiness.jsx +138 -0
  247. package/dist/host/readiness.jsx.map +1 -0
  248. package/dist/host/registry.d.ts +106 -0
  249. package/dist/host/registry.d.ts.map +1 -0
  250. package/dist/host/registry.jsx +93 -0
  251. package/dist/host/registry.jsx.map +1 -0
  252. package/dist/icon/icon.css +39 -0
  253. package/dist/icon/icon.css.map +1 -0
  254. package/dist/icon/icon.d.ts +57 -0
  255. package/dist/icon/icon.d.ts.map +1 -0
  256. package/dist/icon/icon.jsx +115 -0
  257. package/dist/icon/icon.jsx.map +1 -0
  258. package/dist/icon/index.d.ts +4 -0
  259. package/dist/icon/index.d.ts.map +1 -0
  260. package/dist/icon/index.jsx +3 -0
  261. package/dist/icon/slot.d.ts +45 -0
  262. package/dist/icon/slot.d.ts.map +1 -0
  263. package/dist/icon/slot.jsx +61 -0
  264. package/dist/icon/slot.jsx.map +1 -0
  265. package/dist/icon/swatch.d.ts +29 -0
  266. package/dist/icon/swatch.d.ts.map +1 -0
  267. package/dist/icon/swatch.jsx +25 -0
  268. package/dist/icon/swatch.jsx.map +1 -0
  269. package/dist/index.d.ts +23 -0
  270. package/dist/index.d.ts.map +1 -0
  271. package/dist/index.jsx +1 -0
  272. package/dist/pickers/combo-box.d.ts +42 -0
  273. package/dist/pickers/combo-box.d.ts.map +1 -0
  274. package/dist/pickers/combo-box.jsx +129 -0
  275. package/dist/pickers/combo-box.jsx.map +1 -0
  276. package/dist/pickers/date-time-picker.d.ts +63 -0
  277. package/dist/pickers/date-time-picker.d.ts.map +1 -0
  278. package/dist/pickers/date-time-picker.jsx +141 -0
  279. package/dist/pickers/date-time-picker.jsx.map +1 -0
  280. package/dist/pickers/date-time.d.ts +82 -0
  281. package/dist/pickers/date-time.d.ts.map +1 -0
  282. package/dist/pickers/date-time.jsx +130 -0
  283. package/dist/pickers/date-time.jsx.map +1 -0
  284. package/dist/pickers/index.d.ts +10 -0
  285. package/dist/pickers/index.d.ts.map +1 -0
  286. package/dist/pickers/index.jsx +9 -0
  287. package/dist/pickers/picker-sheet.d.ts +21 -0
  288. package/dist/pickers/picker-sheet.d.ts.map +1 -0
  289. package/dist/pickers/picker-sheet.jsx +61 -0
  290. package/dist/pickers/picker-sheet.jsx.map +1 -0
  291. package/dist/pickers/picker.d.ts +32 -0
  292. package/dist/pickers/picker.d.ts.map +1 -0
  293. package/dist/pickers/picker.jsx +72 -0
  294. package/dist/pickers/picker.jsx.map +1 -0
  295. package/dist/pickers/pickers.css +219 -0
  296. package/dist/pickers/pickers.css.map +1 -0
  297. package/dist/pickers/timespan-picker.d.ts +36 -0
  298. package/dist/pickers/timespan-picker.d.ts.map +1 -0
  299. package/dist/pickers/timespan-picker.jsx +99 -0
  300. package/dist/pickers/timespan-picker.jsx.map +1 -0
  301. package/dist/pickers/timespan.d.ts +38 -0
  302. package/dist/pickers/timespan.d.ts.map +1 -0
  303. package/dist/pickers/timespan.jsx +49 -0
  304. package/dist/pickers/timespan.jsx.map +1 -0
  305. package/dist/pickers/trigger.d.ts +34 -0
  306. package/dist/pickers/trigger.d.ts.map +1 -0
  307. package/dist/pickers/trigger.jsx +77 -0
  308. package/dist/pickers/trigger.jsx.map +1 -0
  309. package/dist/pickers/wheel-column.d.ts +32 -0
  310. package/dist/pickers/wheel-column.d.ts.map +1 -0
  311. package/dist/pickers/wheel-column.jsx +99 -0
  312. package/dist/pickers/wheel-column.jsx.map +1 -0
  313. package/dist/plus-button/index.d.ts +3 -0
  314. package/dist/plus-button/index.d.ts.map +1 -0
  315. package/dist/plus-button/index.jsx +2 -0
  316. package/dist/plus-button/model.d.ts +65 -0
  317. package/dist/plus-button/model.d.ts.map +1 -0
  318. package/dist/plus-button/model.jsx +86 -0
  319. package/dist/plus-button/model.jsx.map +1 -0
  320. package/dist/plus-button/plus-button.css +67 -0
  321. package/dist/plus-button/plus-button.css.map +1 -0
  322. package/dist/plus-button/plus-button.d.ts +38 -0
  323. package/dist/plus-button/plus-button.d.ts.map +1 -0
  324. package/dist/plus-button/plus-button.jsx +155 -0
  325. package/dist/plus-button/plus-button.jsx.map +1 -0
  326. package/dist/popup/frame.d.ts +101 -0
  327. package/dist/popup/frame.d.ts.map +1 -0
  328. package/dist/popup/frame.jsx +252 -0
  329. package/dist/popup/frame.jsx.map +1 -0
  330. package/dist/popup/index.d.ts +8 -0
  331. package/dist/popup/index.d.ts.map +1 -0
  332. package/dist/popup/index.jsx +7 -0
  333. package/dist/popup/input-form.d.ts +35 -0
  334. package/dist/popup/input-form.d.ts.map +1 -0
  335. package/dist/popup/input-form.jsx +160 -0
  336. package/dist/popup/input-form.jsx.map +1 -0
  337. package/dist/popup/input.d.ts +175 -0
  338. package/dist/popup/input.d.ts.map +1 -0
  339. package/dist/popup/input.jsx +176 -0
  340. package/dist/popup/input.jsx.map +1 -0
  341. package/dist/popup/popup-view.d.ts +25 -0
  342. package/dist/popup/popup-view.d.ts.map +1 -0
  343. package/dist/popup/popup-view.jsx +67 -0
  344. package/dist/popup/popup-view.jsx.map +1 -0
  345. package/dist/popup/popup.css +203 -0
  346. package/dist/popup/popup.css.map +1 -0
  347. package/dist/popup/queue.d.ts +90 -0
  348. package/dist/popup/queue.d.ts.map +1 -0
  349. package/dist/popup/queue.jsx +309 -0
  350. package/dist/popup/queue.jsx.map +1 -0
  351. package/dist/popup/service.d.ts +60 -0
  352. package/dist/popup/service.d.ts.map +1 -0
  353. package/dist/popup/service.jsx +350 -0
  354. package/dist/popup/service.jsx.map +1 -0
  355. package/dist/popup/types.d.ts +222 -0
  356. package/dist/popup/types.d.ts.map +1 -0
  357. package/dist/popup/types.jsx +218 -0
  358. package/dist/popup/types.jsx.map +1 -0
  359. package/dist/provider/contexts.d.ts +41 -0
  360. package/dist/provider/contexts.d.ts.map +1 -0
  361. package/dist/provider/contexts.jsx +11 -0
  362. package/dist/provider/contexts.jsx.map +1 -0
  363. package/dist/provider/global-events.d.ts +8 -0
  364. package/dist/provider/global-events.d.ts.map +1 -0
  365. package/dist/provider/global-events.jsx +17 -0
  366. package/dist/provider/global-events.jsx.map +1 -0
  367. package/dist/provider/hooks.d.ts +49 -0
  368. package/dist/provider/hooks.d.ts.map +1 -0
  369. package/dist/provider/hooks.jsx +72 -0
  370. package/dist/provider/hooks.jsx.map +1 -0
  371. package/dist/provider/index.d.ts +5 -0
  372. package/dist/provider/index.d.ts.map +1 -0
  373. package/dist/provider/index.jsx +3 -0
  374. package/dist/provider/provider.css +18 -0
  375. package/dist/provider/provider.css.map +1 -0
  376. package/dist/provider/provider.d.ts +51 -0
  377. package/dist/provider/provider.d.ts.map +1 -0
  378. package/dist/provider/provider.jsx +290 -0
  379. package/dist/provider/provider.jsx.map +1 -0
  380. package/dist/provider/settings.d.ts +99 -0
  381. package/dist/provider/settings.d.ts.map +1 -0
  382. package/dist/provider/settings.jsx +45 -0
  383. package/dist/provider/settings.jsx.map +1 -0
  384. package/dist/provider/theme-css.d.ts +12 -0
  385. package/dist/provider/theme-css.d.ts.map +1 -0
  386. package/dist/provider/theme-css.jsx +19 -0
  387. package/dist/provider/theme-css.jsx.map +1 -0
  388. package/dist/provider/theme-root.d.ts +10 -0
  389. package/dist/provider/theme-root.d.ts.map +1 -0
  390. package/dist/provider/theme-root.jsx +24 -0
  391. package/dist/provider/theme-root.jsx.map +1 -0
  392. package/dist/provider/theme.css +473 -0
  393. package/dist/provider/theme.css.map +1 -0
  394. package/dist/range-slider/index.d.ts +3 -0
  395. package/dist/range-slider/index.d.ts.map +1 -0
  396. package/dist/range-slider/index.jsx +2 -0
  397. package/dist/range-slider/math.d.ts +23 -0
  398. package/dist/range-slider/math.d.ts.map +1 -0
  399. package/dist/range-slider/math.jsx +71 -0
  400. package/dist/range-slider/math.jsx.map +1 -0
  401. package/dist/range-slider/range-slider.css +90 -0
  402. package/dist/range-slider/range-slider.css.map +1 -0
  403. package/dist/range-slider/range-slider.d.ts +52 -0
  404. package/dist/range-slider/range-slider.d.ts.map +1 -0
  405. package/dist/range-slider/range-slider.jsx +159 -0
  406. package/dist/range-slider/range-slider.jsx.map +1 -0
  407. package/dist/selection/index.d.ts +5 -0
  408. package/dist/selection/index.d.ts.map +1 -0
  409. package/dist/selection/index.jsx +3 -0
  410. package/dist/selection/model.d.ts +53 -0
  411. package/dist/selection/model.d.ts.map +1 -0
  412. package/dist/selection/model.jsx +69 -0
  413. package/dist/selection/model.jsx.map +1 -0
  414. package/dist/selection/selection-sheet.d.ts +80 -0
  415. package/dist/selection/selection-sheet.d.ts.map +1 -0
  416. package/dist/selection/selection-sheet.jsx +366 -0
  417. package/dist/selection/selection-sheet.jsx.map +1 -0
  418. package/dist/selection/selection.css +76 -0
  419. package/dist/selection/selection.css.map +1 -0
  420. package/dist/selection/use-selection-model.d.ts +9 -0
  421. package/dist/selection/use-selection-model.d.ts.map +1 -0
  422. package/dist/selection/use-selection-model.jsx +22 -0
  423. package/dist/selection/use-selection-model.jsx.map +1 -0
  424. package/dist/sheet/frame.d.ts +47 -0
  425. package/dist/sheet/frame.d.ts.map +1 -0
  426. package/dist/sheet/frame.jsx +270 -0
  427. package/dist/sheet/frame.jsx.map +1 -0
  428. package/dist/sheet/gesture.d.ts +51 -0
  429. package/dist/sheet/gesture.d.ts.map +1 -0
  430. package/dist/sheet/gesture.jsx +107 -0
  431. package/dist/sheet/gesture.jsx.map +1 -0
  432. package/dist/sheet/handoff.d.ts +32 -0
  433. package/dist/sheet/handoff.d.ts.map +1 -0
  434. package/dist/sheet/handoff.jsx +33 -0
  435. package/dist/sheet/handoff.jsx.map +1 -0
  436. package/dist/sheet/header.d.ts +46 -0
  437. package/dist/sheet/header.d.ts.map +1 -0
  438. package/dist/sheet/header.jsx +158 -0
  439. package/dist/sheet/header.jsx.map +1 -0
  440. package/dist/sheet/height-memo.d.ts +47 -0
  441. package/dist/sheet/height-memo.d.ts.map +1 -0
  442. package/dist/sheet/height-memo.jsx +100 -0
  443. package/dist/sheet/height-memo.jsx.map +1 -0
  444. package/dist/sheet/index.d.ts +12 -0
  445. package/dist/sheet/index.d.ts.map +1 -0
  446. package/dist/sheet/index.jsx +11 -0
  447. package/dist/sheet/loadable.d.ts +35 -0
  448. package/dist/sheet/loadable.d.ts.map +1 -0
  449. package/dist/sheet/loadable.jsx +65 -0
  450. package/dist/sheet/loadable.jsx.map +1 -0
  451. package/dist/sheet/motion.d.ts +59 -0
  452. package/dist/sheet/motion.d.ts.map +1 -0
  453. package/dist/sheet/motion.jsx +59 -0
  454. package/dist/sheet/motion.jsx.map +1 -0
  455. package/dist/sheet/options.d.ts +252 -0
  456. package/dist/sheet/options.d.ts.map +1 -0
  457. package/dist/sheet/options.jsx +92 -0
  458. package/dist/sheet/options.jsx.map +1 -0
  459. package/dist/sheet/processing.d.ts +22 -0
  460. package/dist/sheet/processing.d.ts.map +1 -0
  461. package/dist/sheet/processing.jsx +66 -0
  462. package/dist/sheet/processing.jsx.map +1 -0
  463. package/dist/sheet/service.d.ts +55 -0
  464. package/dist/sheet/service.d.ts.map +1 -0
  465. package/dist/sheet/service.jsx +143 -0
  466. package/dist/sheet/service.jsx.map +1 -0
  467. package/dist/sheet/sheet.css +246 -0
  468. package/dist/sheet/sheet.css.map +1 -0
  469. package/dist/sheet/sheet.d.ts +19 -0
  470. package/dist/sheet/sheet.d.ts.map +1 -0
  471. package/dist/sheet/sheet.jsx +40 -0
  472. package/dist/sheet/sheet.jsx.map +1 -0
  473. package/dist/sheet/sizing.d.ts +87 -0
  474. package/dist/sheet/sizing.d.ts.map +1 -0
  475. package/dist/sheet/sizing.jsx +159 -0
  476. package/dist/sheet/sizing.jsx.map +1 -0
  477. package/dist/sheet/stack.d.ts +161 -0
  478. package/dist/sheet/stack.d.ts.map +1 -0
  479. package/dist/sheet/stack.jsx +378 -0
  480. package/dist/sheet/stack.jsx.map +1 -0
  481. package/dist/swipe/index.d.ts +3 -0
  482. package/dist/swipe/index.d.ts.map +1 -0
  483. package/dist/swipe/index.jsx +2 -0
  484. package/dist/swipe/model.d.ts +72 -0
  485. package/dist/swipe/model.d.ts.map +1 -0
  486. package/dist/swipe/model.jsx +66 -0
  487. package/dist/swipe/model.jsx.map +1 -0
  488. package/dist/swipe/swipe-view.d.ts +40 -0
  489. package/dist/swipe/swipe-view.d.ts.map +1 -0
  490. package/dist/swipe/swipe-view.jsx +163 -0
  491. package/dist/swipe/swipe-view.jsx.map +1 -0
  492. package/dist/swipe/swipe.css +34 -0
  493. package/dist/swipe/swipe.css.map +1 -0
  494. package/dist/tab-bar/index.d.ts +4 -0
  495. package/dist/tab-bar/index.d.ts.map +1 -0
  496. package/dist/tab-bar/index.jsx +3 -0
  497. package/dist/tab-bar/metrics.d.ts +230 -0
  498. package/dist/tab-bar/metrics.d.ts.map +1 -0
  499. package/dist/tab-bar/metrics.jsx +221 -0
  500. package/dist/tab-bar/metrics.jsx.map +1 -0
  501. package/dist/tab-bar/model.d.ts +170 -0
  502. package/dist/tab-bar/model.d.ts.map +1 -0
  503. package/dist/tab-bar/model.jsx +349 -0
  504. package/dist/tab-bar/model.jsx.map +1 -0
  505. package/dist/tab-bar/tab-bar.css +173 -0
  506. package/dist/tab-bar/tab-bar.css.map +1 -0
  507. package/dist/tab-bar/tab-bar.d.ts +61 -0
  508. package/dist/tab-bar/tab-bar.d.ts.map +1 -0
  509. package/dist/tab-bar/tab-bar.jsx +346 -0
  510. package/dist/tab-bar/tab-bar.jsx.map +1 -0
  511. package/dist/tabs/index.d.ts +3 -0
  512. package/dist/tabs/index.d.ts.map +1 -0
  513. package/dist/tabs/index.jsx +2 -0
  514. package/dist/tabs/model.d.ts +83 -0
  515. package/dist/tabs/model.d.ts.map +1 -0
  516. package/dist/tabs/model.jsx +113 -0
  517. package/dist/tabs/model.jsx.map +1 -0
  518. package/dist/tabs/tab-view.d.ts +47 -0
  519. package/dist/tabs/tab-view.d.ts.map +1 -0
  520. package/dist/tabs/tab-view.jsx +227 -0
  521. package/dist/tabs/tab-view.jsx.map +1 -0
  522. package/dist/tabs/tabs.css +182 -0
  523. package/dist/tabs/tabs.css.map +1 -0
  524. package/dist/toast/index.d.ts +3 -0
  525. package/dist/toast/index.d.ts.map +1 -0
  526. package/dist/toast/index.jsx +2 -0
  527. package/dist/toast/service.d.ts +48 -0
  528. package/dist/toast/service.d.ts.map +1 -0
  529. package/dist/toast/service.jsx +238 -0
  530. package/dist/toast/service.jsx.map +1 -0
  531. package/dist/toast/store.d.ts +176 -0
  532. package/dist/toast/store.d.ts.map +1 -0
  533. package/dist/toast/store.jsx +355 -0
  534. package/dist/toast/store.jsx.map +1 -0
  535. package/dist/toast/toast.css +159 -0
  536. package/dist/toast/toast.css.map +1 -0
  537. package/dist/toggle/checkbox-math.d.ts +52 -0
  538. package/dist/toggle/checkbox-math.d.ts.map +1 -0
  539. package/dist/toggle/checkbox-math.jsx +111 -0
  540. package/dist/toggle/checkbox-math.jsx.map +1 -0
  541. package/dist/toggle/checkbox.d.ts +56 -0
  542. package/dist/toggle/checkbox.d.ts.map +1 -0
  543. package/dist/toggle/checkbox.jsx +152 -0
  544. package/dist/toggle/checkbox.jsx.map +1 -0
  545. package/dist/toggle/chip-group.d.ts +50 -0
  546. package/dist/toggle/chip-group.d.ts.map +1 -0
  547. package/dist/toggle/chip-group.jsx +107 -0
  548. package/dist/toggle/chip-group.jsx.map +1 -0
  549. package/dist/toggle/index.d.ts +5 -0
  550. package/dist/toggle/index.d.ts.map +1 -0
  551. package/dist/toggle/index.jsx +4 -0
  552. package/dist/toggle/switch.d.ts +52 -0
  553. package/dist/toggle/switch.d.ts.map +1 -0
  554. package/dist/toggle/switch.jsx +192 -0
  555. package/dist/toggle/switch.jsx.map +1 -0
  556. package/dist/toggle/toggle.css +188 -0
  557. package/dist/toggle/toggle.css.map +1 -0
  558. package/package.json +155 -4
  559. package/rspeedy/index.d.ts +21 -0
  560. package/rspeedy/index.mjs +75 -0
  561. package/rspeedy/index.test.mjs +52 -0
@@ -0,0 +1,309 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) Object.defineProperty(obj, key, {
3
+ value: value,
4
+ enumerable: true,
5
+ configurable: true,
6
+ writable: true
7
+ });
8
+ else obj[key] = value;
9
+ return obj;
10
+ }
11
+ const CLOSE = {
12
+ action: 'close',
13
+ nextPopup: null,
14
+ afterClose: null
15
+ };
16
+ class G9PopupQueue {
17
+ getSnapshot() {
18
+ return this.snapshot;
19
+ }
20
+ subscribe(listener) {
21
+ this.listeners.add(listener);
22
+ return ()=>this.listeners.delete(listener);
23
+ }
24
+ get queuedCount() {
25
+ return this.queue.length;
26
+ }
27
+ show(descriptor) {
28
+ return new Promise((resolve)=>{
29
+ const request = {
30
+ id: this.nextId++,
31
+ descriptor,
32
+ phase: 'queued',
33
+ busy: false,
34
+ showCount: 0,
35
+ settled: false,
36
+ settle: (o)=>{
37
+ if (request.settled) return;
38
+ request.settled = true;
39
+ request.phase = 'done';
40
+ resolve(o);
41
+ },
42
+ autoTimer: null,
43
+ controller: {
44
+ aborted: false
45
+ }
46
+ };
47
+ if (this.disposed) return void request.settle({
48
+ exit: 'unmount',
49
+ result: CLOSE,
50
+ buttonIndex: -1
51
+ });
52
+ if (this.userCode > 0) {
53
+ var _this_active;
54
+ this.queue.unshift(request);
55
+ if (null == (_this_active = this.active) ? void 0 : _this_active.busy) this.park(this.active);
56
+ } else this.queue.push(request);
57
+ this.pump();
58
+ });
59
+ }
60
+ markOpened(id) {
61
+ var _this_active;
62
+ if ((null == (_this_active = this.active) ? void 0 : _this_active.id) === id && 'opening' === this.active.phase) {
63
+ this.active.phase = 'open';
64
+ this.emit();
65
+ }
66
+ }
67
+ async press(id, index) {
68
+ const request = this.active;
69
+ if (!request || request.id !== id || request.busy || 'open' !== request.phase && 'opening' !== request.phase) return;
70
+ const button = request.descriptor.buttons[index];
71
+ if (!button) return;
72
+ request.busy = true;
73
+ this.clearAuto(request);
74
+ this.emit();
75
+ let result;
76
+ this.userCode += 1;
77
+ try {
78
+ var _ref;
79
+ result = button.callback ? null != (_ref = await button.callback(request.controller)) ? _ref : CLOSE : CLOSE;
80
+ } catch (error) {
81
+ this.report(error);
82
+ this.userCode -= 1;
83
+ request.busy = false;
84
+ if (this.parked.has(request)) this.unpark(request);
85
+ else this.emit();
86
+ return;
87
+ }
88
+ this.userCode -= 1;
89
+ request.busy = false;
90
+ if ('doNothing' === result.action) {
91
+ if (this.parked.has(request)) this.unpark(request);
92
+ else this.emit();
93
+ return;
94
+ }
95
+ const outcome = {
96
+ exit: 'button',
97
+ result,
98
+ buttonIndex: index
99
+ };
100
+ if (this.parked.has(request)) {
101
+ this.parked.delete(request);
102
+ this.complete(request, outcome);
103
+ return;
104
+ }
105
+ this.close(request, outcome);
106
+ }
107
+ backgroundTap(id) {
108
+ const r = this.active;
109
+ if (!r || r.id !== id || r.busy || !this.config.closesOnBackgroundTap(r.descriptor)) return;
110
+ this.close(r, {
111
+ exit: 'backgroundTap',
112
+ result: CLOSE,
113
+ buttonIndex: -1
114
+ });
115
+ }
116
+ handleBack() {
117
+ const r = this.active;
118
+ if (!r) return false;
119
+ if (!r.busy && 'closing' !== r.phase && this.config.closesOnBack(r.descriptor)) this.close(r, {
120
+ exit: 'hardwareBack',
121
+ result: CLOSE,
122
+ buttonIndex: -1
123
+ });
124
+ return true;
125
+ }
126
+ closeActive() {
127
+ if (this.active && 'closing' !== this.active.phase) this.close(this.active, {
128
+ exit: 'closeActive',
129
+ result: CLOSE,
130
+ buttonIndex: -1
131
+ });
132
+ }
133
+ clearQueue(exit = 'clearQueue') {
134
+ const waiting = this.queue;
135
+ this.queue = [];
136
+ for (const r of waiting)r.settle({
137
+ exit,
138
+ result: CLOSE,
139
+ buttonIndex: -1
140
+ });
141
+ }
142
+ dismissAll() {
143
+ this.clearQueue('dismissAll');
144
+ for (const r of this.parked){
145
+ r.controller.aborted = true;
146
+ r.settle({
147
+ exit: 'dismissAll',
148
+ result: CLOSE,
149
+ buttonIndex: -1
150
+ });
151
+ }
152
+ this.parked.clear();
153
+ if (this.active && 'closing' !== this.active.phase) this.close(this.active, {
154
+ exit: 'dismissAll',
155
+ result: CLOSE,
156
+ buttonIndex: -1
157
+ });
158
+ }
159
+ dispose() {
160
+ if (this.disposed) return;
161
+ this.disposed = true;
162
+ const all = [
163
+ ...this.queue,
164
+ ...this.parked,
165
+ ...this.active ? [
166
+ this.active
167
+ ] : []
168
+ ];
169
+ this.queue = [];
170
+ this.parked.clear();
171
+ this.active = null;
172
+ if (null !== this.closeTimer) this.config.clearTimer(this.closeTimer);
173
+ for (const r of all){
174
+ this.clearAuto(r);
175
+ r.controller.aborted = true;
176
+ r.settle({
177
+ exit: 'unmount',
178
+ result: CLOSE,
179
+ buttonIndex: -1
180
+ });
181
+ }
182
+ this.emit();
183
+ }
184
+ pump() {
185
+ if (this.disposed || this.active) return;
186
+ const next = this.queue.shift();
187
+ if (!next) return void this.emit();
188
+ this.active = next;
189
+ next.phase = 'opening';
190
+ next.showCount += 1;
191
+ const auto = this.config.autoCloseMs(next.descriptor);
192
+ if (auto > 0) next.autoTimer = this.config.setTimer(()=>{
193
+ next.autoTimer = null;
194
+ if (this.active === next && !next.busy) this.close(next, {
195
+ exit: 'autoClose',
196
+ result: CLOSE,
197
+ buttonIndex: -1
198
+ });
199
+ }, auto);
200
+ this.emit();
201
+ }
202
+ park(request) {
203
+ this.parked.add(request);
204
+ request.phase = 'parked';
205
+ if (this.active === request) this.active = null;
206
+ }
207
+ unpark(request) {
208
+ this.parked.delete(request);
209
+ request.phase = 'queued';
210
+ this.queue.unshift(request);
211
+ this.pump();
212
+ this.emit();
213
+ }
214
+ close(request, outcome) {
215
+ if ('closing' === request.phase || request.settled) return;
216
+ this.clearAuto(request);
217
+ request.phase = 'closing';
218
+ this.emit();
219
+ this.closeTimer = this.config.setTimer(()=>{
220
+ this.closeTimer = null;
221
+ if (this.active === request) this.active = null;
222
+ this.complete(request, outcome);
223
+ }, this.config.closeDurationMs(request.descriptor));
224
+ }
225
+ complete(request, outcome) {
226
+ request.settle(outcome);
227
+ const result = outcome.result;
228
+ if ('showNext' === result.action && result.nextPopup) this.showFront(result.nextPopup);
229
+ if (result.afterClose) {
230
+ const after = result.afterClose;
231
+ this.userCode += 1;
232
+ Promise.resolve().then(after).catch((error)=>this.report(error)).finally(()=>{
233
+ this.userCode -= 1;
234
+ });
235
+ }
236
+ this.pump();
237
+ }
238
+ showFront(descriptor) {
239
+ return new Promise((resolve)=>{
240
+ const request = {
241
+ id: this.nextId++,
242
+ descriptor,
243
+ phase: 'queued',
244
+ busy: false,
245
+ showCount: 0,
246
+ settled: false,
247
+ settle: (o)=>{
248
+ if (request.settled) return;
249
+ request.settled = true;
250
+ request.phase = 'done';
251
+ resolve(o);
252
+ },
253
+ autoTimer: null,
254
+ controller: {
255
+ aborted: false
256
+ }
257
+ };
258
+ this.queue.unshift(request);
259
+ });
260
+ }
261
+ clearAuto(request) {
262
+ if (null !== request.autoTimer) {
263
+ this.config.clearTimer(request.autoTimer);
264
+ request.autoTimer = null;
265
+ }
266
+ }
267
+ report(error) {
268
+ try {
269
+ var _this_config_onError, _this_config;
270
+ null == (_this_config_onError = (_this_config = this.config).onError) || _this_config_onError.call(_this_config, error);
271
+ } catch {}
272
+ }
273
+ emit() {
274
+ const r = this.active;
275
+ this.snapshot = r ? {
276
+ id: r.id,
277
+ descriptor: r.descriptor,
278
+ phase: r.phase,
279
+ busy: r.busy,
280
+ showCount: r.showCount
281
+ } : null;
282
+ for (const l of this.listeners)l();
283
+ }
284
+ constructor(config){
285
+ _define_property(this, "config", void 0);
286
+ _define_property(this, "queue", void 0);
287
+ _define_property(this, "active", void 0);
288
+ _define_property(this, "parked", void 0);
289
+ _define_property(this, "userCode", void 0);
290
+ _define_property(this, "nextId", void 0);
291
+ _define_property(this, "listeners", void 0);
292
+ _define_property(this, "snapshot", void 0);
293
+ _define_property(this, "closeTimer", void 0);
294
+ _define_property(this, "disposed", void 0);
295
+ this.config = config;
296
+ this.queue = [];
297
+ this.active = null;
298
+ this.parked = new Set();
299
+ this.userCode = 0;
300
+ this.nextId = 1;
301
+ this.listeners = new Set();
302
+ this.snapshot = null;
303
+ this.closeTimer = null;
304
+ this.disposed = false;
305
+ }
306
+ }
307
+ export { G9PopupQueue };
308
+
309
+ //# sourceMappingURL=queue.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popup/queue.jsx","sources":["../../src/popup/queue.ts"],"sourcesContent":["import type { G9PopupDescriptor, G9PopupResult } from './types';\n\n// The popup queue (MAUI `G9PopupHelper` pump) as a pure model: one card at a time, FIFO, button callbacks that run\n// once, nested popups that preempt a running callback, and an outcome that settles once for every way a popup ends.\n// The view renders `getSnapshot()`; timers come from the caller so tests drive time.\n\n/** How a popup ended (MAUI: two buttons, background tap, back, auto-close, dismiss/clear, unmount, failure). */\nexport type G9PopupExit =\n | 'button'\n | 'backgroundTap'\n | 'hardwareBack'\n | 'autoClose'\n | 'closeActive'\n | 'dismissAll'\n | 'clearQueue'\n | 'unmount'\n | 'failure';\n\n/** What the caller of `show` gets: the result of the button that ended it, or a dismissal. */\nexport interface G9PopupOutcome {\n readonly exit: G9PopupExit;\n /** The button result (`exit === 'button'`), else a `close` result. */\n readonly result: G9PopupResult;\n /** Index of the button that ended it, or -1. */\n readonly buttonIndex: number;\n}\n\n/** Where a request is. */\nexport type G9PopupPhase = 'queued' | 'opening' | 'open' | 'closing' | 'parked' | 'done';\n\n/** One popup request (what the view renders while it is the active one). */\nexport interface G9PopupEntry {\n readonly id: number;\n readonly descriptor: G9PopupDescriptor;\n readonly phase: G9PopupPhase;\n /** A footer callback is running (buttons show busy, the gate is shut). */\n readonly busy: boolean;\n /** Bumped every time the request is (re)shown: the view keys its open motion on it. */\n readonly showCount: number;\n}\n\n/** Timing and reporting of the queue. */\nexport interface G9PopupQueueConfig {\n setTimer(callback: () => void, ms: number): unknown;\n clearTimer(handle: unknown): void;\n /** Close motion length for a descriptor (the queue waits it out before the next popup). */\n closeDurationMs(descriptor: G9PopupDescriptor): number;\n /** Auto-close delay for a descriptor (0 = none). */\n autoCloseMs(descriptor: G9PopupDescriptor): number;\n /** `false` keeps the popup on a hardware back (it still swallows the press). */\n closesOnBack(descriptor: G9PopupDescriptor): boolean;\n /** `true` lets a background tap close it. */\n closesOnBackgroundTap(descriptor: G9PopupDescriptor): boolean;\n /** A button callback or `afterClose` threw (reported, never escapes). */\n onError?(error: unknown): void;\n}\n\ninterface Request {\n id: number;\n descriptor: G9PopupDescriptor;\n phase: G9PopupPhase;\n busy: boolean;\n showCount: number;\n settle: (outcome: G9PopupOutcome) => void;\n settled: boolean;\n autoTimer: unknown;\n controller: { aborted: boolean };\n}\n\nconst CLOSE: G9PopupResult = { action: 'close', nextPopup: null, afterClose: null };\n\n/**\n * The queue. `show` enqueues and resolves the outcome when the popup ended (exactly once). A popup requested while a\n * footer callback is running goes to the FRONT and is shown now; the popup whose callback runs is parked (its card\n * closes, its callback keeps running). When that callback returns, `close`/`showNext` complete it, `doNothing`\n * puts it back at the front. A callback that throws keeps the popup open and is reported.\n */\nexport class G9PopupQueue {\n private queue: Request[] = [];\n private active: Request | null = null;\n private readonly parked = new Set<Request>();\n private userCode = 0;\n private nextId = 1;\n private readonly listeners = new Set<() => void>();\n private snapshot: G9PopupEntry | null = null;\n private closeTimer: unknown = null;\n private disposed = false;\n\n constructor(private readonly config: G9PopupQueueConfig) {}\n\n /** The popup on screen (opening, open or closing), or `null`. */\n getSnapshot(): G9PopupEntry | null {\n return this.snapshot;\n }\n\n subscribe(listener: () => void): () => void {\n this.listeners.add(listener);\n return () => this.listeners.delete(listener);\n }\n\n /** Requests waiting behind the active popup. */\n get queuedCount(): number {\n return this.queue.length;\n }\n\n /** Enqueues a popup; resolves when it ended. */\n show(descriptor: G9PopupDescriptor): Promise<G9PopupOutcome> {\n return new Promise((resolve) => {\n const request: Request = {\n id: this.nextId++,\n descriptor,\n phase: 'queued',\n busy: false,\n showCount: 0,\n settled: false,\n settle: (o) => {\n if (request.settled) return;\n request.settled = true;\n request.phase = 'done';\n resolve(o);\n },\n autoTimer: null,\n controller: { aborted: false },\n };\n if (this.disposed) {\n request.settle({ exit: 'unmount', result: CLOSE, buttonIndex: -1 });\n return;\n }\n if (this.userCode > 0) {\n // Nested: preempt the popup whose callback is running.\n this.queue.unshift(request);\n if (this.active?.busy) this.park(this.active);\n } else {\n this.queue.push(request);\n }\n this.pump();\n });\n }\n\n /** The view finished the open motion. */\n markOpened(id: number): void {\n if (this.active?.id === id && this.active.phase === 'opening') {\n this.active.phase = 'open';\n this.emit();\n }\n }\n\n /** A footer button was pressed: runs its callback once (one gate per popup), then applies the result. */\n async press(id: number, index: number): Promise<void> {\n const request = this.active;\n if (!request || request.id !== id || request.busy || (request.phase !== 'open' && request.phase !== 'opening')) {\n return;\n }\n const button = request.descriptor.buttons[index];\n if (!button) return;\n request.busy = true;\n this.clearAuto(request);\n this.emit();\n let result: G9PopupResult;\n this.userCode += 1;\n try {\n result = button.callback ? ((await button.callback(request.controller)) ?? CLOSE) : CLOSE;\n } catch (error) {\n this.report(error);\n this.userCode -= 1;\n request.busy = false;\n if (this.parked.has(request)) this.unpark(request);\n else this.emit();\n return;\n }\n this.userCode -= 1;\n request.busy = false;\n if (result.action === 'doNothing') {\n if (this.parked.has(request)) this.unpark(request);\n else this.emit();\n return;\n }\n const outcome: G9PopupOutcome = { exit: 'button', result, buttonIndex: index };\n if (this.parked.has(request)) {\n this.parked.delete(request);\n this.complete(request, outcome);\n return;\n }\n this.close(request, outcome);\n }\n\n /** The scrim was tapped. */\n backgroundTap(id: number): void {\n const r = this.active;\n if (!r || r.id !== id || r.busy || !this.config.closesOnBackgroundTap(r.descriptor)) return;\n this.close(r, { exit: 'backgroundTap', result: CLOSE, buttonIndex: -1 });\n }\n\n /** Hardware back: `true` when a popup is on screen (a non-cancelable one swallows the press). */\n handleBack(): boolean {\n const r = this.active;\n if (!r) return false;\n if (!r.busy && r.phase !== 'closing' && this.config.closesOnBack(r.descriptor)) {\n this.close(r, { exit: 'hardwareBack', result: CLOSE, buttonIndex: -1 });\n }\n return true;\n }\n\n /** Closes the popup on screen (MAUI `CloseActiveG9PopupAsync`). */\n closeActive(): void {\n if (this.active && this.active.phase !== 'closing') {\n this.close(this.active, { exit: 'closeActive', result: CLOSE, buttonIndex: -1 });\n }\n }\n\n /** Drops every waiting request (MAUI `ClearG9PopupQueueAsync`); the popup on screen stays. */\n clearQueue(exit: G9PopupExit = 'clearQueue'): void {\n const waiting = this.queue;\n this.queue = [];\n for (const r of waiting) r.settle({ exit, result: CLOSE, buttonIndex: -1 });\n }\n\n /** Closes the popup on screen, drops the queue and forgets parked popups (MAUI `DismissAllG9PopupsAsync`). */\n dismissAll(): void {\n this.clearQueue('dismissAll');\n for (const r of this.parked) {\n r.controller.aborted = true;\n r.settle({ exit: 'dismissAll', result: CLOSE, buttonIndex: -1 });\n }\n this.parked.clear();\n if (this.active && this.active.phase !== 'closing') {\n this.close(this.active, { exit: 'dismissAll', result: CLOSE, buttonIndex: -1 });\n }\n }\n\n /** The host unmounted: everything settles with `unmount`. */\n dispose(): void {\n if (this.disposed) return;\n this.disposed = true;\n const all = [...this.queue, ...this.parked, ...(this.active ? [this.active] : [])];\n this.queue = [];\n this.parked.clear();\n this.active = null;\n if (this.closeTimer !== null) this.config.clearTimer(this.closeTimer);\n for (const r of all) {\n this.clearAuto(r);\n r.controller.aborted = true;\n r.settle({ exit: 'unmount', result: CLOSE, buttonIndex: -1 });\n }\n this.emit();\n }\n\n private pump(): void {\n if (this.disposed || this.active) return;\n const next = this.queue.shift();\n if (!next) {\n this.emit();\n return;\n }\n this.active = next;\n next.phase = 'opening';\n next.showCount += 1;\n const auto = this.config.autoCloseMs(next.descriptor);\n if (auto > 0) {\n next.autoTimer = this.config.setTimer(() => {\n next.autoTimer = null;\n if (this.active === next && !next.busy) this.close(next, { exit: 'autoClose', result: CLOSE, buttonIndex: -1 });\n }, auto);\n }\n this.emit();\n }\n\n private park(request: Request): void {\n this.parked.add(request);\n request.phase = 'parked';\n if (this.active === request) this.active = null;\n // The parked card leaves at once (one card at a time); the nested popup takes the slot.\n }\n\n private unpark(request: Request): void {\n this.parked.delete(request);\n request.phase = 'queued';\n this.queue.unshift(request);\n this.pump();\n this.emit();\n }\n\n private close(request: Request, outcome: G9PopupOutcome): void {\n if (request.phase === 'closing' || request.settled) return;\n this.clearAuto(request);\n request.phase = 'closing';\n this.emit();\n this.closeTimer = this.config.setTimer(() => {\n this.closeTimer = null;\n if (this.active === request) this.active = null;\n this.complete(request, outcome);\n }, this.config.closeDurationMs(request.descriptor));\n }\n\n private complete(request: Request, outcome: G9PopupOutcome): void {\n request.settle(outcome);\n const result = outcome.result;\n if (result.action === 'showNext' && result.nextPopup) {\n // The next popup takes the front of the queue (it must not wait behind unrelated requests).\n void this.showFront(result.nextPopup);\n }\n if (result.afterClose) {\n const after = result.afterClose;\n this.userCode += 1;\n Promise.resolve()\n .then(after)\n .catch((error: unknown) => this.report(error))\n .finally(() => {\n this.userCode -= 1;\n });\n }\n this.pump();\n }\n\n private showFront(descriptor: G9PopupDescriptor): Promise<G9PopupOutcome> {\n return new Promise((resolve) => {\n const request: Request = {\n id: this.nextId++,\n descriptor,\n phase: 'queued',\n busy: false,\n showCount: 0,\n settled: false,\n settle: (o) => {\n if (request.settled) return;\n request.settled = true;\n request.phase = 'done';\n resolve(o);\n },\n autoTimer: null,\n controller: { aborted: false },\n };\n this.queue.unshift(request);\n });\n }\n\n private clearAuto(request: Request): void {\n if (request.autoTimer !== null) {\n this.config.clearTimer(request.autoTimer);\n request.autoTimer = null;\n }\n }\n\n private report(error: unknown): void {\n try {\n this.config.onError?.(error);\n } catch {\n // Reporting must never escape the queue.\n }\n }\n\n private emit(): void {\n const r = this.active;\n this.snapshot = r\n ? { id: r.id, descriptor: r.descriptor, phase: r.phase, busy: r.busy, showCount: r.showCount }\n : null;\n for (const l of this.listeners) l();\n }\n}\n"],"names":["CLOSE","G9PopupQueue","listener","descriptor","Promise","resolve","request","o","_this_active","id","index","button","result","_ref","error","outcome","r","exit","waiting","all","next","auto","after","_this_config","l","config","Set"],"mappings":";;;;;;;;;;AAqEA,MAAMA,QAAuB;IAAE,QAAQ;IAAS,WAAW;IAAM,YAAY;AAAK;AAQ3E,MAAMC;IAcX,cAAmC;QACjC,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,UAAUC,QAAoB,EAAc;QAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAACA;QACnB,OAAO,IAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAACA;IACrC;IAGA,IAAI,cAAsB;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM;IAC1B;IAGA,KAAKC,UAA6B,EAA2B;QAC3D,OAAO,IAAIC,QAAQ,CAACC;YAClB,MAAMC,UAAmB;gBACvB,IAAI,IAAI,CAAC,MAAM;gBACfH;gBACA,OAAO;gBACP,MAAM;gBACN,WAAW;gBACX,SAAS;gBACT,QAAQ,CAACI;oBACP,IAAID,QAAQ,OAAO,EAAE;oBACrBA,QAAQ,OAAO,GAAG;oBAClBA,QAAQ,KAAK,GAAG;oBAChBD,QAAQE;gBACV;gBACA,WAAW;gBACX,YAAY;oBAAE,SAAS;gBAAM;YAC/B;YACA,IAAI,IAAI,CAAC,QAAQ,EAAE,YACjBD,QAAQ,MAAM,CAAC;gBAAE,MAAM;gBAAW,QAAQN;gBAAO,aAAa;YAAG;YAGnE,IAAI,IAAI,CAAC,QAAQ,GAAG,GAAG;oBAGjBQ;gBADJ,IAAI,CAAC,KAAK,CAAC,OAAO,CAACF;gBACnB,IAAI,QAAAE,CAAAA,eAAAA,IAAI,CAAC,MAAM,AAAD,IAAVA,KAAAA,IAAAA,aAAa,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM;YAC9C,OACE,IAAI,CAAC,KAAK,CAAC,IAAI,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c,EAAQ;QACnC,IAAI;gBACFS,sBAAAA;oBAAAA,CAAAA,uBAAAA,AAAAA,CAAAA,eAAAA,IAAI,CAAC,MAAM,AAAD,EAAE,OAAO,AAAD,KAAlBA,qBAAAA,IAAAA,CAAAA,cAAsBT;QACxB,EAAE,OAAM,CAER;IACF;IAEQ,OAAa;QACnB,MAAME,IAAI,IAAI,CAAC,MAAM;QACrB,IAAI,CAAC,QAAQ,GAAGA,IACZ;YAAE,IAAIA,EAAE,EAAE;YAAE,YAAYA,EAAE,UAAU;YAAE,OAAOA,EAAE,KAAK;YAAE,MAAMA,EAAE,IAAI;YAAE,WAAWA,EAAE,SAAS;QAAC,IAC3F;QACJ,KAAK,MAAMQ,KAAK,IAAI,CAAC,SAAS,CAAEA;IAClC;IA7QA,YAA6BC,MAA0B,CAAE;;QAVzD,uBAAQ,SAAR;QACA,uBAAQ,UAAR;QACA,uBAAiB,UAAjB;QACA,uBAAQ,YAAR;QACA,uBAAQ,UAAR;QACA,uBAAiB,aAAjB;QACA,uBAAQ,YAAR;QACA,uBAAQ,cAAR;QACA,uBAAQ,YAAR;aAE6BA,MAAM,GAANA;aAVrB,KAAK,GAAc,EAAE;aACrB,MAAM,GAAmB;aAChB,MAAM,GAAG,IAAIC;aACtB,QAAQ,GAAG;aACX,MAAM,GAAG;aACA,SAAS,GAAG,IAAIA;aACzB,QAAQ,GAAwB;aAChC,UAAU,GAAY;aACtB,QAAQ,GAAG;IAEuC;AA8Q5D"}
@@ -0,0 +1,60 @@
1
+ import './popup.css';
2
+ import { type G9ErrorPopupRequest } from '@g9tm/lynxcontrols-foundation';
3
+ import { type ReactNode } from '@lynx-js/react';
4
+ import { type G9HostHandle } from '../host/registry.js';
5
+ import { type G9PopupInputOptions, type G9PopupInputResult } from './input.js';
6
+ import { type G9PopupOutcome, G9PopupQueue } from './queue.js';
7
+ import { type G9PopupAnimationType, type G9PopupButton, type G9PopupDescriptor, type G9PopupResult, type G9PopupSettings, type G9PopupType } from './types.js';
8
+ /** Most buttons a `row` footer shows (MAUI); more are dropped with a warning. */
9
+ export declare const g9PopupRowButtonLimit = 3;
10
+ /** Options of `showConfirm` (MAUI `ShowConfirmAsync`). */
11
+ export interface G9ConfirmOptions {
12
+ readonly title?: string | null;
13
+ readonly okCallback?: ((context: {
14
+ readonly aborted: boolean;
15
+ }) => unknown) | null;
16
+ readonly cancelCallback?: ((context: {
17
+ readonly aborted: boolean;
18
+ }) => unknown) | null;
19
+ /** Default `'information'`; `'warning'` for a lossy confirm (sign out, discard). */
20
+ readonly type?: G9PopupType;
21
+ readonly okText?: string;
22
+ readonly cancelText?: string;
23
+ }
24
+ /** The popups of a host (MAUI `G9PopupHelper`). */
25
+ export interface G9PopupService {
26
+ /** Information popup (MAUI `ShowG9PopupAsync`); resolves the result of the button that closed it. */
27
+ show(message: string, title?: string | null, buttons?: ReadonlyArray<G9PopupButton> | null, settings?: G9PopupSettings | null, animation?: G9PopupAnimationType | null): Promise<G9PopupResult>;
28
+ showSuccess(message: string, title?: string | null, buttons?: ReadonlyArray<G9PopupButton> | null, settings?: G9PopupSettings | null, animation?: G9PopupAnimationType | null): Promise<G9PopupResult>;
29
+ showWarning(message: string, title?: string | null, buttons?: ReadonlyArray<G9PopupButton> | null, settings?: G9PopupSettings | null, animation?: G9PopupAnimationType | null): Promise<G9PopupResult>;
30
+ showError(message: string, title?: string | null, buttons?: ReadonlyArray<G9PopupButton> | null, settings?: G9PopupSettings | null, animation?: G9PopupAnimationType | null): Promise<G9PopupResult>;
31
+ /** Any content in the body (MAUI `ShowCustomG9PopupAsync`). */
32
+ showCustom(content: ReactNode | (() => ReactNode), title?: string | null, buttons?: ReadonlyArray<G9PopupButton> | null, settings?: G9PopupSettings | null, animation?: G9PopupAnimationType | null): Promise<G9PopupResult>;
33
+ /** Any descriptor; resolves how it ended. */
34
+ showDescriptor(descriptor: G9PopupDescriptor): Promise<G9PopupOutcome>;
35
+ /** A validated form (MAUI `ShowInputG9PopupAsync`). */
36
+ showInput(options: G9PopupInputOptions): Promise<G9PopupInputResult>;
37
+ /** OK/Cancel: `true` only for OK; every other exit is `false` (MAUI `ShowConfirmAsync`). */
38
+ showConfirm(message: string, options?: G9ConfirmOptions): Promise<boolean>;
39
+ /** Hardware back: `true` when a popup is on screen (closed unless `closeOnBackButton: false`). */
40
+ handleHardwareBack(): boolean;
41
+ /** Closes the popup on screen. */
42
+ closeActive(): void;
43
+ /** Drops waiting popups; the one on screen stays. */
44
+ clearQueue(): void;
45
+ /** Closes everything. */
46
+ dismissAll(): void;
47
+ readonly queue: G9PopupQueue;
48
+ }
49
+ /** The popup service of a host (created once as a host feature). */
50
+ export declare function popupServiceOf(host: G9HostHandle): G9PopupService;
51
+ /** The popups of the nearest `G9Host` (MAUI `G9PopupHelper`): one card at a time, FIFO, in the `popups` layer. */
52
+ export declare function useG9Popups(): G9PopupService;
53
+ /** The popups of the active host, for code outside components. Throws `host-missing` without a host. */
54
+ export declare function g9Popups(): G9PopupService;
55
+ /**
56
+ * The default error presenter (installed when this module loads): the executor's error popup as an error-type popup
57
+ * on the active host, with More details when diagnostics are available. Without a host it does nothing.
58
+ */
59
+ export declare function presentErrorPopup(request: G9ErrorPopupRequest): Promise<void> | undefined;
60
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/popup/service.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAgC,KAAK,mBAAmB,EAAe,MAAM,+BAA+B,CAAC;AACpH,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,gBAAgB,CAAC;AAMnG,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,kBAAkB,EAAsB,MAAM,SAAS,CAAC;AAEhG,OAAO,EAAqB,KAAK,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAGL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