@revolist/ui 4.0.4-rc → 4.0.4

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 (401) hide show
  1. package/MIGRATION.md +36 -0
  2. package/OWNERSHIP.md +36 -36
  3. package/README.md +65 -392
  4. package/_button.scss +6 -2
  5. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  6. package/_chunks/calculator-CDWOuAcp.js +4 -0
  7. package/_chunks/{calendar-xpZ0v3xf.js → calendar-BQYQLu8Q.js} +23 -23
  8. package/_chunks/{cell-visuals-E-2oEKHg.js → cell-visuals-r6DOOhGh.js} +7 -7
  9. package/_chunks/chart-frame-GprenwEg.js +145 -0
  10. package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
  11. package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
  12. package/_chunks/choice-chips-C5OxD0GV.js +126 -0
  13. package/_chunks/{color-palette-D8vyPfld.js → color-palette-7siNch__.js} +22 -24
  14. package/_chunks/color-picker-Cfc9eqZb.js +143 -0
  15. package/_chunks/{component-C_T2VN5u.js → component-C3k_8uIq.js} +290 -275
  16. package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-DlVkpW3h.js} +1 -9
  17. package/_chunks/configurator-actions-vRnI54mO.js +155 -0
  18. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  19. package/_chunks/control-BRfF5DWQ.js +118 -0
  20. package/_chunks/{controller-hRBm_Lfz.js → controller-BbiQuRt-.js} +5 -5
  21. package/_chunks/controls-B3EgM_DS.js +650 -0
  22. package/_chunks/{date-control-DrVFX13g.js → date-control-87dcA5br.js} +5 -5
  23. package/_chunks/{date-time-qIhp5vaX.js → date-time-CfiFYodx.js} +332 -293
  24. package/_chunks/{delete-button-CW9vjLnk.js → delete-button-jneO24wa.js} +1 -1
  25. package/_chunks/dialog.parts-NqEEVc9P.js +131 -0
  26. package/_chunks/{duration-CL68Em0o.js → duration-BGZ_qJ99.js} +10 -10
  27. package/_chunks/{editor-commit-Bq3wSgvr.js → editor-commit-Dyo-FMgD.js} +1 -1
  28. package/_chunks/editor-popup-NNP9Fh9U.js +82 -0
  29. package/_chunks/field-configurator-DPulsY3l.js +288 -0
  30. package/_chunks/{field-context-D57PnBbH.js → field-context-C4_WrO2z.js} +1 -1
  31. package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-D4I8HpVp.js} +2 -2
  32. package/_chunks/icon-toolbar-BAAdEvr9.js +134 -0
  33. package/_chunks/{icons-Ci5mADVc.js → icons-B4qN13Yj.js} +1 -1
  34. package/_chunks/{iso-B0YHBK7m.js → iso-CJQl2kmq.js} +1 -1
  35. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  36. package/_chunks/minus-BOAR3A1C.js +4 -0
  37. package/_chunks/{model-mPO2tG2f.js → model-CFrBgRHm.js} +3 -3
  38. package/_chunks/mount-C8CnIW9k.js +267 -0
  39. package/_chunks/{native.view-ByyZ1CT5.js → native-CJm3eq3-.js} +1 -1
  40. package/_chunks/native-control-um1L1wgZ.js +649 -0
  41. package/_chunks/{number-input-BKwA5FnM.js → number-input-CKiA4d1N.js} +9 -9
  42. package/_chunks/{picker-h1P5RUgp.js → picker-igNshTRC.js} +5 -5
  43. package/_chunks/plus-CbGRkIGl.js +4 -0
  44. package/_chunks/{popup-CT2uD3go.js → popup-DECYM9FI.js} +116 -105
  45. package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-CepVfGUq.js} +2 -2
  46. package/_chunks/{render-m5eMMwFR.js → render-bTk3curw.js} +2 -2
  47. package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B4w3aARt.js} +2 -2
  48. package/_chunks/request-trail-B1zVRPEf.js +762 -0
  49. package/_chunks/rich-text-Ci4d6dHn.js +842 -0
  50. package/_chunks/rotate-left-BF6G883o.js +4 -0
  51. package/_chunks/selection-list-tooltips-m00U3L6z.js +42 -0
  52. package/_chunks/title-tooltip-ncldbUwS.js +11 -0
  53. package/_chunks/tooltip-h-Z8yFBY.js +54 -0
  54. package/_chunks/tooltip-owner-BYho-vJl.js +19 -0
  55. package/_chunks/tooltip-session-CBtRMBPr.js +110 -0
  56. package/_chunks/tooltip-text-BN5WdGHn.js +12 -0
  57. package/_chunks/top-layer-popup-CKJ7VJOF.js +59 -0
  58. package/_dialog.scss +57 -22
  59. package/_form.scss +71 -21
  60. package/_legend.scss +25 -7
  61. package/_variables.scss +34 -32
  62. package/_view-switcher.scss +6 -0
  63. package/activity-message.d.ts +1 -1
  64. package/activity-message.js +1 -1
  65. package/ai/_chat.scss +35 -3
  66. package/ai/_style.scss +76 -16
  67. package/ai/chat.d.ts +3 -1
  68. package/ai/components.d.ts +16 -3
  69. package/ai/index.d.ts +1 -0
  70. package/ai/index.js +3 -3
  71. package/ai/mount.d.ts +30 -6
  72. package/ai/request-trail.d.ts +9 -3
  73. package/ai/results/_style.scss +83 -0
  74. package/ai/results/index.d.ts +11 -0
  75. package/ai/results/metrics.d.ts +5 -0
  76. package/ai/results/table.d.ts +5 -0
  77. package/ai/results/text.d.ts +5 -0
  78. package/ai/results/types.d.ts +29 -0
  79. package/ai/transcript.d.ts +2 -0
  80. package/ai/translations.d.ts +1 -1
  81. package/angular/angular.d.ts +1 -1
  82. package/angular/angular.js +13 -7
  83. package/assignee/assignee.scss +28 -6
  84. package/assignee/index.js +6 -6
  85. package/avatar/avatar.style.scss +23 -6
  86. package/avatar/index.d.ts +25 -2
  87. package/avatar/index.js +33 -32
  88. package/badge.d.ts +1 -1
  89. package/badge.js +1 -1
  90. package/badge.view.d.ts +8 -0
  91. package/brush-range/_brush-range.scss +55 -49
  92. package/brush-range/component.d.ts +1 -3
  93. package/brush-range/component.js +28 -28
  94. package/buttons/delete-button.js +1 -1
  95. package/buttons/delete-button.style.scss +6 -2
  96. package/buttons/remove-button.d.ts +1 -1
  97. package/buttons/remove-button.js +2 -2
  98. package/buttons/remove-button.style.scss +1 -1
  99. package/buttons/svg-button.d.ts +1 -1
  100. package/buttons/svg-button.js +17 -17
  101. package/calendar/_calendar.scss +21 -25
  102. package/calendar/calendar.js +1 -1
  103. package/calendar/day.js +2 -2
  104. package/calendar/header.js +2 -3
  105. package/calendar/index.js +3 -3
  106. package/calendar/model.js +1 -1
  107. package/calendar/month-grid.js +2 -2
  108. package/calendar/translations.js +1 -1
  109. package/calendar/year-grid.js +2 -2
  110. package/cell-input.js +1 -1
  111. package/cell-input.scss +3 -7
  112. package/cell-visuals/badge.style.scss +6 -3
  113. package/cell-visuals/bar-chart.style.scss +2 -1
  114. package/cell-visuals/column-type.style.css +12 -0
  115. package/cell-visuals/index.js +1 -1
  116. package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
  117. package/cell-visuals/progress-line.style.scss +1 -4
  118. package/cell-visuals/sparkline.style.scss +2 -1
  119. package/cell-visuals/timeline.style.css +4 -2
  120. package/checkbox/checkbox.scss +6 -24
  121. package/checkbox/index.js +1 -1
  122. package/choice-chips/index.d.ts +3 -1
  123. package/choice-chips/index.js +1 -1
  124. package/color-palette/built-in-palettes.js +1 -1
  125. package/color-palette/chart-palettes.js +1 -1
  126. package/color-palette/color-palette.js +1 -1
  127. package/color-palette/color-palette.style.scss +88 -25
  128. package/color-palette/color-picker.constants.js +1 -1
  129. package/color-palette/color-picker.js +2 -2
  130. package/color-palette/color-picker.style.scss +23 -10
  131. package/color-palette/common-palettes.d.ts +1 -1
  132. package/color-palette/common-palettes.js +2 -2
  133. package/color-palette/gantt-palettes.js +1 -1
  134. package/color-palette/native.d.ts +15 -2
  135. package/color-palette/palette.js +1 -1
  136. package/color-palette/pivot-palettes.js +1 -1
  137. package/color-palette/platform-palettes.js +1 -1
  138. package/color-palette/pro-palettes.js +1 -1
  139. package/color-palette/scheduler-palettes.js +1 -1
  140. package/component-catalog.d.ts +9 -7
  141. package/configurator-actions.d.ts +67 -0
  142. package/configurator-actions.js +1 -0
  143. package/configurator-aggregation-list.d.ts +14 -0
  144. package/configurator-aggregation-list.js +63 -0
  145. package/configurator-drop-zone.d.ts +39 -0
  146. package/configurator-drop-zone.js +66 -0
  147. package/configurator-field-icon.d.ts +10 -0
  148. package/configurator-field-icon.js +1 -0
  149. package/configurator-focus.d.ts +4 -0
  150. package/configurator-focus.js +39 -0
  151. package/configurator-sections.d.ts +42 -0
  152. package/configurator-sections.js +71 -0
  153. package/control-attributes.js +1 -1
  154. package/control-presentation.d.ts +8 -2
  155. package/control-presentation.js +25 -20
  156. package/controls.d.ts +12 -2
  157. package/controls.js +4 -3
  158. package/core/anchored-popover.js +1 -1
  159. package/core/control-id.js +1 -1
  160. package/core/editor-popup-position.d.ts +6 -2
  161. package/core/editor-popup.d.ts +4 -0
  162. package/core/editor-popup.js +1 -1
  163. package/core/motion.js +1 -1
  164. package/core/popover-controller.d.ts +35 -0
  165. package/core/popover-controller.js +102 -0
  166. package/core/popup-ownership.d.ts +2 -0
  167. package/core/selection-list-tooltips.d.ts +2 -0
  168. package/core/title-tooltip.d.ts +2 -0
  169. package/core/tooltip-session.d.ts +29 -0
  170. package/core/tooltip-surface.d.ts +13 -0
  171. package/core/tooltip-text.d.ts +6 -0
  172. package/core/tooltip.d.ts +35 -0
  173. package/core/top-layer-popup.d.ts +4 -0
  174. package/core/top-layer-popup.js +1 -23
  175. package/date-time/attach.d.ts +1 -1
  176. package/date-time/date-control.d.ts +1 -1
  177. package/date-time/field.d.ts +4 -2
  178. package/date-time/index.js +1 -1
  179. package/date-time/style.scss +239 -36
  180. package/date-time/time-selection.d.ts +3 -1
  181. package/date-time/types.d.ts +5 -1
  182. package/dialog/dialog-action-footer.d.ts +17 -2
  183. package/dialog/dialog.dom.d.ts +15 -2
  184. package/dialog/dialog.dom.js +9 -9
  185. package/dialog/dialog.drag.js +1 -1
  186. package/dialog/dialog.parts.d.ts +1 -1
  187. package/dialog/dialog.parts.js +1 -1
  188. package/dialog/dialog.preact.js +1 -1
  189. package/distribution-chart/_distribution-chart.scss +113 -77
  190. package/distribution-chart/area-chart.js +2 -2
  191. package/distribution-chart/bar-chart.js +2 -2
  192. package/distribution-chart/chart-frame.d.ts +1 -1
  193. package/distribution-chart/index.d.ts +1 -1
  194. package/distribution-chart/index.js +1 -1
  195. package/distribution-chart/line-chart.js +2 -2
  196. package/dropdown/content.js +1 -1
  197. package/dropdown/control.js +1 -1
  198. package/dropdown/dropdown.service.js +1 -1
  199. package/dropdown/dropdown.types.d.ts +1 -1
  200. package/dropdown/editor-dropdown.style.scss +19 -9
  201. package/dropdown/index.js +2 -2
  202. package/dropdown/lookup-field.d.ts +5 -0
  203. package/dropdown/lookup-field.js +4 -3
  204. package/dropdown/popup.d.ts +2 -2
  205. package/dropdown/popup.js +1 -1
  206. package/duration/index.js +1 -1
  207. package/editor-actions.js +2 -2
  208. package/editor-layout/index.d.ts +4 -4
  209. package/editor-layout/index.js +40 -35
  210. package/editor-layout/style.scss +82 -18
  211. package/favicon.svg +9 -0
  212. package/field-configurator.d.ts +39 -1
  213. package/field-configurator.js +4 -170
  214. package/field-expansion.d.ts +9 -0
  215. package/field-reorder.hook.js +1 -1
  216. package/field-reorder.js +1 -1
  217. package/filter/filters/slider/_single-slider.scss +57 -38
  218. package/filter/filters/slider/_slider.scss +41 -33
  219. package/filter/filters/slider/component.js +1 -1
  220. package/filter/filters/slider/control.js +3 -1
  221. package/filter/filters/slider/inputs.js +1 -1
  222. package/filter/filters/slider/logic.js +1 -1
  223. package/filter/filters/slider/preact.js +1 -1
  224. package/filter/filters/slider/runtime.js +50 -23
  225. package/filter/filters/slider/single.js +2 -2
  226. package/filter-badge.js +2 -2
  227. package/filter-controls.d.ts +0 -1
  228. package/filter-controls.js +6 -7
  229. package/form-controls/index.d.ts +10 -2
  230. package/form-controls/index.js +7 -7
  231. package/form-controls/presentation.d.ts +1 -1
  232. package/form-controls/presentation.js +13 -13
  233. package/formatting/index.d.ts +1 -1
  234. package/formatting/index.js +26 -25
  235. package/formatting/styles.scss +14 -57
  236. package/framework.js +228 -225
  237. package/history-controls.js +27 -1
  238. package/html-controls.js +1 -1
  239. package/icon-toolbar.d.ts +62 -0
  240. package/icon-toolbar.js +1 -0
  241. package/icons/icon.d.ts +1 -1
  242. package/icons/icon.js +1 -1
  243. package/legend.d.ts +1 -1
  244. package/legend.js +1 -1
  245. package/masked-input/index.js +4 -4
  246. package/native-control.d.ts +1 -2
  247. package/native-control.js +1 -1
  248. package/native-controls.d.ts +54 -2
  249. package/native-styles.css +1 -1
  250. package/native-styles.scss +6 -2
  251. package/native.d.ts +3 -3
  252. package/native.js +48 -45
  253. package/number-input/index.d.ts +1 -1
  254. package/number-input/index.js +1 -1
  255. package/package.json +84 -1
  256. package/pagination.js +12 -12
  257. package/pdf-viewer/controller.js +1 -1
  258. package/pdf-viewer/header.d.ts +1 -1
  259. package/pdf-viewer/index.d.ts +2 -2
  260. package/pdf-viewer/index.js +3 -3
  261. package/pdf-viewer/search-bar.d.ts +1 -1
  262. package/pdf-viewer/status.d.ts +1 -1
  263. package/pdf-viewer/style.scss +203 -42
  264. package/pickers.d.ts +5 -1
  265. package/preact-mount.js +1 -1
  266. package/preact.d.ts +13 -10
  267. package/preact.js +109 -64
  268. package/progress/_bar.scss +9 -3
  269. package/progress/_circular.scss +2 -1
  270. package/progress/bar.js +1 -1
  271. package/progress/circular.js +1 -1
  272. package/progress/range.js +1 -1
  273. package/rating-choice.js +1 -1
  274. package/react-adapter.d.ts +4 -2
  275. package/react-control.d.ts +2 -0
  276. package/react-control.js +3 -3
  277. package/react.d.ts +7 -8
  278. package/react.js +69 -68
  279. package/reorder-list.d.ts +1 -1
  280. package/reorder-list.js +1 -1
  281. package/reorder-list.scss +59 -17
  282. package/resource-picker/resource-picker-avatar.js +1 -1
  283. package/resource-picker/resource-picker-option.js +1 -1
  284. package/resource-picker/resource-picker-popup.js +2 -2
  285. package/resource-picker/resource-picker.js +75 -73
  286. package/resource-picker/resource-picker.scss +62 -34
  287. package/resource-picker/resource-picker.utils.js +1 -1
  288. package/rich-text/engine.d.ts +1 -0
  289. package/rich-text/format-html.d.ts +2 -0
  290. package/rich-text/index.d.ts +4 -0
  291. package/rich-text/index.js +1 -1
  292. package/rich-text/model.d.ts +2 -0
  293. package/rich-text/style.scss +293 -44
  294. package/rich-text/syntax.d.ts +5 -0
  295. package/rich-text/toolbar.d.ts +1 -1
  296. package/rich-text/translations.d.ts +2 -0
  297. package/robots.txt +4 -0
  298. package/search-input/index.js +2 -2
  299. package/search-input/native.d.ts +21 -2
  300. package/segmented-switch/index.js +1 -1
  301. package/select.d.ts +3 -1
  302. package/select.js +1 -1
  303. package/selection-list.d.ts +1 -0
  304. package/selection-list.js +3 -1
  305. package/status-feedback/badge.js +2 -2
  306. package/status-feedback/exit-snapshot.js +5 -5
  307. package/status-feedback/header.js +2 -2
  308. package/status-feedback/icons.js +1 -1
  309. package/status-feedback/index.js +1 -1
  310. package/status-feedback/item.js +2 -2
  311. package/status-feedback/motion.js +1 -1
  312. package/status-feedback/placement.js +1 -1
  313. package/status-feedback/popover.js +5 -5
  314. package/status-feedback/render.js +1 -1
  315. package/status-feedback/status-feedback.scss +124 -35
  316. package/styles/_activity-message.scss +24 -7
  317. package/styles/_alert.scss +78 -17
  318. package/styles/_cell-editor-frame.scss +11 -0
  319. package/styles/_compositions.scss +400 -80
  320. package/styles/_control.scss +30 -8
  321. package/styles/_disclosure.scss +15 -5
  322. package/styles/_editor-counter.scss +16 -6
  323. package/styles/_editor-slider.scss +8 -4
  324. package/styles/_field-configurator.scss +321 -23
  325. package/styles/_fields-grid.scss +49 -0
  326. package/styles/_filter-controls.scss +10 -2
  327. package/styles/_icon-action.scss +48 -15
  328. package/styles/_loading.scss +12 -3
  329. package/styles/_motion.scss +32 -9
  330. package/styles/_palette.scss +0 -24
  331. package/styles/_primitives.scss +369 -110
  332. package/styles/_theme.scss +130 -86
  333. package/styles/_thresholds.scss +28 -25
  334. package/styles/_time-grid.scss +8 -3
  335. package/styles/_tokens.scss +6 -1
  336. package/styles/color-roles.js +1 -1
  337. package/styles/configurator-actions.scss +241 -0
  338. package/styles/pagination.css +213 -0
  339. package/styles/{legacy-rating.css → rating.css} +8 -3
  340. package/styles.css +1 -1
  341. package/styles.scss +3 -5
  342. package/surfaces.d.ts +38 -2
  343. package/surfaces.js +37 -134
  344. package/svelte/UiComponent.svelte +44 -11
  345. package/svelte-control.js +1 -1
  346. package/svelte.d.ts +1 -1
  347. package/svelte.js +5 -5
  348. package/switch/index.js +16 -15
  349. package/time-grid.d.ts +0 -1
  350. package/time-grid.js +39 -38
  351. package/timeline-track/_style.scss +96 -24
  352. package/timeline-track/index.js +3 -3
  353. package/timeline-track/model.js +1 -1
  354. package/ui.css +1 -1
  355. package/view-switcher.d.ts +23 -0
  356. package/vue-badge.js +1 -1
  357. package/vue-control.js +1 -1
  358. package/vue-segmented-switch.js +1 -1
  359. package/vue.d.ts +29 -32
  360. package/vue.js +118 -123
  361. package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
  362. package/_chunks/choice-chips-CHQTUdLs.js +0 -110
  363. package/_chunks/color-picker-CudqPYZo.js +0 -138
  364. package/_chunks/control-AHKXD5Eu.js +0 -93
  365. package/_chunks/control-tooltip-uscKfAnV.js +0 -100
  366. package/_chunks/controls-DsNi8V8I.js +0 -630
  367. package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
  368. package/_chunks/editor-popup-WDdtVDNA.js +0 -81
  369. package/_chunks/history-controls-B3u3INEK.js +0 -27
  370. package/_chunks/mount-DQ1cpppK.js +0 -257
  371. package/_chunks/native-control-C_yok8_-.js +0 -605
  372. package/_chunks/request-trail-DSlFix6i.js +0 -618
  373. package/_chunks/rich-text-CH7gIqOS.js +0 -636
  374. package/_shared/data-query/binding.d.ts +0 -30
  375. package/_shared/data-query/blocks.d.ts +0 -30
  376. package/_shared/data-query/commands.d.ts +0 -47
  377. package/_shared/data-query/contracts.d.ts +0 -106
  378. package/_shared/data-query/cursor-reader.d.ts +0 -25
  379. package/_shared/data-query/direct-binding.d.ts +0 -3
  380. package/_shared/data-query/index.d.ts +0 -23
  381. package/_shared/data-query/infinite-binding.d.ts +0 -18
  382. package/_shared/data-query/keys.d.ts +0 -9
  383. package/_shared/data-query/limiter.d.ts +0 -12
  384. package/_shared/data-query/load-options.d.ts +0 -25
  385. package/_shared/data-query/materialize.d.ts +0 -2
  386. package/_shared/data-query/policy.d.ts +0 -14
  387. package/_shared/data-query/provider-queries.d.ts +0 -22
  388. package/_shared/data-query/reader.d.ts +0 -23
  389. package/_shared/data-query/remote-load.d.ts +0 -7
  390. package/_shared/data-query/source.d.ts +0 -40
  391. package/avatar/index.view.d.ts +0 -25
  392. package/color-palette/native.view.d.ts +0 -15
  393. package/control-presentation.view.d.ts +0 -8
  394. package/dialog/dialog-action-footer.view.d.ts +0 -20
  395. package/dialog/dialog.dom.view.d.ts +0 -15
  396. package/form-controls/index.view.d.ts +0 -10
  397. package/formatting/control-tooltip.d.ts +0 -27
  398. package/native-controls.view.d.ts +0 -54
  399. package/search-input/native.view.d.ts +0 -21
  400. package/styles/legacy-pagination.css +0 -112
  401. package/surfaces.view.d.ts +0 -63
@@ -0,0 +1,10 @@
1
+ export interface ConfiguratorFieldMetadata {
2
+ columnType?: string;
3
+ dataType?: 'string' | 'number' | 'date' | 'boolean';
4
+ }
5
+ /** Shared descriptive field identity; never infers or formats source values. */
6
+ export declare function resolveConfiguratorFieldIcon(dimension?: ConfiguratorFieldMetadata): {
7
+ kind: string;
8
+ svg: string;
9
+ label: string;
10
+ };
@@ -0,0 +1 @@
1
+ export { t as resolveConfiguratorFieldIcon } from "./_chunks/configurator-field-icon-CmcM_sPs.js";
@@ -0,0 +1,4 @@
1
+ /** Return focus only from this editor. Release a temporary tab stop on blur or disposal. */
2
+ export declare function focusConfiguratorOrigin(origin: HTMLElement, root: HTMLElement | null): () => void;
3
+ /** A single mounted owner's lease; synchronous focus callbacks cannot revive a disposed lease. */
4
+ export declare function useConfiguratorOriginFocus(): (origin: HTMLElement, root: HTMLElement | null) => void;
@@ -0,0 +1,39 @@
1
+ import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
2
+ //#region package/configurator-focus.ts
3
+ var n = () => {};
4
+ function r(e, t) {
5
+ if (!e.isConnected || !t?.isConnected || e.ownerDocument !== t.ownerDocument) return !1;
6
+ let n = e.ownerDocument.activeElement;
7
+ return !n || n === e.ownerDocument.body || n === e || t.contains(n);
8
+ }
9
+ function i(e, t) {
10
+ if (!r(e, t)) return n;
11
+ let i = e.ownerDocument, a = i.activeElement;
12
+ if (e.focus({ preventScroll: !0 }), i.activeElement === e || e.hasAttribute("tabindex") || !e.isConnected || !t.isConnected || i.activeElement !== a && i.activeElement !== i.body) return n;
13
+ let o = !0, s = () => {
14
+ o && (o = !1, e.removeEventListener("blur", s), e.getAttribute("tabindex") === "-1" && e.removeAttribute("tabindex"));
15
+ };
16
+ e.setAttribute("tabindex", "-1"), e.addEventListener("blur", s);
17
+ try {
18
+ e.focus({ preventScroll: !0 }), (i.activeElement !== e || !e.isConnected || !t.isConnected) && s();
19
+ } catch (e) {
20
+ throw s(), e;
21
+ }
22
+ return s;
23
+ }
24
+ function a() {
25
+ let a = t(n), o = t(0), s = t(!0);
26
+ return e(() => (s.current = !0, () => {
27
+ s.current = !1, o.current++;
28
+ let e = a.current;
29
+ a.current = n, e();
30
+ }), []), (e, t) => {
31
+ if (!s.current || !r(e, t)) return;
32
+ let c = ++o.current, l = a.current;
33
+ if (a.current = n, l(), !s.current || c !== o.current) return;
34
+ let u = i(e, t);
35
+ !s.current || c !== o.current ? u() : a.current = u;
36
+ };
37
+ }
38
+ //#endregion
39
+ export { i as focusConfiguratorOrigin, a as useConfiguratorOriginFocus };
@@ -0,0 +1,42 @@
1
+ import { h, ComponentChildren } from './_vendor/preact/src/index';
2
+ /** Application-owned content. Return cleanup when mounting another framework or UI. */
3
+ export interface ConfiguratorSection {
4
+ id: string;
5
+ label: string;
6
+ hidden?: boolean;
7
+ disabled?: boolean;
8
+ render?: () => ComponentChildren;
9
+ mount?: (host: HTMLElement) => void | (() => void);
10
+ }
11
+ export interface ConfiguratorSectionsConfig {
12
+ /** Custom tabs appended after the built-in tabs. IDs must be unique and cannot replace built-ins. */
13
+ sections?: readonly ConfiguratorSection[];
14
+ initialSection?: string;
15
+ onSectionChange?: (id: string) => void;
16
+ }
17
+ /** Selection follows current availability, without discarding mounted editor drafts. */
18
+ export declare function useConfiguratorSections(config: ConfiguratorSectionsConfig, builtins: readonly ConfiguratorSection[], disabled?: boolean): {
19
+ sections: ConfiguratorSection[];
20
+ custom: ConfiguratorSection[];
21
+ active: string | undefined;
22
+ select: (id: string) => void;
23
+ };
24
+ /** Shared switch spacing and opaque sticky backdrop for every configurator. */
25
+ export declare function ConfiguratorHeader({ children, className, }: {
26
+ children?: ComponentChildren;
27
+ className?: string;
28
+ }): h.JSX.Element;
29
+ export declare function ConfiguratorSectionTabs({ sections, active, onChange, prefix, label, className, }: {
30
+ sections: readonly ConfiguratorSection[];
31
+ active?: string;
32
+ onChange: (id: string) => void;
33
+ prefix: string;
34
+ label: string;
35
+ className?: string;
36
+ }): h.JSX.Element;
37
+ /** Inactive sections retain chat transcripts and host drafts until removed. */
38
+ export declare function ConfiguratorSectionPanels({ sections, active, prefix, }: {
39
+ sections: readonly ConfiguratorSection[];
40
+ active?: string;
41
+ prefix: string;
42
+ }): h.JSX.Element;
@@ -0,0 +1,71 @@
1
+ import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
2
+ import { i as t, r as n, t as r } from "./_chunks/hooks.module-CG3gN83z.js";
3
+ import { t as i } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
4
+ import { SegmentedSwitch as a } from "./segmented-switch/index.js";
5
+ //#region package/configurator-sections.tsx
6
+ function o(e, n, r = !1) {
7
+ let i = new Set(n.map((e) => e.id)), a = (e.sections ?? []).filter((e) => !e.id || i.has(e.id) ? !1 : (i.add(e.id), !0)), o = [...n, ...a].filter((e) => !e.hidden).map((e) => r ? {
8
+ ...e,
9
+ disabled: !0
10
+ } : e), [s, c] = t(e.initialSection ?? n[0]?.id), l = o.find((e) => e.id === s && (r || !e.disabled))?.id ?? o.find((e) => !e.disabled)?.id ?? (r ? o[0]?.id : void 0);
11
+ return {
12
+ sections: o,
13
+ custom: o.filter((e) => !n.some((t) => t.id === e.id)),
14
+ active: l,
15
+ select: (t) => {
16
+ t !== l && o.some((e) => e.id === t && !e.disabled) && (c(t), e.onSectionChange?.(t));
17
+ }
18
+ };
19
+ }
20
+ function s({ children: e, className: t = "" }) {
21
+ return /* @__PURE__ */ i("header", {
22
+ className: `rv-configurator-header ${t}`,
23
+ children: e
24
+ });
25
+ }
26
+ function c({ sections: e, active: t, onChange: n, prefix: r, label: o, className: s = "" }) {
27
+ return /* @__PURE__ */ i(a, {
28
+ value: t ?? "",
29
+ ariaLabel: o,
30
+ role: "tablist",
31
+ className: `rv-configurator-section-tabs ${s}`,
32
+ options: e.map((e) => ({
33
+ value: e.id,
34
+ label: e.label,
35
+ disabled: e.disabled,
36
+ id: `${r}-tab-${e.id}`,
37
+ ariaControls: `${r}-panel-${e.id}`
38
+ })),
39
+ onChange: n
40
+ });
41
+ }
42
+ function l({ section: e }) {
43
+ let t = r(null);
44
+ return n(() => {
45
+ if (t.current && e.mount) return e.mount(t.current);
46
+ }, [e.mount]), /* @__PURE__ */ i("div", {
47
+ ref: t,
48
+ class: "rv-configurator-section-content",
49
+ children: e.render?.()
50
+ });
51
+ }
52
+ function u({ sections: t, active: n, prefix: r }) {
53
+ return /* @__PURE__ */ i(e, { children: t.map((e) => /* @__PURE__ */ i(d, {
54
+ section: e,
55
+ active: n === e.id,
56
+ prefix: r
57
+ }, e.id)) });
58
+ }
59
+ function d({ section: e, active: t, prefix: n }) {
60
+ let a = r(!1);
61
+ return t && (a.current = !0), /* @__PURE__ */ i("section", {
62
+ hidden: !t,
63
+ role: "tabpanel",
64
+ id: `${n}-panel-${e.id}`,
65
+ "aria-labelledby": `${n}-tab-${e.id}`,
66
+ class: "rv-configurator-custom-section",
67
+ children: a.current && /* @__PURE__ */ i(l, { section: e })
68
+ });
69
+ }
70
+ //#endregion
71
+ export { s as ConfiguratorHeader, u as ConfiguratorSectionPanels, c as ConfiguratorSectionTabs, o as useConfiguratorSections };
@@ -1,4 +1,4 @@
1
- //#region src/control-attributes.ts
1
+ //#region package/control-attributes.ts
2
2
  function e(...e) {
3
3
  e = e.map((e) => e && typeof e == "object" && "value" in e && "subscribe" in e ? e.value : e);
4
4
  let t = e.flatMap((e) => typeof e == "string" ? e.split(/\s+/) : e && typeof e == "object" ? Object.entries(e).filter(([, e]) => e).map(([e]) => e) : []);
@@ -1,2 +1,8 @@
1
- /** Compatibility entry; markup is owned by the Preact TSX implementation. */
2
- export * from './control-presentation.view';
1
+ import { ControlTag, ControlAttributes } from './control-attributes';
2
+ export * from './control-attributes';
3
+ export declare function renderControl<H extends (...args: any[]) => any>(h: H, tag: ControlTag, attributes?: ControlAttributes | null, ...children: any[]): ReturnType<H>;
4
+ export declare function createControl<K extends ControlTag>(document: Document, tag: K, attributes?: ControlAttributes): HTMLElementTagNameMap[K];
5
+ export declare function registerControl<T extends object>(component: T, tag: ControlTag): T;
6
+ export declare function nativeControlTag(type: unknown): string | undefined;
7
+ /** Decorate a native icon control after installing its trusted bundled SVG. */
8
+ export declare function decorateIconAction(element: HTMLElement, label: string): void;
@@ -1,36 +1,41 @@
1
1
  import { c as e } from "./_chunks/preact.module-BBM36DnO.js";
2
2
  import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
3
3
  import { createPreactElement as n } from "./preact-mount.js";
4
- import { controlAttributes as r, controlClassName as i } from "./control-attributes.js";
5
- //#region src/control-presentation.view.tsx
6
- function a(e, t, n, ...i) {
4
+ import { TooltipController as r } from "./core/popover-controller.js";
5
+ import { controlAttributes as i, controlClassName as a } from "./control-attributes.js";
6
+ //#region package/control-presentation.tsx
7
+ function o(e, t, n, ...r) {
7
8
  let a = n ?? {};
8
9
  if (t === "button" && a.busy === !0) {
9
- let n = i.length ? i : [a.children];
10
- return e(t, r(t, a), e("span", {
10
+ let n = r.length ? r : [a.children];
11
+ return e(t, i(t, a), e("span", {
11
12
  class: "rv-button-spinner",
12
13
  "aria-hidden": "true"
13
14
  }), ...n);
14
15
  }
15
- return e(t, r(t, a), ...i);
16
+ return e(t, i(t, a), ...r);
16
17
  }
17
- function o(t, r, i = {}) {
18
- let o = a(e, r, i);
19
- return i.onChange && !(r === "button" && i.busy) && Object.assign(o.props, { onChange: i.onChange }), n(t, o);
18
+ function s(t, r, i = {}) {
19
+ let a = o(e, r, i);
20
+ return i.onChange && !(r === "button" && i.busy) && Object.assign(a.props, { onChange: i.onChange }), n(t, a);
20
21
  }
21
- var s = /* @__PURE__ */ new WeakMap();
22
- function c(e, t) {
23
- return s.set(e, t), e;
22
+ var c = /* @__PURE__ */ new WeakMap();
23
+ function l(e, t) {
24
+ return c.set(e, t), e;
24
25
  }
25
- function l(e) {
26
- return typeof e == "string" ? e : e && (typeof e == "function" || typeof e == "object") ? s.get(e) : void 0;
26
+ function u(e) {
27
+ return typeof e == "string" ? e : e && (typeof e == "function" || typeof e == "object") ? c.get(e) : void 0;
27
28
  }
28
- function u(e, r) {
29
- e.classList.add("rv-btn", "rv-btn-ghost", "rv-btn-icon"), e.setAttribute("aria-label", r), e.title = r, e.querySelector(".rv-control-tooltip")?.remove(), e.append(n(e.ownerDocument, /* @__PURE__ */ t("span", {
29
+ var d = /* @__PURE__ */ new WeakMap();
30
+ function f(e, i) {
31
+ e.classList.add("rv-btn", "rv-btn-ghost", "rv-btn-icon"), e.setAttribute("aria-label", i), d.get(e)?.(), e.removeAttribute("title"), e.querySelector(".rv-control-tooltip")?.remove();
32
+ let a = n(e.ownerDocument, /* @__PURE__ */ t("span", {
30
33
  class: "rv-control-tooltip",
31
- "aria-hidden": "true",
32
- children: r
33
- })));
34
+ role: "tooltip",
35
+ hidden: !0,
36
+ children: i
37
+ }));
38
+ e.append(a), d.set(e, new r().bind(e, i, { surface: a }));
34
39
  }
35
40
  //#endregion
36
- export { r as controlAttributes, i as controlClassName, o as createControl, u as decorateIconAction, l as nativeControlTag, c as registerControl, a as renderControl };
41
+ export { i as controlAttributes, a as controlClassName, s as createControl, f as decorateIconAction, u as nativeControlTag, l as registerControl, o as renderControl };
package/controls.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { BadgeOptions } from './badge';
2
1
  import { h, ComponentChildren, JSX } from './_vendor/preact/src/index';
3
2
  import { SegmentedSwitchProps, SegmentedSwitchValue } from './segmented-switch';
4
3
  import { EditorPane, EditorSplitLayout } from './editor-layout';
@@ -106,7 +105,7 @@ export declare function Panel({ children, className, label }: ShellProps): h.JSX
106
105
  export declare function Toolbar({ children, className, label }: ShellProps): h.JSX.Element;
107
106
  export declare function ToolbarGroup({ children, className, label }: ShellProps): h.JSX.Element;
108
107
  export declare function ToolbarSeparator(): h.JSX.Element;
109
- export declare function Badge({ children, className, variant, shape, }: ShellProps & BadgeOptions): h.JSX.Element;
108
+ export { Badge } from './badge.view';
110
109
  export declare function CountBadge({ count, label }: {
111
110
  count: number;
112
111
  label: string;
@@ -134,6 +133,17 @@ export declare function Submenu({ label, children }: ShellProps & {
134
133
  label: string;
135
134
  }): h.JSX.Element;
136
135
  export declare function ResizeHandle(props: ResizeOptions): h.JSX.Element;
136
+ export interface PanelResizeHandleProps extends Omit<ResizeOptions, 'value' | 'direction'> {
137
+ edge: 'left' | 'right';
138
+ initialWidth: number;
139
+ anchorRef?: {
140
+ current: HTMLDivElement | null;
141
+ };
142
+ /** Measure the outer host when it owns the resized width. */
143
+ resizeParent?: boolean;
144
+ }
145
+ /** Measures the containing panel and places a width control on its physical edge. */
146
+ export declare function PanelResizeHandle({ edge, initialWidth, anchorRef, resizeParent, max, ...props }: PanelResizeHandleProps): h.JSX.Element;
137
147
  export type PaginationDirection = 'first' | 'previous' | 'next' | 'last';
138
148
  export type PaginationButtonOptions = Pick<ButtonProps, 'disabled' | 'variant' | 'className' | 'title'>;
139
149
  export interface PaginationProps {
package/controls.js CHANGED
@@ -1,3 +1,4 @@
1
- import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L } from "./_chunks/controls-DsNi8V8I.js";
2
- import { EditorList as R, EditorListGroup as z, EditorListItem as B, EditorListItemContent as V, EditorPane as H, EditorSplitLayout as U } from "./editor-layout/index.js";
3
- export { d as Alert, M as Badge, D as Button, A as ButtonGroup, S as Chip, h as CircularProgress, O as CountBadge, j as DateInput, _ as DateTimeInput, T as Disclosure, N as EmptyState, v as FieldError, y as FieldHint, k as FormSection, E as IconButton, R as Listbox, z as ListboxGroup, B as ListboxOption, V as ListboxOptionContent, x as LoadingOverlay, b as Menu, m as MenuItem, P as MenuSeparator, L as NumberInput, g as NumberStepper, I as Pagination, H as Pane, f as Panel, t as RadioGroup, F as Rating, p as ResizeHandle, r as SegmentedControl, n as Spinner, U as SplitLayout, l as Submenu, w as TabPanel, e as Tabs, C as TextInput, s as Textarea, c as TimeInput, u as ToggleButton, i as Toolbar, a as ToolbarGroup, o as ToolbarSeparator };
1
+ import { t as e } from "./_chunks/selection-list-tooltips-m00U3L6z.js";
2
+ import { A as t, B as n, C as r, D as i, E as a, F as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z } from "./_chunks/controls-B3EgM_DS.js";
3
+ import { EditorList as B, EditorListGroup as V, EditorListItem as H, EditorListItemContent as U, EditorPane as W, EditorSplitLayout as G } from "./editor-layout/index.js";
4
+ export { p as Alert, n as Badge, P as Button, k as ButtonGroup, M as Chip, w as CircularProgress, _ as CountBadge, A as DateInput, N as DateTimeInput, y as Disclosure, D as EmptyState, F as FieldError, b as FieldHint, x as FormSection, j as IconButton, B as Listbox, V as ListboxGroup, H as ListboxOption, U as ListboxOptionContent, O as LoadingOverlay, C as Menu, S as MenuItem, g as MenuSeparator, I as NumberInput, z as NumberStepper, v as Pagination, W as Pane, R as Panel, m as PanelResizeHandle, r as RadioGroup, L as Rating, h as ResizeHandle, a as SegmentedControl, i as Spinner, G as SplitLayout, d as Submenu, E as TabPanel, t as Tabs, T as TextInput, l as Textarea, u as TimeInput, f as ToggleButton, o as Toolbar, s as ToolbarGroup, c as ToolbarSeparator, e as useSelectionListTooltips };
@@ -1,4 +1,4 @@
1
- //#region src/core/anchored-popover.ts
1
+ //#region package/core/anchored-popover.ts
2
2
  function e(e, t, n, r = 4, i = 8) {
3
3
  let a = e.bottom + r, o = e.top - t.height - r, s = a + t.height <= n.height - i || o < i ? "below" : "above", c = e.left, l = e.right - t.width, u = c + t.width <= n.width - i || l < i ? "left" : "right";
4
4
  return {
@@ -1,4 +1,4 @@
1
- //#region src/core/control-id.ts
1
+ //#region package/core/control-id.ts
2
2
  function e(e = "rv-control") {
3
3
  return `${e}-${globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}`;
4
4
  }
@@ -1,8 +1,12 @@
1
- /** Keep the owning field visible, scrolling the popup on the roomier side when necessary. */
1
+ /** Prefer keeping the field visible, with an optional viewport fit for larger editors. */
2
2
  export declare function calculateEditorPopupPosition(anchor: Pick<DOMRect, 'left' | 'right' | 'top' | 'bottom'>, popup: Pick<DOMRect, 'width' | 'height'>, viewport: {
3
3
  width: number;
4
4
  height: number;
5
- }, gap?: number, inset?: number): {
5
+ }, { gap, inset, fitViewport }?: {
6
+ gap?: number | undefined;
7
+ inset?: number | undefined;
8
+ fitViewport?: boolean | undefined;
9
+ }): {
6
10
  placementY: string;
7
11
  maxHeight: number;
8
12
  top: number;
@@ -6,6 +6,10 @@ export interface EditorPopupHandle {
6
6
  export interface EditorPopupOptions {
7
7
  label: string;
8
8
  className?: string;
9
+ /** Allow overlap with the anchor when the popup needs more vertical room. */
10
+ fitViewport?: boolean;
11
+ /** A separate trigger can toggle the popup without applying the draft. */
12
+ trigger?: HTMLElement;
9
13
  onClose?: () => void;
10
14
  isAvailable?: () => boolean;
11
15
  }
@@ -1 +1 @@
1
- export { t as mountEditorPopup } from "../_chunks/editor-popup-WDdtVDNA.js";
1
+ export { t as mountEditorPopup } from "../_chunks/editor-popup-NNP9Fh9U.js";
package/core/motion.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/core/motion.ts
1
+ //#region package/core/motion.ts
2
2
  function e(e) {
3
3
  let t = [];
4
4
  for (let n = e; n;) {
@@ -0,0 +1,35 @@
1
+ export interface PopoverOptions {
2
+ anchor: HTMLElement | SVGElement;
3
+ placement?: 'above';
4
+ content: HTMLElement;
5
+ /** Defaults to the document body. */
6
+ appendTo?: HTMLElement;
7
+ onClose?: () => void;
8
+ restoreFocus?: boolean;
9
+ closeOnOutside?: boolean;
10
+ closeOnEscape?: boolean;
11
+ display?: string;
12
+ }
13
+ /** One owner for native top-layer promotion, viewport positioning and disposal. */
14
+ export declare class PopoverController {
15
+ private active?;
16
+ get isOpen(): boolean;
17
+ open(options: PopoverOptions): {
18
+ close: (restoreFocus?: boolean) => void;
19
+ refresh: () => void;
20
+ };
21
+ refresh(): void;
22
+ close(restoreFocus?: boolean): void;
23
+ destroy(): void;
24
+ }
25
+ export declare function createTooltipElement(document: Document, className?: string): HTMLDivElement;
26
+ /** Imperative binding adapter over the same session used by useTooltip. */
27
+ export declare class TooltipController {
28
+ private release?;
29
+ bind(anchor: HTMLElement | SVGElement, text: string, options?: {
30
+ trigger?: 'hover' | 'click';
31
+ surface?: HTMLElement;
32
+ onEscape?: () => void;
33
+ }): () => void;
34
+ destroy(): void;
35
+ }
@@ -0,0 +1,102 @@
1
+ import { calculateAnchoredPopoverPosition as e } from "./anchored-popover.js";
2
+ import { t } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
3
+ import { createPreactElement as n, releasePreactElement as r } from "../preact-mount.js";
4
+ import { o as i, r as a, t as o } from "../_chunks/top-layer-popup-CKJ7VJOF.js";
5
+ import { t as s } from "../_chunks/tooltip-session-CBtRMBPr.js";
6
+ import { createControlId as c } from "./control-id.js";
7
+ import { inheritUiMotion as l } from "./motion.js";
8
+ //#region package/core/popover-controller.tsx
9
+ var u = /* @__PURE__ */ new WeakMap(), d = class {
10
+ active;
11
+ get isOpen() {
12
+ return !!this.active;
13
+ }
14
+ open(t) {
15
+ this.close(!1);
16
+ let { anchor: n, content: r } = t, s = n.ownerDocument, c = s.defaultView, d = u.get(s) ?? [];
17
+ u.set(s, d);
18
+ let f = r.parentNode, p = r.nextSibling, m = r.hidden, h = r.getAttribute("style"), g = r.getAttribute("popover"), _ = l(n, r), v = () => {
19
+ if (!n.isConnected) {
20
+ x(!1);
21
+ return;
22
+ }
23
+ let a = (t.placement === "above" ? i : e)(n.getBoundingClientRect(), r.getBoundingClientRect(), {
24
+ width: s.documentElement.clientWidth || c?.innerWidth || 0,
25
+ height: s.documentElement.clientHeight || c?.innerHeight || 0
26
+ });
27
+ Object.assign(r.style, {
28
+ left: `${a.left}px`,
29
+ top: `${a.top}px`
30
+ });
31
+ }, y, b = !1, x = (e = t.restoreFocus !== !1) => {
32
+ if (b) return;
33
+ b = !0, s.removeEventListener("pointerdown", S, !0), r.removeEventListener("keydown", C), s.removeEventListener("keydown", C), c?.removeEventListener("resize", v), s.removeEventListener("scroll", v, !0), w?.disconnect();
34
+ let i = d.indexOf(r);
35
+ i !== -1 && d.splice(i, 1), o(r, y), _(), f?.isConnected ? f.insertBefore(r, p?.parentNode === f ? p : null) : r.remove(), h === null ? r.removeAttribute("style") : r.setAttribute("style", h), r.hidden = m, g === null ? r.removeAttribute("popover") : r.setAttribute("popover", g), this.active?.content === r && (this.active = void 0), e && n.isConnected && n.focus({ preventScroll: !0 }), t.onClose?.();
36
+ }, S = (e) => {
37
+ if (d.at(-1) !== r) return;
38
+ let i = e.composedPath();
39
+ t.closeOnOutside !== !1 && !i.includes(n) && !i.includes(r) && x(!1);
40
+ }, C = (e) => {
41
+ d.at(-1) === r && e.key === "Escape" && t.closeOnEscape !== !1 && !e.defaultPrevented && (e.preventDefault(), e.stopPropagation(), x());
42
+ };
43
+ (t.appendTo ?? s.body).append(r), r.hidden = !1, Object.assign(r.style, {
44
+ position: "fixed",
45
+ inset: "auto",
46
+ margin: "0"
47
+ }), y = a(r, t.display ?? "block");
48
+ let w = c?.ResizeObserver ? new c.ResizeObserver(v) : void 0;
49
+ return w?.observe(n), w?.observe(r), this.active = {
50
+ content: r,
51
+ close: x,
52
+ position: v
53
+ }, d.push(r), s.addEventListener("pointerdown", S, !0), r.addEventListener("keydown", C), s.addEventListener("keydown", C), c?.addEventListener("resize", v), s.addEventListener("scroll", v, !0), v(), {
54
+ close: x,
55
+ refresh: v
56
+ };
57
+ }
58
+ refresh() {
59
+ this.active?.position();
60
+ }
61
+ close(e) {
62
+ this.active?.close(e);
63
+ }
64
+ destroy() {
65
+ this.close(!1);
66
+ }
67
+ };
68
+ function f(e, r = "grid-tooltip") {
69
+ return n(e, /* @__PURE__ */ t("div", {
70
+ id: c("rv-tooltip"),
71
+ class: r,
72
+ role: "tooltip",
73
+ hidden: !0
74
+ }));
75
+ }
76
+ var p = class {
77
+ release;
78
+ bind(e, t, n = {}) {
79
+ this.destroy();
80
+ let i = n.surface ?? f(e.ownerDocument, "rv-tooltip");
81
+ i.textContent = t;
82
+ let a = new s();
83
+ a.setSurface(i), a.onEscape = n.onEscape;
84
+ let o = n.trigger === "click", c = e.getAttribute("aria-expanded");
85
+ o && e.setAttribute("aria-expanded", "false"), a.onHide = () => {
86
+ o && e.setAttribute("aria-expanded", "false");
87
+ };
88
+ let l = () => {
89
+ a.show(e), o && e.setAttribute("aria-expanded", String(a.isOpen));
90
+ }, u = () => a.isOpen ? a.hide() : l(), d = () => a.focus(e), p = () => a.blur(), m = () => a.leave(e), h = () => {
91
+ a.pointerDown(), a.hide();
92
+ }, g = (e) => a.keyDown(e);
93
+ return o ? e.addEventListener("click", u) : (e.addEventListener("pointerenter", l), e.addEventListener("pointerleave", m), e.addEventListener("focus", d), e.addEventListener("blur", p), e.addEventListener("pointerdown", h), e.addEventListener("keydown", g)), this.release = () => {
94
+ a.destroy(), e.removeEventListener("click", u), e.removeEventListener("pointerenter", l), e.removeEventListener("pointerleave", m), e.removeEventListener("focus", d), e.removeEventListener("blur", p), e.removeEventListener("pointerdown", h), e.removeEventListener("keydown", g), o && (c === null ? e.removeAttribute("aria-expanded") : e.setAttribute("aria-expanded", c)), n.surface || r(i);
95
+ }, () => this.destroy();
96
+ }
97
+ destroy() {
98
+ this.release?.(), this.release = void 0;
99
+ }
100
+ };
101
+ //#endregion
102
+ export { d as PopoverController, p as TooltipController, f as createTooltipElement };
@@ -0,0 +1,2 @@
1
+ /** Includes portalled descendants linked by their owning trigger's aria-controls. */
2
+ export declare function ownsPopupTarget(root: HTMLElement | null | undefined, target: Node | null): boolean;
@@ -0,0 +1,2 @@
1
+ /** One delegated binding per list, including options rendered by custom templates. */
2
+ export declare function useSelectionListTooltips(optionSelector?: string): (root: HTMLElement | null) => void;
@@ -0,0 +1,2 @@
1
+ /** Native title replacement, without wrappers or changes to consumer handlers. */
2
+ export declare function useTitleTooltip<T extends HTMLElement | SVGElement>(title?: string, onEscape?: () => void): import('../_vendor/preact/src/index').RefObject<T>;
@@ -0,0 +1,29 @@
1
+ export type TooltipAnchor = HTMLElement | SVGElement;
2
+ /** One lifecycle for declarative and imperative tooltip adapters. */
3
+ export declare class TooltipSession {
4
+ private anchor?;
5
+ private surface?;
6
+ private timer?;
7
+ private mode?;
8
+ private cleanup?;
9
+ private mounted;
10
+ private pointerFocus;
11
+ private open;
12
+ private addedDescription;
13
+ onHide?: () => void;
14
+ onEscape?: () => void;
15
+ delay: number;
16
+ get isOpen(): boolean;
17
+ get isPending(): boolean;
18
+ setSurface(surface: HTMLElement | null): void;
19
+ show(anchor: TooltipAnchor): void;
20
+ private present;
21
+ hide(): void;
22
+ focus(anchor: TooltipAnchor): void;
23
+ blur(): void;
24
+ pointerDown(): void;
25
+ leave(anchor?: TooltipAnchor): void;
26
+ keyDown(event: KeyboardEvent): void;
27
+ destroy(): void;
28
+ private listen;
29
+ }
@@ -0,0 +1,13 @@
1
+ /** Shared presentation for text hints and rich product/chart tooltip content. */
2
+ export declare const TOOLTIP_STYLES = "\n.rv-tooltip.rv-tooltip {\n box-sizing: border-box;\n position: fixed;\n z-index: 100000;\n margin: 0;\n inset: auto;\n transform: none;\n opacity: 1;\n visibility: visible;\n padding: 6px 10px;\n border: 0;\n border-radius: 6px;\n background: var(--rv-tooltip-bg, #191919);\n color: var(--rv-tooltip-fg, #fff);\n box-shadow: 0 4px 14px var(--rv-ui-shadow, rgb(0 0 0 / 18%));\n font: 12px/1.4 var(--rv-ui-font-family, Inter, ui-sans-serif, system-ui, sans-serif);\n font-weight: 400;\n text-align: start;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n max-width: min(360px, calc(100vw - 16px));\n max-height: calc(100dvh - 16px);\n overflow: auto;\n pointer-events: none;\n}\n.rv-tooltip[hidden], .rv-tooltip[data-visible=\"false\"] { display: none; }\n.rv-tooltip[data-overflow] { pointer-events: auto; }\n@media (forced-colors: active) {\n .rv-tooltip.rv-tooltip { color: CanvasText; background: Canvas; border: 1px solid CanvasText; }\n}\n";
3
+ /** Also installs into shadow roots/fullscreen roots used by standalone charts. */
4
+ export declare function ensureTooltipStyles(root: Document | ShadowRoot): void;
5
+ export declare function prepareTooltipSurface(element: HTMLElement): void;
6
+ /** Shared hint placement: centered above the trigger, with a bounded below fallback. */
7
+ export declare function calculateTooltipPosition(anchor: DOMRect, popup: DOMRect, viewport: {
8
+ width: number;
9
+ height: number;
10
+ }): import('./anchored-popover').AnchoredPopoverPosition | {
11
+ left: number;
12
+ top: number;
13
+ };
@@ -0,0 +1,6 @@
1
+ import { JSX } from '../_vendor/preact/src/index';
2
+ /** Wrapper-free shared hint for otherwise native text and label elements. */
3
+ export declare function TooltipText({ as, title, children, ...attributes }: Omit<JSX.HTMLAttributes<HTMLElement>, 'title'> & {
4
+ as?: 'span' | 'label' | 'div';
5
+ title?: string;
6
+ }): JSX.Element;
@@ -0,0 +1,35 @@
1
+ import { h, ComponentChildren, TargetedEvent } from '../_vendor/preact/src/index';
2
+ type TooltipPresentation = {
3
+ className?: string;
4
+ placement?: 'above';
5
+ delay?: number;
6
+ content?: ComponentChildren;
7
+ };
8
+ /** Preact adapter; the session owns all tooltip behavior and DOM lifecycle. */
9
+ export declare function useControlTooltip(text: string, _floating?: boolean, presentation?: TooltipPresentation): {
10
+ readonly id: string;
11
+ readonly hide: () => void;
12
+ readonly triggerProps: {
13
+ readonly 'aria-describedby': string;
14
+ readonly onFocus: (event: TargetedEvent<HTMLElement>) => void;
15
+ readonly onBlur: () => void;
16
+ readonly onMouseEnter: (event: TargetedEvent<HTMLElement>) => void;
17
+ readonly onMouseLeave: (event?: TargetedEvent<HTMLElement>) => void;
18
+ readonly onPointerDown: (_event: TargetedEvent<HTMLElement>) => void;
19
+ readonly onPointerCancel: () => void;
20
+ readonly onKeyDown: (event: KeyboardEvent) => void;
21
+ };
22
+ readonly tooltip: h.JSX.Element;
23
+ };
24
+ /** Controlled surface adapter retained for existing consumers. */
25
+ export declare function ControlTooltip({ id, text, content, visible, anchor, className, }: {
26
+ readonly id: string;
27
+ readonly text: string;
28
+ readonly content?: ComponentChildren;
29
+ readonly visible: boolean;
30
+ readonly anchor?: HTMLElement | null;
31
+ readonly className?: string;
32
+ readonly placement?: 'above';
33
+ }): h.JSX.Element;
34
+ export declare const useTooltip: typeof useControlTooltip;
35
+ export {};
@@ -1,3 +1,5 @@
1
+ export { ensureTooltipStyles, prepareTooltipSurface, TOOLTIP_STYLES, } from './tooltip-surface';
2
+ export { ownsPopupTarget } from './popup-ownership';
1
3
  export type TopLayerPopupMode = 'popover' | 'fallback';
2
4
  export type TopLayerPopupElement = HTMLElement & {
3
5
  showPopover?: () => void;
@@ -7,3 +9,5 @@ export type TopLayerPopupElement = HTMLElement & {
7
9
  export declare function showTopLayerPopup(element: TopLayerPopupElement, visibleDisplay?: string): TopLayerPopupMode;
8
10
  /** Hides an overlay opened by `showTopLayerPopup`; safe to call repeatedly. */
9
11
  export declare function hideTopLayerPopup(element: TopLayerPopupElement, mode?: TopLayerPopupMode): void;
12
+ /** Includes portalled popup content linked by descendant aria-controls triggers. */
13
+ export declare function popupOwnsTarget(panel: HTMLElement, target: Node | null): boolean;
@@ -1,23 +1 @@
1
- //#region src/core/top-layer-popup.ts
2
- var e = /* @__PURE__ */ new WeakMap();
3
- function t(t, n = "flex") {
4
- if (e.has(t) || e.set(t, t.getAttribute("data-rv-ui-surface")), t.setAttribute("data-rv-ui-surface", ""), t.style.display = n, typeof t.showPopover == "function") {
5
- t.setAttribute("popover", "manual");
6
- try {
7
- return t.showPopover(), "popover";
8
- } catch {
9
- t.removeAttribute("popover");
10
- }
11
- }
12
- return t.style.display = n, "fallback";
13
- }
14
- function n(t, n) {
15
- let r = e.get(t);
16
- if (r !== void 0 && (r === null ? t.removeAttribute("data-rv-ui-surface") : t.setAttribute("data-rv-ui-surface", r), e.delete(t)), n === "popover" && typeof t.hidePopover == "function") try {
17
- t.hidePopover(), t.style.removeProperty("display");
18
- return;
19
- } catch {}
20
- t.style.display = "none";
21
- }
22
- //#endregion
23
- export { n as hideTopLayerPopup, t as showTopLayerPopup };
1
+ export { a as TOOLTIP_STYLES, s as ensureTooltipStyles, t as hideTopLayerPopup, i as ownsPopupTarget, n as popupOwnsTarget, c as prepareTooltipSurface, r as showTopLayerPopup } from "../_chunks/top-layer-popup-CKJ7VJOF.js";