@mintplayer/web-components 3.4.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/README.md +5 -5
  2. package/a11y/index.mjs +248 -1
  3. package/a11y/src/index.d.ts +0 -2
  4. package/accordion/index.mjs +117 -144
  5. package/accordion/src/generated/accordion-tab.view.generated.d.ts +13 -0
  6. package/accordion/src/generated/accordion.view.generated.d.ts +10 -0
  7. package/accordion/src/generated/index.d.ts +2 -0
  8. package/accordion/src/generated/mp-accordion-tab.generated.d.ts +50 -0
  9. package/accordion/src/generated/mp-accordion.generated.d.ts +47 -0
  10. package/accordion/src/index.d.ts +2 -3
  11. package/alert/index.mjs +82 -0
  12. package/alert/src/generated/alert.view.generated.d.ts +10 -0
  13. package/alert/src/generated/index.d.ts +1 -0
  14. package/alert/src/generated/mp-alert.generated.d.ts +66 -0
  15. package/alert/src/index.d.ts +1 -0
  16. package/badge/index.mjs +71 -0
  17. package/badge/src/generated/badge.view.generated.d.ts +11 -0
  18. package/badge/src/generated/index.d.ts +1 -0
  19. package/badge/src/generated/mp-badge.generated.d.ts +48 -0
  20. package/badge/src/index.d.ts +1 -0
  21. package/breadcrumb/index.mjs +110 -0
  22. package/breadcrumb/src/generated/breadcrumb-item.view.generated.d.ts +10 -0
  23. package/breadcrumb/src/generated/breadcrumb.view.generated.d.ts +13 -0
  24. package/breadcrumb/src/generated/index.d.ts +2 -0
  25. package/breadcrumb/src/generated/mp-breadcrumb-item.generated.d.ts +31 -0
  26. package/breadcrumb/src/generated/mp-breadcrumb.generated.d.ts +30 -0
  27. package/breadcrumb/src/index.d.ts +1 -0
  28. package/button-group/index.d.ts +1 -0
  29. package/button-group/index.mjs +68 -0
  30. package/button-group/src/generated/button-group.view.generated.d.ts +10 -0
  31. package/button-group/src/generated/index.d.ts +1 -0
  32. package/button-group/src/generated/mp-button-group.generated.d.ts +48 -0
  33. package/button-group/src/index.d.ts +1 -0
  34. package/card/index.mjs +421 -19
  35. package/card/src/generated/card-img.view.generated.d.ts +13 -0
  36. package/card/src/generated/card-link.view.generated.d.ts +13 -0
  37. package/card/src/generated/card-part.view.generated.d.ts +10 -0
  38. package/card/src/generated/index.d.ts +10 -0
  39. package/card/src/generated/mp-card-body.generated.d.ts +20 -0
  40. package/card/src/generated/mp-card-footer.generated.d.ts +30 -0
  41. package/card/src/generated/mp-card-group.generated.d.ts +20 -0
  42. package/card/src/generated/mp-card-header.generated.d.ts +30 -0
  43. package/card/src/generated/mp-card-img.generated.d.ts +46 -0
  44. package/card/src/generated/mp-card-link.generated.d.ts +30 -0
  45. package/card/src/generated/mp-card-subtitle.generated.d.ts +20 -0
  46. package/card/src/generated/mp-card-text.generated.d.ts +20 -0
  47. package/card/src/generated/mp-card-title.generated.d.ts +30 -0
  48. package/card/src/generated/mp-card.generated.d.ts +38 -0
  49. package/card/src/index.d.ts +2 -2
  50. package/charts/sparkline/index.mjs +85 -109
  51. package/charts/sparkline/src/generated/index.d.ts +1 -0
  52. package/charts/sparkline/src/generated/mp-sparkline.generated.d.ts +81 -0
  53. package/charts/sparkline/src/generated/sparkline.view.generated.d.ts +11 -0
  54. package/charts/sparkline/src/index.d.ts +2 -1
  55. package/checkbox/index.mjs +256 -261
  56. package/checkbox/src/generated/checkbox-group.view.generated.d.ts +10 -0
  57. package/checkbox/src/generated/checkbox.view.generated.d.ts +13 -0
  58. package/checkbox/src/generated/index.d.ts +3 -0
  59. package/{navbar/src/generated/mp-navbar-dropdown.generated.d.ts → checkbox/src/generated/mp-checkbox-group.generated.d.ts} +17 -14
  60. package/checkbox/src/generated/mp-checkbox.generated.d.ts +120 -0
  61. package/checkbox/src/generated/mp-toggle-button.generated.d.ts +100 -0
  62. package/checkbox/src/index.d.ts +1 -2
  63. package/chunks/{datatable-wRsV3aob.mjs → datatable-wcZQMo-4.mjs} +5 -5
  64. package/chunks/{treeview-BFyPrpxn.mjs → treeview-CKndcfiq.mjs} +38 -36
  65. package/close/index.d.ts +1 -0
  66. package/close/index.mjs +55 -0
  67. package/close/src/generated/close.view.generated.d.ts +11 -0
  68. package/close/src/generated/index.d.ts +1 -0
  69. package/close/src/generated/mp-close.generated.d.ts +33 -0
  70. package/close/src/index.d.ts +1 -0
  71. package/color-picker/index.d.ts +1 -0
  72. package/color-picker/index.mjs +108 -0
  73. package/color-picker/src/generated/color-picker.view.generated.d.ts +8 -0
  74. package/color-picker/src/generated/index.d.ts +1 -0
  75. package/color-picker/src/generated/mp-color-picker.generated.d.ts +83 -0
  76. package/color-picker/src/index.d.ts +2 -0
  77. package/context-menu/index.d.ts +1 -0
  78. package/context-menu/index.mjs +75 -0
  79. package/context-menu/src/generated/context-menu-panel.view.generated.d.ts +10 -0
  80. package/context-menu/src/generated/context-menu.directive.generated.d.ts +5 -0
  81. package/context-menu/src/generated/index.d.ts +2 -0
  82. package/context-menu/src/generated/mp-context-menu-panel.generated.d.ts +40 -0
  83. package/context-menu/src/index.d.ts +1 -0
  84. package/custom-elements.json +13883 -6471
  85. package/datatable/index.mjs +1 -1
  86. package/dropdown/index.d.ts +1 -0
  87. package/dropdown/index.mjs +295 -0
  88. package/dropdown/src/generated/dropdown-divider.view.generated.d.ts +8 -0
  89. package/dropdown/src/generated/dropdown-header.view.generated.d.ts +10 -0
  90. package/dropdown/src/generated/dropdown-item.view.generated.d.ts +10 -0
  91. package/dropdown/src/generated/dropdown-menu.view.generated.d.ts +16 -0
  92. package/dropdown/src/generated/dropdown-panel.view.generated.d.ts +10 -0
  93. package/dropdown/src/generated/dropdown.directive.generated.d.ts +5 -0
  94. package/dropdown/src/generated/index.d.ts +6 -0
  95. package/dropdown/src/generated/mp-dropdown-divider.generated.d.ts +13 -0
  96. package/dropdown/src/generated/mp-dropdown-header.generated.d.ts +20 -0
  97. package/dropdown/src/generated/mp-dropdown-item.generated.d.ts +43 -0
  98. package/dropdown/src/generated/mp-dropdown-menu.generated.d.ts +61 -0
  99. package/dropdown/src/generated/mp-dropdown-panel.generated.d.ts +67 -0
  100. package/dropdown/src/index.d.ts +1 -0
  101. package/file-manager/index.mjs +19 -19
  102. package/file-upload/index.d.ts +1 -0
  103. package/file-upload/index.mjs +136 -0
  104. package/file-upload/src/generated/file-upload.view.generated.d.ts +18 -0
  105. package/file-upload/src/generated/index.d.ts +1 -0
  106. package/file-upload/src/generated/mp-file-upload.generated.d.ts +117 -0
  107. package/file-upload/src/index.d.ts +3 -0
  108. package/floating-labels/index.d.ts +1 -0
  109. package/floating-labels/index.mjs +45 -0
  110. package/floating-labels/src/generated/floating-label.view.generated.d.ts +10 -0
  111. package/floating-labels/src/generated/index.d.ts +1 -0
  112. package/floating-labels/src/generated/mp-floating-label.generated.d.ts +20 -0
  113. package/floating-labels/src/index.d.ts +1 -0
  114. package/form/index.d.ts +1 -0
  115. package/form/index.mjs +84 -0
  116. package/form/src/generated/col-form-label.directive.generated.d.ts +2 -0
  117. package/form/src/generated/form-control.directive.generated.d.ts +2 -0
  118. package/form/src/generated/form.view.generated.d.ts +13 -0
  119. package/form/src/generated/index.d.ts +3 -0
  120. package/form/src/generated/mp-form.generated.d.ts +41 -0
  121. package/form/src/index.d.ts +1 -0
  122. package/grid/index.d.ts +1 -0
  123. package/grid/index.mjs +93 -0
  124. package/grid/src/generated/col.directive.generated.d.ts +2 -0
  125. package/grid/src/generated/column.directive.generated.d.ts +2 -0
  126. package/grid/src/generated/grid.view.generated.d.ts +10 -0
  127. package/grid/src/generated/index.d.ts +4 -0
  128. package/grid/src/generated/mp-grid.generated.d.ts +31 -0
  129. package/grid/src/generated/row.directive.generated.d.ts +2 -0
  130. package/grid/src/index.d.ts +1 -0
  131. package/input-group/index.mjs +59 -34
  132. package/input-group/src/generated/index.d.ts +1 -0
  133. package/input-group/src/generated/input-group.view.generated.d.ts +10 -0
  134. package/input-group/src/generated/mp-input-group.generated.d.ts +39 -0
  135. package/input-group/src/index.d.ts +1 -1
  136. package/list-group/index.d.ts +1 -0
  137. package/list-group/index.mjs +117 -0
  138. package/list-group/src/generated/index.d.ts +2 -0
  139. package/list-group/src/generated/list-group-item.view.generated.d.ts +10 -0
  140. package/list-group/src/generated/list-group.view.generated.d.ts +10 -0
  141. package/list-group/src/generated/mp-list-group-item.generated.d.ts +48 -0
  142. package/list-group/src/generated/mp-list-group.generated.d.ts +31 -0
  143. package/list-group/src/index.d.ts +1 -0
  144. package/machine/index.mjs +164 -55
  145. package/machine/src/body-teleport-directive.d.ts +3 -0
  146. package/machine/src/content-query.d.ts +4 -0
  147. package/machine/src/core-controller.d.ts +5 -0
  148. package/machine/src/core-directive.d.ts +21 -0
  149. package/machine/src/host-props.d.ts +21 -0
  150. package/machine/src/index.d.ts +3 -0
  151. package/machine/src/instance-style-directive.d.ts +17 -0
  152. package/machine/src/mark-links.d.ts +3 -3
  153. package/marquee/index.d.ts +1 -0
  154. package/marquee/index.mjs +74 -0
  155. package/marquee/src/generated/index.d.ts +1 -0
  156. package/marquee/src/generated/marquee.view.generated.d.ts +13 -0
  157. package/marquee/src/generated/mp-marquee.generated.d.ts +48 -0
  158. package/marquee/src/index.d.ts +1 -0
  159. package/modal/index.d.ts +1 -0
  160. package/modal/index.mjs +134 -0
  161. package/modal/src/generated/index.d.ts +1 -0
  162. package/modal/src/generated/modal.view.generated.d.ts +12 -0
  163. package/modal/src/generated/mp-modal.generated.d.ts +103 -0
  164. package/modal/src/index.d.ts +2 -0
  165. package/multi-range/src/generated/mp-multi-range.generated.d.ts +1 -1
  166. package/nav/index.mjs +1 -1
  167. package/navbar/index.mjs +23 -88
  168. package/navbar/src/generated/index.d.ts +0 -1
  169. package/navbar/src/generated/mp-navbar-item.generated.d.ts +1 -1
  170. package/navbar/src/generated/mp-navbar-nav.generated.d.ts +4 -1
  171. package/navbar/src/index.d.ts +1 -1
  172. package/navbar/src/navbar-item.lit.d.ts +1 -1
  173. package/navbar-toggler/index.d.ts +1 -0
  174. package/navbar-toggler/index.mjs +70 -0
  175. package/navbar-toggler/src/generated/index.d.ts +1 -0
  176. package/navbar-toggler/src/generated/mp-navbar-toggler.generated.d.ts +52 -0
  177. package/navbar-toggler/src/generated/navbar-toggler.view.generated.d.ts +11 -0
  178. package/navbar-toggler/src/index.d.ts +1 -0
  179. package/offcanvas/index.d.ts +1 -0
  180. package/offcanvas/index.mjs +133 -0
  181. package/offcanvas/src/generated/index.d.ts +1 -0
  182. package/offcanvas/src/generated/mp-offcanvas.generated.d.ts +108 -0
  183. package/offcanvas/src/generated/offcanvas.view.generated.d.ts +11 -0
  184. package/offcanvas/src/index.d.ts +2 -0
  185. package/otp-input/index.mjs +33 -29
  186. package/otp-input/src/generated/otp-input.view.generated.d.ts +4 -1
  187. package/package.json +123 -11
  188. package/pagination/index.mjs +88 -144
  189. package/pagination/src/generated/index.d.ts +1 -0
  190. package/pagination/src/generated/mp-pagination.generated.d.ts +69 -0
  191. package/pagination/src/generated/pagination.view.generated.d.ts +11 -0
  192. package/pagination/src/index.d.ts +3 -2
  193. package/parallax/index.d.ts +1 -0
  194. package/parallax/index.mjs +50 -0
  195. package/parallax/src/generated/index.d.ts +1 -0
  196. package/parallax/src/generated/mp-parallax.generated.d.ts +32 -0
  197. package/parallax/src/generated/parallax.view.generated.d.ts +8 -0
  198. package/parallax/src/index.d.ts +1 -0
  199. package/phone-input/index.mjs +52 -48
  200. package/phone-input/src/generated/phone-input.view.generated.d.ts +4 -1
  201. package/placeholder/index.d.ts +1 -0
  202. package/placeholder/index.mjs +64 -0
  203. package/placeholder/src/generated/index.d.ts +1 -0
  204. package/placeholder/src/generated/mp-placeholder.generated.d.ts +43 -0
  205. package/placeholder/src/generated/placeholder.view.generated.d.ts +10 -0
  206. package/placeholder/src/index.d.ts +1 -0
  207. package/playlist-toggler/index.d.ts +1 -0
  208. package/playlist-toggler/index.mjs +69 -0
  209. package/playlist-toggler/src/generated/index.d.ts +1 -0
  210. package/playlist-toggler/src/generated/mp-playlist-toggler.generated.d.ts +52 -0
  211. package/playlist-toggler/src/generated/playlist-toggler.view.generated.d.ts +11 -0
  212. package/playlist-toggler/src/index.d.ts +1 -0
  213. package/popover/index.d.ts +1 -0
  214. package/popover/index.mjs +104 -0
  215. package/popover/src/generated/index.d.ts +2 -0
  216. package/popover/src/generated/mp-popover-panel.generated.d.ts +66 -0
  217. package/popover/src/generated/popover-panel.view.generated.d.ts +10 -0
  218. package/popover/src/generated/popover.directive.generated.d.ts +5 -0
  219. package/popover/src/index.d.ts +1 -0
  220. package/priority-nav/index.d.ts +1 -0
  221. package/priority-nav/index.mjs +149 -0
  222. package/priority-nav/src/generated/index.d.ts +1 -0
  223. package/priority-nav/src/generated/mp-priority-nav.generated.d.ts +78 -0
  224. package/priority-nav/src/generated/priority-nav.view.generated.d.ts +21 -0
  225. package/priority-nav/src/index.d.ts +2 -0
  226. package/progress-bar/index.d.ts +1 -0
  227. package/progress-bar/index.mjs +157 -0
  228. package/progress-bar/src/generated/index.d.ts +2 -0
  229. package/progress-bar/src/generated/mp-progress-bar.generated.d.ts +87 -0
  230. package/progress-bar/src/generated/mp-progress.generated.d.ts +46 -0
  231. package/progress-bar/src/generated/progress-bar.view.generated.d.ts +12 -0
  232. package/progress-bar/src/generated/progress.view.generated.d.ts +10 -0
  233. package/progress-bar/src/index.d.ts +1 -0
  234. package/query-builder/index.mjs +19 -19
  235. package/radio/index.mjs +186 -1
  236. package/radio/src/generated/index.d.ts +2 -0
  237. package/radio/src/generated/mp-radio-group.generated.d.ts +59 -0
  238. package/radio/src/generated/mp-radio.generated.d.ts +120 -0
  239. package/radio/src/generated/radio-group.view.generated.d.ts +10 -0
  240. package/radio/src/generated/radio.view.generated.d.ts +13 -0
  241. package/radio/src/index.d.ts +1 -2
  242. package/range/index.d.ts +1 -0
  243. package/range/index.mjs +75 -0
  244. package/range/src/generated/index.d.ts +1 -0
  245. package/range/src/generated/mp-range.generated.d.ts +64 -0
  246. package/range/src/generated/range.view.generated.d.ts +11 -0
  247. package/range/src/index.d.ts +1 -0
  248. package/rating/index.d.ts +1 -0
  249. package/rating/index.mjs +74 -0
  250. package/rating/src/generated/index.d.ts +1 -0
  251. package/rating/src/generated/mp-rating.generated.d.ts +64 -0
  252. package/rating/src/generated/rating.view.generated.d.ts +8 -0
  253. package/rating/src/index.d.ts +1 -0
  254. package/resizable/index.d.ts +1 -0
  255. package/resizable/index.mjs +79 -0
  256. package/resizable/src/generated/index.d.ts +1 -0
  257. package/resizable/src/generated/mp-resizable.generated.d.ts +66 -0
  258. package/resizable/src/generated/resizable.view.generated.d.ts +10 -0
  259. package/resizable/src/index.d.ts +2 -0
  260. package/scheduler/index.mjs +7 -1
  261. package/scrollspy/index.d.ts +1 -0
  262. package/scrollspy/index.mjs +76 -0
  263. package/scrollspy/src/generated/index.d.ts +1 -0
  264. package/scrollspy/src/generated/mp-scrollspy.generated.d.ts +49 -0
  265. package/scrollspy/src/generated/scrollspy.view.generated.d.ts +13 -0
  266. package/scrollspy/src/index.d.ts +1 -0
  267. package/select/index.mjs +48 -46
  268. package/select/src/generated/select.view.generated.d.ts +4 -1
  269. package/shell/index.mjs +88 -81
  270. package/shell/src/generated/index.d.ts +1 -0
  271. package/shell/src/generated/mp-shell.generated.d.ts +90 -0
  272. package/shell/src/generated/shell.view.generated.d.ts +12 -0
  273. package/shell/src/index.d.ts +2 -3
  274. package/sticky-footer/index.d.ts +1 -0
  275. package/sticky-footer/index.mjs +57 -0
  276. package/sticky-footer/src/generated/index.d.ts +2 -0
  277. package/sticky-footer/src/generated/mp-sticky-footer.generated.d.ts +20 -0
  278. package/sticky-footer/src/generated/sticky-footer-parent.directive.generated.d.ts +2 -0
  279. package/sticky-footer/src/generated/sticky-footer.view.generated.d.ts +13 -0
  280. package/sticky-footer/src/index.d.ts +1 -0
  281. package/tab-control/index.mjs +142 -182
  282. package/tab-control/src/generated/index.d.ts +2 -0
  283. package/tab-control/src/generated/mp-tab-control.generated.d.ts +65 -0
  284. package/tab-control/src/generated/mp-tab-page.generated.d.ts +44 -0
  285. package/tab-control/src/generated/tab-control.view.generated.d.ts +12 -0
  286. package/tab-control/src/index.d.ts +2 -4
  287. package/table/index.d.ts +1 -0
  288. package/table/index.mjs +75 -0
  289. package/table/src/generated/index.d.ts +1 -0
  290. package/table/src/generated/mp-table.generated.d.ts +57 -0
  291. package/table/src/generated/table.view.generated.d.ts +13 -0
  292. package/table/src/index.d.ts +1 -0
  293. package/tile-manager/index.mjs +110 -143
  294. package/tile-manager/src/generated/index.d.ts +1 -0
  295. package/tile-manager/src/generated/mp-tile-manager.generated.d.ts +139 -0
  296. package/tile-manager/src/generated/tile-manager.view.generated.d.ts +21 -0
  297. package/tile-manager/src/index.d.ts +2 -2
  298. package/toast/index.d.ts +1 -0
  299. package/toast/index.mjs +227 -0
  300. package/toast/src/generated/index.d.ts +4 -0
  301. package/toast/src/generated/mp-toast-body.generated.d.ts +20 -0
  302. package/toast/src/generated/mp-toast-header.generated.d.ts +39 -0
  303. package/toast/src/generated/mp-toast.generated.d.ts +41 -0
  304. package/toast/src/generated/mp-toaster.generated.d.ts +39 -0
  305. package/toast/src/generated/toast-body.view.generated.d.ts +10 -0
  306. package/toast/src/generated/toast-header.view.generated.d.ts +11 -0
  307. package/toast/src/generated/toast.view.generated.d.ts +10 -0
  308. package/toast/src/generated/toaster.view.generated.d.ts +15 -0
  309. package/toast/src/index.d.ts +1 -0
  310. package/tooltip/index.d.ts +1 -0
  311. package/tooltip/index.mjs +87 -0
  312. package/tooltip/src/generated/index.d.ts +2 -0
  313. package/tooltip/src/generated/mp-tooltip-panel.generated.d.ts +48 -0
  314. package/tooltip/src/generated/tooltip-panel.view.generated.d.ts +10 -0
  315. package/tooltip/src/generated/tooltip.directive.generated.d.ts +5 -0
  316. package/tooltip/src/index.d.ts +1 -0
  317. package/treeview/index.mjs +1 -1
  318. package/treeview/src/generated/treeview.view.generated.d.ts +4 -1
  319. package/typeahead/index.mjs +131 -221
  320. package/typeahead/src/generated/index.d.ts +1 -0
  321. package/typeahead/src/generated/mp-typeahead.generated.d.ts +126 -0
  322. package/typeahead/src/generated/typeahead.view.generated.d.ts +20 -0
  323. package/typeahead/src/index.d.ts +3 -3
  324. package/a11y/src/form-associated.d.ts +0 -48
  325. package/accordion/src/components/index.d.ts +0 -3
  326. package/accordion/src/components/mp-accordion-tab.d.ts +0 -30
  327. package/accordion/src/components/mp-accordion.d.ts +0 -54
  328. package/accordion/src/styles/accordion.styles.d.ts +0 -2
  329. package/accordion/src/styles/index.d.ts +0 -1
  330. package/card/src/card-global.styles.d.ts +0 -2
  331. package/card/src/mp-card.element.d.ts +0 -43
  332. package/card/src/mp-card.element.template.d.ts +0 -2
  333. package/charts/sparkline/src/components/index.d.ts +0 -1
  334. package/charts/sparkline/src/components/mp-sparkline.d.ts +0 -50
  335. package/charts/sparkline/src/styles/index.d.ts +0 -1
  336. package/charts/sparkline/src/styles/sparkline.styles.d.ts +0 -2
  337. package/checkbox/src/components/index.d.ts +0 -2
  338. package/checkbox/src/components/mp-checkbox.d.ts +0 -128
  339. package/chunks/a11y-CXIVMaQ_.mjs +0 -287
  340. package/chunks/radio-fSMWIPFk.mjs +0 -150
  341. package/chunks/toggle-button-DWLu9iCm.mjs +0 -172
  342. package/dropdown-menu/index.mjs +0 -48
  343. package/dropdown-menu/src/components/index.d.ts +0 -1
  344. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +0 -46
  345. package/dropdown-menu/src/index.d.ts +0 -2
  346. package/input-group/src/mp-input-group.d.ts +0 -29
  347. package/navbar/src/generated/navbar-dropdown.view.generated.d.ts +0 -14
  348. package/pagination/src/components/index.d.ts +0 -2
  349. package/pagination/src/components/mp-pagination.d.ts +0 -57
  350. package/pagination/src/styles/index.d.ts +0 -1
  351. package/pagination/src/styles/pagination.styles.d.ts +0 -2
  352. package/radio/src/components/index.d.ts +0 -2
  353. package/radio/src/components/mp-radio.d.ts +0 -80
  354. package/radio-group/index.mjs +0 -64
  355. package/radio-group/src/components/mp-radio-group.d.ts +0 -39
  356. package/radio-group/src/index.d.ts +0 -1
  357. package/radio-group/src/styles/radio-group.styles.d.ts +0 -2
  358. package/shell/src/components/index.d.ts +0 -2
  359. package/shell/src/components/mp-shell.d.ts +0 -69
  360. package/shell/src/styles/shell.styles.d.ts +0 -2
  361. package/tab-control/src/components/index.d.ts +0 -3
  362. package/tab-control/src/components/mp-tab-control.d.ts +0 -50
  363. package/tab-control/src/components/mp-tab-page.d.ts +0 -35
  364. package/tab-control/src/styles/index.d.ts +0 -1
  365. package/tab-control/src/styles/tab-control.styles.d.ts +0 -2
  366. package/tab-control/src/types/index.d.ts +0 -1
  367. package/tab-control/src/types/tabs-position.d.ts +0 -1
  368. package/tile-manager/src/components/index.d.ts +0 -1
  369. package/tile-manager/src/components/mp-tile-manager.d.ts +0 -107
  370. package/toggle-button/index.mjs +0 -1
  371. package/toggle-button/src/components/index.d.ts +0 -2
  372. package/toggle-button/src/components/mp-toggle-button.d.ts +0 -76
  373. package/toggle-button/src/index.d.ts +0 -3
  374. package/toggle-button/src/styles/index.d.ts +0 -1
  375. package/toggle-button/src/styles/toggle-button.styles.d.ts +0 -2
  376. package/typeahead/src/components/mp-typeahead.d.ts +0 -68
  377. /package/{dropdown-menu → alert}/index.d.ts +0 -0
  378. /package/{radio-group → badge}/index.d.ts +0 -0
  379. /package/{toggle-button → breadcrumb}/index.d.ts +0 -0
package/machine/index.mjs CHANGED
@@ -1,8 +1,10 @@
1
1
  import { noChange as e, nothing as t, render as n } from "lit";
2
- import { Directive as r, PartType as i, directive as a } from "lit/directive.js";
3
- import { coreRuntime as o, sameContent as s } from "@mintplayer/ui-core/component";
2
+ import { createBodyHost as r, removeBodyHost as i } from "@mintplayer/ui-core/overlay";
3
+ import { Directive as a, PartType as o, directive as s } from "lit/directive.js";
4
+ import { coreRuntime as c, directiveInputs as l, elementCore as u, sameContent as d, scopedHost as f } from "@mintplayer/ui-core/component";
5
+ import { AsyncDirective as p, PartType as m, directive as h } from "lit/async-directive.js";
4
6
  //#region libs/mintplayer-web-components/machine/src/machine-controller.ts
5
- var c = class {
7
+ var g = class {
6
8
  #e = null;
7
9
  constructor(e, t, n = !0) {
8
10
  this.host = e, this.machine = t, this.ownsMachine = n, e.addController(this);
@@ -19,7 +21,7 @@ var c = class {
19
21
  dispose() {
20
22
  this.hostDisconnected(), this.ownsMachine && this.machine.destroy();
21
23
  }
22
- }, l = /* @__PURE__ */ new Set([
24
+ }, _ = /* @__PURE__ */ new Set([
23
25
  "href",
24
26
  "src",
25
27
  "srcdoc",
@@ -28,10 +30,10 @@ var c = class {
28
30
  "action",
29
31
  "formaction",
30
32
  "data"
31
- ]), u = a(class extends r {
33
+ ]), v = s(class extends a {
32
34
  #e = {};
33
35
  constructor(e) {
34
- if (super(e), e.type !== i.ELEMENT) throw Error("props() must be used in element position");
36
+ if (super(e), e.type !== o.ELEMENT) throw Error("props() must be used in element position");
35
37
  }
36
38
  render(t) {
37
39
  return e;
@@ -39,22 +41,39 @@ var c = class {
39
41
  update(t, [n]) {
40
42
  let r = t.element, i = (e) => e == null || e === !1;
41
43
  return Object.keys(this.#e).filter((e) => !(e in n) || i(n[e])).forEach((e) => r.removeAttribute(e)), Object.entries(n).filter(([, e]) => !i(e)).filter(([e]) => {
42
- if (l.has(e) || e.startsWith("on")) throw Error(`props() refuses to set "${e}"`);
44
+ if (_.has(e) || e.startsWith("on")) throw Error(`props() refuses to set "${e}"`);
43
45
  return !0;
44
46
  }).filter(([e, t]) => !Object.is(this.#e[e], t)).forEach(([e, t]) => r.setAttribute(e, t === !0 ? "" : String(t))), this.#e = { ...n }, e;
45
47
  }
46
- }), d = {
48
+ }), y = {
47
49
  attrs: {},
48
50
  classes: []
49
- }, f = (e) => e == null || e === !1;
50
- function p(e, t, n) {
51
+ }, b = (e) => e == null || e === !1;
52
+ function x(e, t, n) {
51
53
  let { class: r, ...i } = n, a = typeof r == "string" ? r.split(/\s+/).filter(Boolean) : [];
52
- return e.classList.remove(...t.classes.filter((e) => !a.includes(e))), a.length && e.classList.add(...a), Object.keys(t.attrs).filter((e) => f(i[e])).forEach((t) => e.removeAttribute(t)), Object.entries(i).filter(([, e]) => !f(e)).filter(([e, n]) => !Object.is(t.attrs[e], n)).forEach(([t, n]) => e.setAttribute(t, n === !0 ? "" : String(n))), {
54
+ return e.classList.remove(...t.classes.filter((e) => !a.includes(e))), a.length && e.classList.add(...a), Object.keys(t.attrs).filter((e) => b(i[e])).forEach((t) => e.removeAttribute(t)), Object.entries(i).filter(([, e]) => !b(e)).filter(([e, n]) => !Object.is(t.attrs[e], n)).forEach(([t, n]) => e.setAttribute(t, n === !0 ? "" : String(n))), {
53
55
  attrs: i,
54
56
  classes: a
55
57
  };
56
58
  }
57
- var m = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE && !e.textContent?.trim() || e instanceof Element && (e.hasAttribute("data-mp-owned") || e.hasAttribute("data-mps") && !e.localName.includes("-")), h = class {
59
+ function S(e) {
60
+ let t = Object.fromEntries(Array.from(e.attributes).filter(({ name: e }) => e.startsWith("aria-") || e === "id" || e === "tabindex").map(({ name: e, value: t }) => [e, t]));
61
+ return ["id", "tabindex"].filter((e) => e in t).forEach((t) => e.removeAttribute(t)), {
62
+ host: e,
63
+ attrs: t
64
+ };
65
+ }
66
+ function C(e, t) {
67
+ let n = e ?? {};
68
+ if (!t) return n;
69
+ let { id: r, ...i } = t.attrs, a = n.id !== null && n.id !== void 0;
70
+ return a && r && t.host.id !== r && (t.host.id = r), {
71
+ ...n,
72
+ ...i,
73
+ ...r && !a ? { id: r } : {}
74
+ };
75
+ }
76
+ var w = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE && !e.textContent?.trim() || e instanceof Element && (e.hasAttribute("data-mp-owned") || e.hasAttribute("data-mps") && !e.localName.includes("-")), T = class {
58
77
  #e = null;
59
78
  #t = null;
60
79
  constructor(e) {
@@ -64,7 +83,7 @@ var m = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE
64
83
  return this.#e ?? {};
65
84
  }
66
85
  capture() {
67
- this.#e ??= g(this.host);
86
+ this.#e ??= E(this.host);
68
87
  }
69
88
  hostConnected() {
70
89
  this.#t = new MutationObserver((e) => this.#n(e, !0)), this.#t.observe(this.host, { childList: !0 });
@@ -80,11 +99,11 @@ var m = (e) => e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE
80
99
  }
81
100
  #n(e, t) {
82
101
  if (!this.#e) return;
83
- let n = new Set(e.flatMap((e) => [...e.addedNodes])), r = new Set(Object.values(this.#e).flat()), i = g(this.host, (e) => !n.has(e) || r.has(e) || m(e));
102
+ let n = new Set(e.flatMap((e) => [...e.addedNodes])), r = new Set(Object.values(this.#e).flat()), i = E(this.host, (e) => !n.has(e) || r.has(e) || w(e));
84
103
  Object.keys(i).length !== 0 && (Object.entries(i).forEach(([e, t]) => this.#e[e] = [...this.#e[e] ?? [], ...t]), t && this.host.requestUpdate());
85
104
  }
86
105
  };
87
- function g(e, t = () => !1) {
106
+ function E(e, t = () => !1) {
88
107
  let n = {};
89
108
  return [...e.childNodes].filter((e) => !t(e)).forEach((e) => {
90
109
  if (e.parentNode?.removeChild(e), e.nodeType === Node.COMMENT_NODE || e.nodeType === Node.TEXT_NODE && !e.textContent?.trim()) return;
@@ -92,36 +111,36 @@ function g(e, t = () => !1) {
92
111
  (n[t ?? "default"] ??= []).push(e);
93
112
  }), n;
94
113
  }
95
- var _ = (e) => ({
114
+ var D = (e) => ({
96
115
  fromAttribute: (t) => t === null ? e : t !== "false",
97
116
  toAttribute: (e) => e ? "" : null
98
- }), v = (e, t) => ({
117
+ }), O = (e, t) => ({
99
118
  fromAttribute: (n) => n === null || t && !t.includes(n) ? e : n,
100
119
  toAttribute: (e) => e == null ? null : String(e)
101
- }), y = (e) => ({
120
+ }), k = (e) => ({
102
121
  fromAttribute: (t) => {
103
122
  let n = t === null || t.trim() === "" ? NaN : Number(t);
104
123
  return Number.isFinite(n) ? n : e;
105
124
  },
106
125
  toAttribute: (e) => e == null ? null : String(e)
107
- }), b = /* @__PURE__ */ new WeakMap();
108
- function x(e) {
109
- let t = b.get(e);
110
- return t || (t = Symbol(e.name), b.set(e, t)), t;
126
+ }), A = /* @__PURE__ */ new WeakMap();
127
+ function j(e) {
128
+ let t = A.get(e);
129
+ return t || (t = Symbol(e.name), A.set(e, t)), t;
111
130
  }
112
- var S = /* @__PURE__ */ new WeakMap();
113
- function C(e, t) {
114
- let n = x(t);
131
+ var M = /* @__PURE__ */ new WeakMap();
132
+ function N(e, t) {
133
+ let n = j(t);
115
134
  for (let t = e.parentNode; t; t = t instanceof ShadowRoot ? t.host : t.parentNode) {
116
135
  let r = t[n];
117
136
  if (r) {
118
- let n = S.get(t) ?? /* @__PURE__ */ new Set();
119
- return S.set(t, n.add(e)), r();
137
+ let n = M.get(t) ?? /* @__PURE__ */ new Set();
138
+ return M.set(t, n.add(e)), r();
120
139
  }
121
140
  }
122
141
  return t.defaultValue;
123
142
  }
124
- var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "object" && Object.keys(e).length === Object.keys(t).length && Object.entries(e).every(([e, n]) => t[e] === n), T = 0, E = class {
143
+ var P = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "object" && Object.keys(e).length === Object.keys(t).length && Object.entries(e).every(([e, n]) => t[e] === n), F = 0, I = class {
125
144
  #e;
126
145
  #t;
127
146
  #n;
@@ -130,24 +149,33 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
130
149
  #a;
131
150
  #o;
132
151
  #s = !1;
133
- #c = d;
152
+ #c = y;
134
153
  #l;
135
154
  #u;
136
155
  constructor(e, t, n) {
137
- this.#e = e, this.#t = t, this.#n = n, this.#r = `${n.idPrefix}-${++T}`, this.#i = o(t, {
156
+ this.#e = e, this.#t = t, this.#n = n, this.#r = `${n.idPrefix}-${++F}`, this.#i = c(t, {
138
157
  inputs: n.inputs,
139
158
  state: () => this.#d,
140
159
  setState: (t) => {
141
160
  this.#a = t, e.requestUpdate();
142
161
  },
143
162
  models: n.models,
144
- writeModel: (t, n) => e[t] = n,
163
+ writeModel: (t, n) => {
164
+ e[t] = n, e.dispatchEvent(new CustomEvent(`${t}change`.toLowerCase(), {
165
+ detail: n,
166
+ bubbles: !0,
167
+ composed: !0
168
+ }));
169
+ },
170
+ syncModel: (t, n) => {
171
+ e[t] = n;
172
+ },
145
173
  emit: (t, n) => e.dispatchEvent(new CustomEvent(t.toLowerCase(), {
146
174
  detail: n,
147
175
  bubbles: !0,
148
176
  composed: !0
149
177
  }))
150
- }), e.addController(this), t.provides && (e[x(t.provides)] = () => t.provide?.(this.#f()));
178
+ }), e.addController(this), t.provides && (e[j(t.provides)] = () => t.provide?.(this.#f()));
151
179
  }
152
180
  get #d() {
153
181
  return this.#a ??= this.#t.state ? this.#t.state(this.#n.inputs()) : {};
@@ -158,7 +186,7 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
158
186
  state: this.#d,
159
187
  id: this.#r,
160
188
  hydrated: this.#s,
161
- context: this.#t.consume ? C(this.#e, this.#t.consume) : void 0,
189
+ context: this.#t.consume ? N(this.#e, this.#t.consume) : void 0,
162
190
  label: this.#o ?? null,
163
191
  api: () => this.#i.api
164
192
  };
@@ -182,27 +210,27 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
182
210
  }
183
211
  #p() {
184
212
  let e = this.#e.getAttribute("aria-label"), t = this.#c.attrs["aria-label"];
185
- e !== (t == null || t === !1 ? null : String(t)) && e !== this.#o && (this.#o = e, this.#e.requestUpdate());
213
+ e !== null && t != null && t !== !1 && e === String(t) || e === this.#o || (this.#o = e, this.#e.requestUpdate());
186
214
  }
187
215
  #m() {
188
- for (let e = this.#e.parentNode; e; e = e instanceof ShadowRoot ? e.host : e.parentNode) S.get(e)?.delete(this.#e);
216
+ for (let e = this.#e.parentNode; e; e = e instanceof ShadowRoot ? e.host : e.parentNode) M.get(e)?.delete(this.#e);
189
217
  }
190
218
  #h() {
191
219
  if (!this.#t.provides || !this.#t.provide) return;
192
220
  let e = this.#t.provide(this.#f());
193
- w(e, this.#l) || (this.#l = e, S.get(this.#e)?.forEach((e) => e.isConnected ? e.requestUpdate() : S.get(this.#e)?.delete(e)));
221
+ P(e, this.#l) || (this.#l = e, M.get(this.#e)?.forEach((e) => e.isConnected ? e.requestUpdate() : M.get(this.#e)?.delete(e)));
194
222
  }
195
223
  props() {
196
- let e = this.#t.view(this.#f()), t = this.#n.hostBag ?? this.#t.host?.bind(this.#t);
197
- return t && (this.#c = p(this.#e, this.#c, t(e) ?? {})), e;
224
+ let e = this.#t.view(this.#f()), t = this.#n.hostBag ?? f(this.#t.host?.bind(this.#t), this.#n.hostScope);
225
+ return t && (this.#c = x(this.#e, this.#c, t(e) ?? {})), e;
198
226
  }
199
227
  call(e, t) {
200
228
  return this.#i.call(e, t);
201
229
  }
202
- }, D = a(class extends r {
230
+ }, L = s(class extends a {
203
231
  #e = null;
204
232
  constructor(e) {
205
- if (super(e), e.type !== i.CHILD) throw Error("teleport() must be used in child position");
233
+ if (super(e), e.type !== o.CHILD) throw Error("teleport() must be used in child position");
206
234
  }
207
235
  render(e, n) {
208
236
  return t;
@@ -211,14 +239,14 @@ var w = (e, t) => e === t || !!e && !!t && typeof e == "object" && typeof t == "
211
239
  let a = r ?? null;
212
240
  return this.#e && this.#e !== a && n(t, this.#e), this.#e = a, a && n(i, a), t;
213
241
  }
214
- }), O = "mp-content-change";
215
- function k(e) {
216
- e.dispatchEvent(new Event(O, { bubbles: !0 }));
242
+ }), R = "mp-content-change";
243
+ function z(e) {
244
+ e.dispatchEvent(new Event(R, { bubbles: !0 }));
217
245
  }
218
- var A = class {
246
+ var B = (e, t) => e.length === t.length && e.every((e, n) => [.../* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t[n])])].every((r) => e[r] === t[n][r])), V = class {
219
247
  #e;
220
248
  constructor(e, t, n) {
221
- this.host = e, this.tag = t, this.within = n, this.value = [], this.#e = null, this.#n = () => {
249
+ this.host = e, this.tag = t, this.within = n, this.value = [], this.lent = [], this.#e = null, this.#n = () => {
222
250
  this.#r() && this.host.requestUpdate();
223
251
  }, e.addController(this);
224
252
  }
@@ -228,10 +256,10 @@ var A = class {
228
256
  }), this.#e.observe(this.host, {
229
257
  childList: !0,
230
258
  subtree: !0
231
- }), this.host.addEventListener(O, this.#n);
259
+ }), this.host.addEventListener(R, this.#n);
232
260
  }
233
261
  hostDisconnected() {
234
- this.#e?.disconnect(), this.#e = null, this.host.removeEventListener(O, this.#n);
262
+ this.#e?.disconnect(), this.#e = null, this.host.removeEventListener(R, this.#n);
235
263
  }
236
264
  hostUpdate() {
237
265
  this.#r();
@@ -243,22 +271,103 @@ var A = class {
243
271
  }
244
272
  #n;
245
273
  #r() {
246
- let e = [...this.host.querySelectorAll(this.tag)].map((e) => {
274
+ let e = this.host.localName, t = [...this.host.querySelectorAll(this.tag)].filter((t) => t.parentElement?.closest(e) === this.host), n = t.map((e) => ({ ...e.lentSlots ?? {} })), r = t.map((e) => {
247
275
  let t = this.within ? e.parentElement?.closest(this.within) : null;
248
276
  return {
249
277
  inputs: e.contentInputs ?? {},
250
278
  within: t && this.host.contains(t) ? t.contentInputs ?? {} : null
251
279
  };
252
- });
253
- return !s(this.value, e) && (this.value = e, !0);
280
+ }), i = d(this.value, r), a = B(this.lent, n);
281
+ return i && a ? !1 : (i || (this.value = r), a || (this.lent = n), !0);
254
282
  }
255
283
  };
256
284
  //#endregion
257
285
  //#region libs/mintplayer-web-components/machine/src/mark-links.ts
258
- function j(e, t, n) {
259
- e.filter((e) => e instanceof Element).forEach((e) => {
260
- e.classList.add(t), e.setAttribute("data-mps", n);
261
- });
286
+ function H(e, t) {
287
+ e.filter((e) => e instanceof Element).forEach((e) => e.classList.add(t));
288
+ }
289
+ //#endregion
290
+ //#region libs/mintplayer-web-components/machine/src/core-directive.ts
291
+ var U = 0;
292
+ function W(a, o) {
293
+ class s extends p {
294
+ #e = null;
295
+ #t = null;
296
+ #n;
297
+ #r = `mp-overlay-d${++U}`;
298
+ #i = null;
299
+ #a(e) {
300
+ let t = o.overlay?.(e, this.#n) ?? null;
301
+ if (typeof document < "u" && document.body) {
302
+ if (t === null || !this.isConnected) return this.#o();
303
+ this.#i ??= r(document, this.#r, this.#t), n(t, this.#i);
304
+ }
305
+ }
306
+ #o() {
307
+ this.#i &&= (n(t, this.#i), i(document, this.#r), null);
308
+ }
309
+ constructor(e) {
310
+ if (super(e), e.type !== m.ELEMENT) throw Error(`${o.idPrefix} is an element directive: put it in an element's attribute position`);
311
+ }
312
+ render(t, n) {
313
+ return e;
314
+ }
315
+ update(t, [n, r]) {
316
+ let i = l(o.defaults, n);
317
+ if (this.#n = r, !this.#e || this.#t !== t.element) {
318
+ this.#e?.detach(), this.#t = t.element;
319
+ let e = this.#e = u(a, t.element, i, o.overlay ? {
320
+ ...o,
321
+ onProps: (e) => this.#a(e)
322
+ } : o);
323
+ queueMicrotask(() => {
324
+ this.#e === e && this.isConnected && e.attach();
325
+ });
326
+ } else this.#e.update(i);
327
+ return e;
328
+ }
329
+ disconnected() {
330
+ this.#e?.detach(), this.#o();
331
+ }
332
+ reconnected() {
333
+ this.#e?.attach();
334
+ }
335
+ }
336
+ return h(s);
262
337
  }
263
338
  //#endregion
264
- export { A as ContentQuery, E as CoreController, d as EMPTY_HOST_PROPS, h as LightChildren, c as MachineController, p as applyHostProps, _ as booleanAttribute, j as markLinks, k as notifyContentChange, y as numberAttribute, m as ownedByTemplate, u as props, v as stringAttribute, g as takeLightChildren, D as teleport };
339
+ //#region libs/mintplayer-web-components/machine/src/body-teleport-directive.ts
340
+ var G = 0, K = h(class extends p {
341
+ #e = `mp-overlay-${++G}`;
342
+ #t = null;
343
+ #n = t;
344
+ #r = null;
345
+ constructor(e) {
346
+ if (super(e), e.type !== m.CHILD) throw Error("bodyTeleport() must be used in child position");
347
+ }
348
+ render(e) {
349
+ return t;
350
+ }
351
+ update(e, [n]) {
352
+ return this.#n = n, this.#r = e.parentNode instanceof Element ? e.parentNode : e.parentNode?.parentElement ?? null, this.isConnected && this.#i(), t;
353
+ }
354
+ #i() {
355
+ typeof document < "u" && document.body && (this.#t ??= r(document, this.#e, this.#r), n(this.#n, this.#t));
356
+ }
357
+ disconnected() {
358
+ this.#t &&= (n(t, this.#t), i(document, this.#e), null);
359
+ }
360
+ reconnected() {
361
+ this.#i();
362
+ }
363
+ }), q = s(class extends a {
364
+ #e = null;
365
+ constructor(e) {
366
+ if (super(e), e.type !== o.CHILD) throw Error("instanceStyle() must be used in child position");
367
+ }
368
+ render(e) {
369
+ return e ? (this.#e ??= document.createElement("style"), this.#e.textContent !== e && (this.#e.textContent = e), this.#e) : t;
370
+ }
371
+ });
372
+ //#endregion
373
+ export { V as ContentQuery, I as CoreController, y as EMPTY_HOST_PROPS, T as LightChildren, g as MachineController, x as applyHostProps, K as bodyTeleport, D as booleanAttribute, W as coreDirective, C as forwardHostAttrs, q as instanceStyle, H as markLinks, z as notifyContentChange, k as numberAttribute, w as ownedByTemplate, v as props, O as stringAttribute, S as takeHostAttrs, E as takeLightChildren, L as teleport };
@@ -0,0 +1,3 @@
1
+ import { DirectiveResult } from 'lit/async-directive.js';
2
+ /** Render `content` into a body host while connected (see `BodyTeleportDirective`). */
3
+ export declare const bodyTeleport: (content: unknown) => DirectiveResult;
@@ -2,6 +2,7 @@ import { ReactiveController, ReactiveControllerHost } from 'lit';
2
2
  import { ContentChild } from '@mintplayer/ui-core/component';
3
3
  /** Fired by a generated element that a parent's content query reads. */
4
4
  export declare function notifyContentChange(element: HTMLElement): void;
5
+ type LentSlots = Readonly<Record<string, Node[] | undefined>>;
5
6
  /**
6
7
  * A manifest content query in Lit (PRD #437 D10): every `tag` element in the
7
8
  * host's light content, in document order, with the inputs of the nearest
@@ -14,8 +15,11 @@ export declare class ContentQuery implements ReactiveController {
14
15
  private readonly tag;
15
16
  private readonly within;
16
17
  value: readonly ContentChild[];
18
+ /** Each child's lent slots (a declaration's captured `slot=` children), in the same order (#458 Q15). */
19
+ lent: readonly LentSlots[];
17
20
  constructor(host: ReactiveControllerHost & HTMLElement, tag: string, within: string | null);
18
21
  hostConnected(): void;
19
22
  hostDisconnected(): void;
20
23
  hostUpdate(): void;
21
24
  }
25
+ export {};
@@ -6,6 +6,11 @@ export interface CoreControllerOptions<I, P> {
6
6
  readonly idPrefix: string;
7
7
  /** The host element's bag, where the template root is the host (`mp-host`). Default: `core.host`. */
8
8
  readonly hostBag?: (props: P) => CoreBag | null | undefined;
9
+ /**
10
+ * The group's scope, stamped as `data-mps` on the bag `core.host` writes where the template root is
11
+ * NOT the host (#460). Unlike `hostBag`, it does not make the host the core's root.
12
+ */
13
+ readonly hostScope?: string;
9
14
  /** Two-way inputs: properties written back when the core changes the state of the same name. */
10
15
  readonly models?: readonly string[];
11
16
  }
@@ -0,0 +1,21 @@
1
+ import { DirectiveResult } from 'lit/async-directive.js';
2
+ import { ComponentCore, ElementCoreOptions } from '@mintplayer/ui-core/component';
3
+ /** The content an overlay directive's panel renders: its second argument. */
4
+ export type OverlayContent = () => unknown;
5
+ export interface CoreDirectiveOptions<P, I> extends ElementCoreOptions<P, I> {
6
+ /**
7
+ * An overlay directive (#458 M6): the panel to render from the props, null while hidden. It renders
8
+ * into a body host at the end of <body>, with the directive's content.
9
+ */
10
+ readonly overlay?: (props: P, content: OverlayContent | undefined) => unknown;
11
+ }
12
+ /**
13
+ * A directive core as a Lit element-part directive (#458 §4.3):
14
+ *
15
+ * html`<div ${bsRow()}><div ${bsCol({ md: 6 })}>…</div></div>`
16
+ *
17
+ * The argument is the inputs object. Outputs are DOM events on the element,
18
+ * lowercased. The core attaches once the element is connected, after the
19
+ * render that created it, and detaches while the part is disconnected.
20
+ */
21
+ export declare function coreDirective<I, S, P, E, C, PC, M>(core: ComponentCore<I, S, P, E, C, PC, M>, options: CoreDirectiveOptions<P, I>): (inputs?: Partial<I>, content?: OverlayContent) => DirectiveResult;
@@ -15,6 +15,27 @@ export declare const EMPTY_HOST_PROPS: HostPropsState;
15
15
  * this.#host = applyHostProps(this, this.#host, view.root);
16
16
  */
17
17
  export declare function applyHostProps(host: Element, previous: HostPropsState, bag: AttrBag): HostPropsState;
18
+ /** A host's forwarded attributes (`takeHostAttrs`), and the host they came from. */
19
+ export interface HostAttrs {
20
+ readonly host: HTMLElement;
21
+ readonly attrs: Readonly<Record<string, string>>;
22
+ }
23
+ /**
24
+ * Host transparency for a compiled template whose role lives on an inner
25
+ * `mp-attrs` node (#458): the Lit twin of Angular's `useHostAttrs`. A
26
+ * consumer's `aria-*`, `id` and `tabindex` on the element belong on that node.
27
+ * `id` and `tabindex` are moved (no duplicate id, no dead tab stop on the
28
+ * host); `aria-*` are copied. Read once, before the first render. A consumer
29
+ * `role` is never taken: the inner node's role is the core's contract.
30
+ */
31
+ export declare function takeHostAttrs(host: HTMLElement): HostAttrs;
32
+ /**
33
+ * The inner node's bag with the host's forwarded attributes written over it:
34
+ * the consumer's word wins. Except an `id` the bag sets itself, which the
35
+ * core's own references (a `label for`, an `aria-controls`) point at: then the
36
+ * consumer's id goes back to the host instead.
37
+ */
38
+ export declare function forwardHostAttrs(bag: AttrBag | null | undefined, forwarded: HostAttrs | null | undefined): AttrBag;
18
39
  /**
19
40
  * A top-level node a compiled template rendered into a light-DOM host: a
20
41
  * stamped native element, a composed child it marked `data-mp-owned`, or lit's
@@ -5,3 +5,6 @@ export * from './core-controller';
5
5
  export * from './teleport-directive';
6
6
  export * from './content-query';
7
7
  export * from './mark-links';
8
+ export * from './core-directive';
9
+ export * from './body-teleport-directive';
10
+ export * from './instance-style-directive';
@@ -0,0 +1,17 @@
1
+ import { nothing } from 'lit';
2
+ import { Directive, DirectiveResult, PartInfo } from 'lit/directive.js';
3
+ /**
4
+ * The compiled form of a view's `<instance-style :name :css />` (#458 M4): a `<style>`
5
+ * holding one instance's own sheet, rendered where the tag sits. Lit does not bind
6
+ * inside a template's `<style>`, so the directive owns the element and rewrites its
7
+ * text; a null `css` renders nothing.
8
+ *
9
+ * html`${instanceStyle(view.layoutCss)}`
10
+ */
11
+ declare class InstanceStyleDirective extends Directive {
12
+ #private;
13
+ constructor(partInfo: PartInfo);
14
+ render(css: string | null | undefined): HTMLStyleElement | typeof nothing;
15
+ }
16
+ export declare const instanceStyle: (css: string | null | undefined) => DirectiveResult<typeof InstanceStyleDirective>;
17
+ export {};
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * A component's consumer links (its captured child elements), marked with a
3
- * Bootstrap class and the component's scope, so the scoped Bootstrap part
4
- * (`.nav-link:where([data-mps])`) styles them. Idempotent: an element calls it on every update.
3
+ * Bootstrap class only. Consumer DOM is never stamped: the nav part reaches
4
+ * it through its anchor (`.nav-link:where([data-mps], :is(.nav, .navbar-nav)[data-mps] *)`). Idempotent: an element calls it on every update.
5
5
  */
6
- export declare function markLinks(nodes: readonly Node[], className: string, scope: string): void;
6
+ export declare function markLinks(nodes: readonly Node[], className: string): void;
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,74 @@
1
+ import { CoreController as e, LightChildren as t, forwardHostAttrs as n, props as r, stringAttribute as i, takeHostAttrs as a } from "../machine/index.mjs";
2
+ import { LitElement as o, html as s, nothing as c } from "lit";
3
+ import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
4
+ import { marqueeCore as u, marqueeScopedStyles as d } from "@mintplayer/ui-core/marquee";
5
+ //#region libs/mintplayer-web-components/marquee/src/generated/marquee.view.generated.ts
6
+ function f({ view: e, slots: t = {}, hostAttrs: i }) {
7
+ return s`
8
+ <span data-mps="marquee" ${r(n(e.region, i))}>
9
+ <span data-mps="marquee" ${r(e.track)}>
10
+ ${t.default === void 0 ? c : t.default}
11
+ </span>
12
+ </span>
13
+ <button data-mps="marquee" ${r(e.button)}>${e.buttonText}</button>
14
+ `;
15
+ }
16
+ //#endregion
17
+ //#region libs/mintplayer-web-components/marquee/src/generated/mp-marquee.generated.ts
18
+ var p = class extends o {
19
+ static {
20
+ this.properties = {
21
+ label: {
22
+ type: String,
23
+ converter: i(null)
24
+ },
25
+ pauseText: {
26
+ type: String,
27
+ converter: i("Pause"),
28
+ attribute: "pause-text"
29
+ },
30
+ resumeText: {
31
+ type: String,
32
+ converter: i("Resume"),
33
+ attribute: "resume-text"
34
+ },
35
+ defaultRenderer: { attribute: !1 }
36
+ };
37
+ }
38
+ #e = new t(this);
39
+ #t = new e(this, u, {
40
+ idPrefix: "mp-marquee",
41
+ inputs: () => ({
42
+ label: this.label,
43
+ pauseText: this.pauseText,
44
+ resumeText: this.resumeText
45
+ }),
46
+ hostBag: (e) => ({
47
+ ...e.view.root,
48
+ "data-mps": "marquee"
49
+ })
50
+ });
51
+ constructor() {
52
+ super(), this.label = null, this.pauseText = "Pause", this.resumeText = "Resume";
53
+ }
54
+ createRenderRoot() {
55
+ return this;
56
+ }
57
+ willUpdate() {
58
+ this.#e.capture();
59
+ }
60
+ #n = null;
61
+ render() {
62
+ return f({
63
+ ...this.#t.props(),
64
+ slots: {
65
+ ...this.#e.slots,
66
+ ...this.defaultRenderer ? { default: this.defaultRenderer() } : {}
67
+ },
68
+ hostAttrs: this.#n ??= a(this)
69
+ });
70
+ }
71
+ };
72
+ typeof document < "u" && document.head && l("marquee", d), customElements.get("mp-marquee") || customElements.define("mp-marquee", p);
73
+ //#endregion
74
+ export { p as MpMarquee };
@@ -0,0 +1 @@
1
+ export { MpMarquee } from './mp-marquee.generated';
@@ -0,0 +1,13 @@
1
+ import { TemplateResult } from 'lit';
2
+ import { HostAttrs } from '@mintplayer/web-components/machine';
3
+ import { MarqueeView } from '@mintplayer/ui-core/marquee';
4
+ export type MarqueeTemplateProps = {
5
+ view: MarqueeView;
6
+ } & {
7
+ slots?: {
8
+ default?: unknown;
9
+ };
10
+ /** The element's forwarded aria-* / id / tabindex (takeHostAttrs), for its mp-attrs node. */
11
+ hostAttrs?: HostAttrs | null;
12
+ };
13
+ export declare function marqueeTemplate({ view, slots, hostAttrs }: MarqueeTemplateProps): TemplateResult;
@@ -0,0 +1,48 @@
1
+ import { LitElement } from 'lit';
2
+ import { MarqueeInputs } from '@mintplayer/ui-core/marquee';
3
+ /** A scrolling ticker with a pause button (`pauseText` / `resumeText`), named by `label`. Hover, focus and reduced motion stop it. */
4
+ export declare class MpMarquee extends LitElement {
5
+ #private;
6
+ static properties: {
7
+ label: {
8
+ type: StringConstructor;
9
+ converter: {
10
+ fromAttribute: (value: string | null) => string | null;
11
+ toAttribute: (value: unknown) => string | null;
12
+ };
13
+ };
14
+ pauseText: {
15
+ type: StringConstructor;
16
+ converter: {
17
+ fromAttribute: (value: string | null) => string;
18
+ toAttribute: (value: unknown) => string | null;
19
+ };
20
+ attribute: string;
21
+ };
22
+ resumeText: {
23
+ type: StringConstructor;
24
+ converter: {
25
+ fromAttribute: (value: string | null) => string;
26
+ toAttribute: (value: unknown) => string | null;
27
+ };
28
+ attribute: string;
29
+ };
30
+ defaultRenderer: {
31
+ attribute: boolean;
32
+ };
33
+ };
34
+ label: MarqueeInputs['label'];
35
+ pauseText: MarqueeInputs['pauseText'];
36
+ resumeText: MarqueeInputs['resumeText'];
37
+ /** Renders the default slot; wins over slot="default" children. */
38
+ defaultRenderer: (() => unknown) | null | undefined;
39
+ constructor();
40
+ protected createRenderRoot(): HTMLElement;
41
+ protected willUpdate(): void;
42
+ render(): import('lit-html').TemplateResult;
43
+ }
44
+ declare global {
45
+ interface HTMLElementTagNameMap {
46
+ 'mp-marquee': MpMarquee;
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ export * from './generated';
@@ -0,0 +1 @@
1
+ export * from './src';