@aquera/nile-elements 1.3.0-beta-1.0 → 1.3.0-beta-1.1

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 (540) hide show
  1. package/README.md +0 -1
  2. package/demo/index.css +0 -3
  3. package/demo/index.html +32 -79
  4. package/demo/variables.css +1 -0
  5. package/dist/{fixture-dff65c89.cjs.js → fixture-54600b35.cjs.js} +2 -2
  6. package/dist/{fixture-1c49c014.cjs.js.map → fixture-54600b35.cjs.js.map} +1 -1
  7. package/dist/{fixture-1c49c014.cjs.js → fixture-5b79f853.cjs.js} +2 -2
  8. package/dist/{fixture-dff65c89.cjs.js.map → fixture-5b79f853.cjs.js.map} +1 -1
  9. package/dist/{fixture-f575d0df.cjs.js → fixture-73855806.cjs.js} +4 -4
  10. package/dist/fixture-73855806.cjs.js.map +1 -0
  11. package/dist/fixture-90b199c4.esm.js +569 -0
  12. package/dist/{fixture-985bba12.esm.js → fixture-9871e8a9.esm.js} +1 -1
  13. package/dist/fixture-c1d78368.cjs.js +395 -0
  14. package/dist/fixture-c1d78368.cjs.js.map +1 -0
  15. package/dist/{fixture-eddab1c0.esm.js → fixture-cf7bfcf5.esm.js} +2 -2
  16. package/dist/fixture-dbd66009.cjs.js +395 -0
  17. package/dist/fixture-dbd66009.cjs.js.map +1 -0
  18. package/dist/index.cjs.js +1 -1
  19. package/dist/index.esm.js +1 -1
  20. package/dist/index.js +173 -188
  21. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  22. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  23. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  24. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  25. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  26. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  27. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  28. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  29. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  30. package/dist/nile-button/nile-button.test.esm.js +1 -1
  31. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  32. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  33. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  34. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  35. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  36. package/dist/nile-card/nile-card.test.esm.js +1 -1
  37. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  38. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  39. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  40. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  41. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js +2 -0
  42. package/dist/nile-code-editor/backup_nile-code-editor copy.cjs.js.map +1 -0
  43. package/dist/nile-code-editor/backup_nile-code-editor copy.esm.js +1 -0
  44. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  45. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  46. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  47. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  48. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  49. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  50. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  51. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  52. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  53. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  54. package/dist/nile-file-preview/nile-file-preview.test.cjs.js +1 -1
  55. package/dist/nile-file-preview/nile-file-preview.test.esm.js +1 -1
  56. package/dist/nile-file-upload/nile-file-upload.test.cjs.js +1 -1
  57. package/dist/nile-file-upload/nile-file-upload.test.esm.js +1 -1
  58. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +1 -1
  59. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +1 -1
  60. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  61. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  62. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  63. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  64. package/dist/nile-grid-body/index.cjs.js +2 -0
  65. package/dist/nile-grid-body/index.esm.js +1 -0
  66. package/dist/nile-grid-body/nile-grid-body.cjs.js +2 -0
  67. package/dist/nile-grid-body/nile-grid-body.cjs.js.map +1 -0
  68. package/dist/nile-grid-body/nile-grid-body.css.cjs.js +2 -0
  69. package/dist/nile-grid-body/nile-grid-body.css.cjs.js.map +1 -0
  70. package/dist/nile-grid-body/nile-grid-body.css.esm.js +10 -0
  71. package/dist/nile-grid-body/nile-grid-body.esm.js +5 -0
  72. package/dist/nile-grid-cell-item/index.cjs.js +2 -0
  73. package/dist/nile-grid-cell-item/index.cjs.js.map +1 -0
  74. package/dist/nile-grid-cell-item/index.esm.js +1 -0
  75. package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js +2 -0
  76. package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +1 -0
  77. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +2 -0
  78. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +1 -0
  79. package/dist/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +35 -0
  80. package/dist/nile-grid-cell-item/nile-grid-cell-item.esm.js +12 -0
  81. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js +2 -0
  82. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +1 -0
  83. package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.esm.js +1 -0
  84. package/dist/nile-grid-head/index.cjs.js +2 -0
  85. package/dist/nile-grid-head/index.cjs.js.map +1 -0
  86. package/dist/nile-grid-head/index.esm.js +1 -0
  87. package/dist/nile-grid-head/nile-grid-head.cjs.js +2 -0
  88. package/dist/nile-grid-head/nile-grid-head.cjs.js.map +1 -0
  89. package/dist/nile-grid-head/nile-grid-head.css.cjs.js +2 -0
  90. package/dist/nile-grid-head/nile-grid-head.css.cjs.js.map +1 -0
  91. package/dist/nile-grid-head/nile-grid-head.css.esm.js +7 -0
  92. package/dist/nile-grid-head/nile-grid-head.esm.js +5 -0
  93. package/dist/nile-grid-head-item/index.cjs.js +2 -0
  94. package/dist/nile-grid-head-item/index.cjs.js.map +1 -0
  95. package/dist/nile-grid-head-item/index.esm.js +1 -0
  96. package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js +2 -0
  97. package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -0
  98. package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js +2 -0
  99. package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +1 -0
  100. package/dist/nile-grid-head-item/nile-grid-head-item.css.esm.js +34 -0
  101. package/dist/nile-grid-head-item/nile-grid-head-item.esm.js +12 -0
  102. package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +2 -0
  103. package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +1 -0
  104. package/dist/nile-grid-head-item/nile-grid-head-item.utils.esm.js +1 -0
  105. package/dist/nile-grid-row/index.cjs.js +2 -0
  106. package/dist/nile-grid-row/index.cjs.js.map +1 -0
  107. package/dist/nile-grid-row/index.esm.js +1 -0
  108. package/dist/nile-grid-row/nile-grid-row.cjs.js +2 -0
  109. package/dist/nile-grid-row/nile-grid-row.cjs.js.map +1 -0
  110. package/dist/nile-grid-row/nile-grid-row.css.cjs.js +2 -0
  111. package/dist/nile-grid-row/nile-grid-row.css.cjs.js.map +1 -0
  112. package/dist/nile-grid-row/nile-grid-row.css.esm.js +15 -0
  113. package/dist/nile-grid-row/nile-grid-row.esm.js +7 -0
  114. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  115. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  116. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  117. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  118. package/dist/nile-inline-edit/index.cjs.js +1 -1
  119. package/dist/nile-inline-edit/index.esm.js +1 -1
  120. package/dist/nile-inline-edit/nile-inline-edit-utils.cjs.js +2 -0
  121. package/dist/nile-inline-edit/nile-inline-edit-utils.cjs.js.map +1 -0
  122. package/dist/nile-inline-edit/nile-inline-edit-utils.esm.js +1 -0
  123. package/dist/nile-inline-edit/nile-inline-edit.cjs.js +1 -1
  124. package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
  125. package/dist/nile-inline-edit/nile-inline-edit.esm.js +4 -4
  126. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
  127. package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
  128. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
  129. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
  130. package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +2 -2
  131. package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +6 -10
  132. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
  133. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
  134. package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +2 -2
  135. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  136. package/dist/nile-input/nile-input.test.esm.js +1 -1
  137. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  138. package/dist/nile-link/nile-link.test.esm.js +1 -1
  139. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  140. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  141. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  142. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  143. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  144. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  145. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  146. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  147. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  148. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  149. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  150. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  151. package/dist/nile-rich-text-editor/utils.cjs.js +2 -0
  152. package/dist/nile-rich-text-editor/utils.cjs.js.map +1 -0
  153. package/dist/nile-rich-text-editor/utils.esm.js +1 -0
  154. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  155. package/dist/nile-select/nile-select.test.esm.js +1 -1
  156. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
  157. package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
  158. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js +1 -1
  159. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.cjs.js.map +1 -1
  160. package/dist/nile-side-bar-expand/nile-side-bar-expand.css.esm.js +5 -3
  161. package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +6 -6
  162. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js +1 -1
  163. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.cjs.js.map +1 -1
  164. package/dist/nile-side-bar-footer/nile-side-bar-footer.css.esm.js +1 -0
  165. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
  166. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
  167. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js +1 -1
  168. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.cjs.js.map +1 -1
  169. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.css.esm.js +5 -17
  170. package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +3 -3
  171. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js +1 -1
  172. package/dist/nile-side-bar-group/nile-side-bar-group.css.cjs.js.map +1 -1
  173. package/dist/nile-side-bar-group/nile-side-bar-group.css.esm.js +2 -2
  174. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js +1 -1
  175. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.cjs.js.map +1 -1
  176. package/dist/nile-side-bar-group-item/nile-side-bar-group-item.css.esm.js +56 -58
  177. package/dist/nile-sidebar/index.cjs.js +2 -0
  178. package/dist/nile-sidebar/index.cjs.js.map +1 -0
  179. package/dist/nile-sidebar/index.esm.js +75 -0
  180. package/dist/nile-sidebar-menu/index.cjs.js +2 -0
  181. package/dist/nile-sidebar-menu/index.cjs.js.map +1 -0
  182. package/dist/nile-sidebar-menu/index.esm.js +1 -0
  183. package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js +2 -0
  184. package/dist/nile-sidebar-menu/nile-sidebar-menu.cjs.js.map +1 -0
  185. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js +2 -0
  186. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.cjs.js.map +1 -0
  187. package/dist/nile-sidebar-menu/nile-sidebar-menu.css.esm.js +38 -0
  188. package/dist/nile-sidebar-menu/nile-sidebar-menu.esm.js +10 -0
  189. package/dist/nile-sidebar-menu-items/index.cjs.js +2 -0
  190. package/dist/nile-sidebar-menu-items/index.cjs.js.map +1 -0
  191. package/dist/nile-sidebar-menu-items/index.esm.js +1 -0
  192. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js +2 -0
  193. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.cjs.js.map +1 -0
  194. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js +2 -0
  195. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.cjs.js.map +1 -0
  196. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.css.esm.js +36 -0
  197. package/dist/nile-sidebar-menu-items/nile-sidebar-menu-items.esm.js +15 -0
  198. package/dist/nile-sidebar-wrapper/index.cjs.js +2 -0
  199. package/dist/nile-sidebar-wrapper/index.cjs.js.map +1 -0
  200. package/dist/nile-sidebar-wrapper/index.esm.js +1 -0
  201. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js +2 -0
  202. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.cjs.js.map +1 -0
  203. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js +2 -0
  204. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.cjs.js.map +1 -0
  205. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.css.esm.js +105 -0
  206. package/dist/nile-sidebar-wrapper/nile-sidebar-wrapper.esm.js +16 -0
  207. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  208. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  209. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  210. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  211. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  212. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  213. package/dist/nile-virtual-select/group-manager.cjs.js +2 -0
  214. package/dist/nile-virtual-select/group-manager.cjs.js.map +1 -0
  215. package/dist/nile-virtual-select/group-manager.esm.js +1 -0
  216. package/dist/nile-virtual-select/nile-virtual-select.test.cjs.js +1 -1
  217. package/dist/nile-virtual-select/nile-virtual-select.test.esm.js +1 -1
  218. package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js +2 -0
  219. package/dist/nile-virtual-select/temp_nile-virtual-select copy.cjs.js.map +1 -0
  220. package/dist/nile-virtual-select/temp_nile-virtual-select copy.esm.js +231 -0
  221. package/dist/scopedElementsWrapper-4c29be11.esm.js +7 -0
  222. package/dist/scopedElementsWrapper-a112fc73.cjs.js +6 -0
  223. package/dist/scopedElementsWrapper-a112fc73.cjs.js.map +1 -0
  224. package/dist/scopedElementsWrapper-c815042c.cjs.js +2 -0
  225. package/dist/scopedElementsWrapper-c815042c.cjs.js.map +1 -0
  226. package/dist/src/internal/portal-manager.d.ts +53 -0
  227. package/dist/src/internal/portal-manager.js +196 -0
  228. package/dist/src/internal/portal-manager.js.map +1 -0
  229. package/dist/src/internal/portal.d.ts +60 -0
  230. package/dist/src/internal/portal.js +199 -0
  231. package/dist/src/internal/portal.js.map +1 -0
  232. package/dist/src/internal/resizable-helper.d.ts +59 -0
  233. package/dist/src/internal/resizable-helper.js +115 -0
  234. package/dist/src/internal/resizable-helper.js.map +1 -0
  235. package/dist/src/internal/resizable-styles.d.ts +16 -0
  236. package/dist/src/internal/resizable-styles.js +144 -0
  237. package/dist/src/internal/resizable-styles.js.map +1 -0
  238. package/dist/src/internal/virtualizer-error-handler.d.ts +30 -0
  239. package/dist/src/internal/virtualizer-error-handler.js +82 -0
  240. package/dist/src/internal/virtualizer-error-handler.js.map +1 -0
  241. package/dist/src/lib/index.d.ts +7 -0
  242. package/dist/src/lib/index.js +8 -0
  243. package/dist/src/lib/index.js.map +1 -0
  244. package/dist/src/lib/virtualize.d.ts +32 -0
  245. package/dist/src/lib/virtualize.js +105 -0
  246. package/dist/src/lib/virtualize.js.map +1 -0
  247. package/dist/src/lib/virtualize.test.d.ts +7 -0
  248. package/dist/src/lib/virtualize.test.js +57 -0
  249. package/dist/src/lib/virtualize.test.js.map +1 -0
  250. package/dist/src/nile-badge/__snapshots__/nile-badge.test.snap.js +17 -0
  251. package/dist/src/nile-calendar/__snapshots__/nile-calendar.test.snap.js +310 -0
  252. package/dist/src/nile-card/__snapshots__/nile-card.test.snap.js +34 -0
  253. package/dist/src/nile-checkbox/__snapshots__/nile-checkbox.test.snap.js +31 -0
  254. package/dist/src/nile-code-editor/Old_theme copy.d.ts +191 -0
  255. package/dist/src/nile-code-editor/Old_theme copy.js +193 -0
  256. package/dist/src/nile-code-editor/Old_theme copy.js.map +1 -0
  257. package/dist/src/nile-code-editor/backup_nile-code-editor copy.d.ts +0 -0
  258. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js +675 -0
  259. package/dist/src/nile-code-editor/backup_nile-code-editor copy.js.map +1 -0
  260. package/dist/src/nile-code-editor/theme copy.d.ts +191 -0
  261. package/dist/src/nile-code-editor/theme copy.js +193 -0
  262. package/dist/src/nile-code-editor/theme copy.js.map +1 -0
  263. package/dist/src/nile-grid/data-processor.d.ts +37 -0
  264. package/dist/src/nile-grid/data-processor.js +122 -0
  265. package/dist/src/nile-grid/data-processor.js.map +1 -0
  266. package/dist/src/nile-grid/event-handlers.d.ts +35 -0
  267. package/dist/src/nile-grid/event-handlers.js +158 -0
  268. package/dist/src/nile-grid/event-handlers.js.map +1 -0
  269. package/dist/src/nile-grid/renderer.d.ts +8 -0
  270. package/dist/src/nile-grid/renderer.js +78 -0
  271. package/dist/src/nile-grid/renderer.js.map +1 -0
  272. package/dist/src/nile-grid/resize-handler.d.ts +4 -0
  273. package/dist/src/nile-grid/resize-handler.js +36 -0
  274. package/dist/src/nile-grid/resize-handler.js.map +1 -0
  275. package/dist/src/nile-grid/types.d.ts +32 -0
  276. package/dist/src/nile-grid/types.js +2 -0
  277. package/dist/src/nile-grid/types.js.map +1 -0
  278. package/dist/src/nile-grid/utils.d.ts +4 -0
  279. package/dist/src/nile-grid/utils.js +32 -0
  280. package/dist/src/nile-grid/utils.js.map +1 -0
  281. package/dist/src/nile-grid-body/index.d.ts +1 -0
  282. package/dist/src/nile-grid-body/index.js +2 -0
  283. package/dist/src/nile-grid-body/index.js.map +1 -0
  284. package/dist/src/nile-grid-body/nile-grid-body.css.d.ts +12 -0
  285. package/dist/src/nile-grid-body/nile-grid-body.css.js +22 -0
  286. package/dist/src/nile-grid-body/nile-grid-body.css.js.map +1 -0
  287. package/dist/src/nile-grid-body/nile-grid-body.d.ts +29 -0
  288. package/dist/src/nile-grid-body/nile-grid-body.js +43 -0
  289. package/dist/src/nile-grid-body/nile-grid-body.js.map +1 -0
  290. package/dist/src/nile-grid-cell-item/index.d.ts +1 -0
  291. package/dist/src/nile-grid-cell-item/index.js +2 -0
  292. package/dist/src/nile-grid-cell-item/index.js.map +1 -0
  293. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.d.ts +12 -0
  294. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js +47 -0
  295. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js.map +1 -0
  296. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.d.ts +36 -0
  297. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js +93 -0
  298. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js.map +1 -0
  299. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.d.ts +10 -0
  300. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js +34 -0
  301. package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +1 -0
  302. package/dist/src/nile-grid-head/index.d.ts +1 -0
  303. package/dist/src/nile-grid-head/index.js +2 -0
  304. package/dist/src/nile-grid-head/index.js.map +1 -0
  305. package/dist/src/nile-grid-head/nile-grid-head.css.d.ts +12 -0
  306. package/dist/src/nile-grid-head/nile-grid-head.css.js +19 -0
  307. package/dist/src/nile-grid-head/nile-grid-head.css.js.map +1 -0
  308. package/dist/src/nile-grid-head/nile-grid-head.d.ts +28 -0
  309. package/dist/src/nile-grid-head/nile-grid-head.js +41 -0
  310. package/dist/src/nile-grid-head/nile-grid-head.js.map +1 -0
  311. package/dist/src/nile-grid-head-item/index.d.ts +1 -0
  312. package/dist/src/nile-grid-head-item/index.js +2 -0
  313. package/dist/src/nile-grid-head-item/index.js.map +1 -0
  314. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.d.ts +12 -0
  315. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js +46 -0
  316. package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js.map +1 -0
  317. package/dist/src/nile-grid-head-item/nile-grid-head-item.d.ts +37 -0
  318. package/dist/src/nile-grid-head-item/nile-grid-head-item.js +100 -0
  319. package/dist/src/nile-grid-head-item/nile-grid-head-item.js.map +1 -0
  320. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.d.ts +10 -0
  321. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js +34 -0
  322. package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js.map +1 -0
  323. package/dist/src/nile-grid-row/index.d.ts +1 -0
  324. package/dist/src/nile-grid-row/index.js +2 -0
  325. package/dist/src/nile-grid-row/index.js.map +1 -0
  326. package/dist/src/nile-grid-row/nile-grid-row.css.d.ts +12 -0
  327. package/dist/src/nile-grid-row/nile-grid-row.css.js +27 -0
  328. package/dist/src/nile-grid-row/nile-grid-row.css.js.map +1 -0
  329. package/dist/src/nile-grid-row/nile-grid-row.d.ts +29 -0
  330. package/dist/src/nile-grid-row/nile-grid-row.js +45 -0
  331. package/dist/src/nile-grid-row/nile-grid-row.js.map +1 -0
  332. package/dist/src/nile-hero/__snapshots__/nile-hero.test.snap.js +47 -0
  333. package/dist/src/nile-icon/__snapshots__/nile-icon.test.snap.js +16 -0
  334. package/dist/src/nile-inline-edit/nile-inline-edit-utils.d.ts +20 -0
  335. package/dist/src/nile-inline-edit/nile-inline-edit-utils.js +70 -0
  336. package/dist/src/nile-inline-edit/nile-inline-edit-utils.js.map +1 -0
  337. package/dist/src/nile-inline-edit/nile-inline-edit.d.ts +8 -0
  338. package/dist/src/nile-inline-edit/nile-inline-edit.js +47 -1
  339. package/dist/src/nile-inline-edit/nile-inline-edit.js.map +1 -1
  340. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +2 -2
  341. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
  342. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +3 -10
  343. package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
  344. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +0 -1
  345. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +0 -4
  346. package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
  347. package/dist/src/nile-input/__snapshots__/nile-input.test.snap.js +75 -0
  348. package/dist/src/nile-menu/portal-manager.d.ts +39 -0
  349. package/dist/src/nile-menu/portal-manager.js +340 -0
  350. package/dist/src/nile-menu/portal-manager.js.map +1 -0
  351. package/dist/src/nile-menu/portal-utils.d.ts +21 -0
  352. package/dist/src/nile-menu/portal-utils.js +128 -0
  353. package/dist/src/nile-menu/portal-utils.js.map +1 -0
  354. package/dist/src/nile-popover/__snapshots__/nile-popover.test.snap.js +22 -0
  355. package/dist/src/nile-popover/popover-portal-handler.d.ts +21 -0
  356. package/dist/src/nile-popover/popover-portal-handler.js +106 -0
  357. package/dist/src/nile-popover/popover-portal-handler.js.map +1 -0
  358. package/dist/src/nile-portal-wrapper/index.d.ts +1 -0
  359. package/dist/src/nile-portal-wrapper/index.js +2 -0
  360. package/dist/src/nile-portal-wrapper/index.js.map +1 -0
  361. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.d.ts +47 -0
  362. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js +451 -0
  363. package/dist/src/nile-portal-wrapper/nile-portal-wrapper.js.map +1 -0
  364. package/dist/src/nile-rich-text-editor/utils.d.ts +13 -0
  365. package/dist/src/nile-rich-text-editor/utils.js +538 -0
  366. package/dist/src/nile-rich-text-editor/utils.js.map +1 -0
  367. package/dist/src/nile-select/body-append-manager.d.ts +90 -0
  368. package/dist/src/nile-select/body-append-manager.js +298 -0
  369. package/dist/src/nile-select/body-append-manager.js.map +1 -0
  370. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js +5 -3
  371. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.css.js.map +1 -1
  372. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js +4 -4
  373. package/dist/src/nile-side-bar-expand/nile-side-bar-expand.js.map +1 -1
  374. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js +1 -0
  375. package/dist/src/nile-side-bar-footer/nile-side-bar-footer.css.js.map +1 -1
  376. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js +3 -15
  377. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.js.map +1 -1
  378. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.d.ts +15 -9
  379. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js +15 -36
  380. package/dist/src/nile-side-bar-footer-item/nile-side-bar-footer-item.js.map +1 -1
  381. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js +2 -2
  382. package/dist/src/nile-side-bar-group/nile-side-bar-group.css.js.map +1 -1
  383. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js +46 -48
  384. package/dist/src/nile-side-bar-group-item/nile-side-bar-group-item.css.js.map +1 -1
  385. package/dist/src/nile-sidebar/index.d.ts +28 -0
  386. package/dist/src/nile-sidebar/index.js +116 -0
  387. package/dist/src/nile-sidebar/index.js.map +1 -0
  388. package/dist/src/nile-sidebar-menu/index.d.ts +1 -0
  389. package/dist/src/nile-sidebar-menu/index.js +2 -0
  390. package/dist/src/nile-sidebar-menu/index.js.map +1 -0
  391. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.d.ts +12 -0
  392. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js +47 -0
  393. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.css.js.map +1 -0
  394. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.d.ts +37 -0
  395. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js +84 -0
  396. package/dist/src/nile-sidebar-menu/nile-sidebar-menu.js.map +1 -0
  397. package/dist/src/nile-sidebar-menu-items/index.d.ts +1 -0
  398. package/dist/src/nile-sidebar-menu-items/index.js +2 -0
  399. package/dist/src/nile-sidebar-menu-items/index.js.map +1 -0
  400. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.d.ts +12 -0
  401. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js +45 -0
  402. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.css.js.map +1 -0
  403. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.d.ts +35 -0
  404. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js +78 -0
  405. package/dist/src/nile-sidebar-menu-items/nile-sidebar-menu-items.js.map +1 -0
  406. package/dist/src/nile-sidebar-wrapper/index.d.ts +1 -0
  407. package/dist/src/nile-sidebar-wrapper/index.js +2 -0
  408. package/dist/src/nile-sidebar-wrapper/index.js.map +1 -0
  409. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.d.ts +12 -0
  410. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js +114 -0
  411. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.css.js.map +1 -0
  412. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.d.ts +35 -0
  413. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js +89 -0
  414. package/dist/src/nile-sidebar-wrapper/nile-sidebar-wrapper.js.map +1 -0
  415. package/dist/src/nile-table-body/virtual-scroll-helper.d.ts +9 -0
  416. package/dist/src/nile-table-body/virtual-scroll-helper.js +24 -0
  417. package/dist/src/nile-table-body/virtual-scroll-helper.js.map +1 -0
  418. package/dist/src/nile-virtual-select/body-append-helper.d.ts +16 -0
  419. package/dist/src/nile-virtual-select/body-append-helper.js +95 -0
  420. package/dist/src/nile-virtual-select/body-append-helper.js.map +1 -0
  421. package/dist/src/nile-virtual-select/group-manager.d.ts +32 -0
  422. package/dist/src/nile-virtual-select/group-manager.js +134 -0
  423. package/dist/src/nile-virtual-select/group-manager.js.map +1 -0
  424. package/dist/src/nile-virtual-select/portal-utils.d.ts +65 -0
  425. package/dist/src/nile-virtual-select/portal-utils.js +376 -0
  426. package/dist/src/nile-virtual-select/portal-utils.js.map +1 -0
  427. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.d.ts +273 -0
  428. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js +1305 -0
  429. package/dist/src/nile-virtual-select/temp_nile-virtual-select copy.js.map +1 -0
  430. package/dist/src/nile-virtual-select/virtualizer-error-handler.d.ts +21 -0
  431. package/dist/src/nile-virtual-select/virtualizer-error-handler.js +56 -0
  432. package/dist/src/nile-virtual-select/virtualizer-error-handler.js.map +1 -0
  433. package/dist/src/nile-virtual-select-disabled/index.d.ts +1 -0
  434. package/dist/src/nile-virtual-select-disabled/index.js +2 -0
  435. package/dist/src/nile-virtual-select-disabled/index.js.map +1 -0
  436. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.d.ts +12 -0
  437. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js +538 -0
  438. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.css.js.map +1 -0
  439. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.d.ts +299 -0
  440. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js +1441 -0
  441. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.js.map +1 -0
  442. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.d.ts +7 -0
  443. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js +631 -0
  444. package/dist/src/nile-virtual-select-disabled/nile-virtual-select.test.js.map +1 -0
  445. package/dist/src/nile-virtual-select-disabled/portal-manager.d.ts +45 -0
  446. package/dist/src/nile-virtual-select-disabled/portal-manager.js +333 -0
  447. package/dist/src/nile-virtual-select-disabled/portal-manager.js.map +1 -0
  448. package/dist/src/nile-virtual-select-disabled/renderer.d.ts +16 -0
  449. package/dist/src/nile-virtual-select-disabled/renderer.js +79 -0
  450. package/dist/src/nile-virtual-select-disabled/renderer.js.map +1 -0
  451. package/dist/src/nile-virtual-select-disabled/search-manager.d.ts +12 -0
  452. package/dist/src/nile-virtual-select-disabled/search-manager.js +40 -0
  453. package/dist/src/nile-virtual-select-disabled/search-manager.js.map +1 -0
  454. package/dist/src/nile-virtual-select-disabled/selection-manager.d.ts +12 -0
  455. package/dist/src/nile-virtual-select-disabled/selection-manager.js +64 -0
  456. package/dist/src/nile-virtual-select-disabled/selection-manager.js.map +1 -0
  457. package/dist/src/nile-virtual-select-disabled/types.d.ts +50 -0
  458. package/dist/src/nile-virtual-select-disabled/types.js +8 -0
  459. package/dist/src/nile-virtual-select-disabled/types.js.map +1 -0
  460. package/dist/src/nile-virtual-table-body/index.d.ts +2 -0
  461. package/dist/src/nile-virtual-table-body/index.js +3 -0
  462. package/dist/src/nile-virtual-table-body/index.js.map +1 -0
  463. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.d.ts +1 -0
  464. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js +44 -0
  465. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.css.js.map +1 -0
  466. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.d.ts +50 -0
  467. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js +135 -0
  468. package/dist/src/nile-virtual-table-body/nile-virtual-table-body.js.map +1 -0
  469. package/dist/src/nile-virtual-table-body/renderer.d.ts +16 -0
  470. package/dist/src/nile-virtual-table-body/renderer.js +49 -0
  471. package/dist/src/nile-virtual-table-body/renderer.js.map +1 -0
  472. package/dist/src/utilities/stepper-utils.d.ts +71 -0
  473. package/dist/src/utilities/stepper-utils.js +108 -0
  474. package/dist/src/utilities/stepper-utils.js.map +1 -0
  475. package/dist/src/version.js +1 -1
  476. package/dist/src/version.js.map +1 -1
  477. package/dist/tsconfig.tsbuildinfo +1 -1
  478. package/package.json +2 -2
  479. package/src/nile-inline-edit/nile-inline-edit-utils.ts +94 -0
  480. package/src/nile-inline-edit/nile-inline-edit.ts +59 -1
  481. package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +2 -2
  482. package/src/nile-inline-sidebar/nile-inline-sidebar.ts +5 -16
  483. package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +0 -1
  484. package/src/nile-side-bar-expand/nile-side-bar-expand.css.ts +5 -3
  485. package/src/nile-side-bar-expand/nile-side-bar-expand.ts +4 -4
  486. package/src/nile-side-bar-footer/nile-side-bar-footer.css.ts +1 -0
  487. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.css.ts +3 -15
  488. package/src/nile-side-bar-footer-item/nile-side-bar-footer-item.ts +16 -42
  489. package/src/nile-side-bar-group/nile-side-bar-group.css.ts +2 -2
  490. package/src/nile-side-bar-group-item/nile-side-bar-group-item.css.ts +47 -49
  491. package/vscode-html-custom-data.json +8 -30
  492. package/dist/axe.min-140df6c2.cjs.js +0 -2
  493. package/dist/axe.min-140df6c2.cjs.js.map +0 -1
  494. package/dist/axe.min-591c52c3.esm.js +0 -1
  495. package/dist/fixture-f575d0df.cjs.js.map +0 -1
  496. package/dist/floating-ui.dom-70d5643f.esm.js +0 -1
  497. package/dist/floating-ui.dom-f19772dc.cjs.js +0 -2
  498. package/dist/floating-ui.dom-f19772dc.cjs.js.map +0 -1
  499. package/dist/flow-3e83b6f4.esm.js +0 -17
  500. package/dist/flow-ca47f938.cjs.js +0 -14
  501. package/dist/flow-ca47f938.cjs.js.map +0 -1
  502. package/dist/nile-light-tooltip/index.cjs.js +0 -2
  503. package/dist/nile-light-tooltip/index.esm.js +0 -1
  504. package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js +0 -2
  505. package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js.map +0 -1
  506. package/dist/nile-light-tooltip/nile-light-tooltip.css.cjs.js +0 -2
  507. package/dist/nile-light-tooltip/nile-light-tooltip.css.cjs.js.map +0 -1
  508. package/dist/nile-light-tooltip/nile-light-tooltip.css.esm.js +0 -5
  509. package/dist/nile-light-tooltip/nile-light-tooltip.esm.js +0 -1
  510. package/dist/nile-light-tooltip/utils.cjs.js +0 -2
  511. package/dist/nile-light-tooltip/utils.cjs.js.map +0 -1
  512. package/dist/nile-light-tooltip/utils.esm.js +0 -1
  513. package/dist/scopedElementsWrapper-067597d2.cjs.js +0 -6
  514. package/dist/scopedElementsWrapper-067597d2.cjs.js.map +0 -1
  515. package/dist/scopedElementsWrapper-4374e962.esm.js +0 -7
  516. package/dist/sinon-esm-283dcc9b.cjs.js +0 -2
  517. package/dist/sinon-esm-283dcc9b.cjs.js.map +0 -1
  518. package/dist/sinon-esm-abe9b0ec.esm.js +0 -1
  519. package/dist/src/nile-light-tooltip/index.d.ts +0 -1
  520. package/dist/src/nile-light-tooltip/index.js +0 -2
  521. package/dist/src/nile-light-tooltip/index.js.map +0 -1
  522. package/dist/src/nile-light-tooltip/nile-light-tooltip.css.d.ts +0 -12
  523. package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js +0 -17
  524. package/dist/src/nile-light-tooltip/nile-light-tooltip.css.js.map +0 -1
  525. package/dist/src/nile-light-tooltip/nile-light-tooltip.d.ts +0 -79
  526. package/dist/src/nile-light-tooltip/nile-light-tooltip.js +0 -350
  527. package/dist/src/nile-light-tooltip/nile-light-tooltip.js.map +0 -1
  528. package/dist/src/nile-light-tooltip/nile-lite-tooltip.css.d.ts +0 -12
  529. package/dist/src/nile-light-tooltip/nile-lite-tooltip.css.js +0 -17
  530. package/dist/src/nile-light-tooltip/nile-lite-tooltip.css.js.map +0 -1
  531. package/dist/src/nile-light-tooltip/nile-lite-tooltip.d.ts +0 -79
  532. package/dist/src/nile-light-tooltip/nile-lite-tooltip.js +0 -350
  533. package/dist/src/nile-light-tooltip/nile-lite-tooltip.js.map +0 -1
  534. package/dist/src/nile-light-tooltip/utils.d.ts +0 -2
  535. package/dist/src/nile-light-tooltip/utils.js +0 -29
  536. package/dist/src/nile-light-tooltip/utils.js.map +0 -1
  537. package/dist/virtualize-73f68d08.esm.js +0 -22
  538. package/dist/virtualize-eb33a9a0.cjs.js +0 -18
  539. package/dist/virtualize-eb33a9a0.cjs.js.map +0 -1
  540. /package/dist/{nile-light-tooltip → nile-grid-body}/index.cjs.js.map +0 -0
@@ -1,350 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { customElement, property } from 'lit/decorators.js';
3
- import { styles } from './nile-lite-tooltip.css';
4
- import NileElement from '../internal/nile-element';
5
- import tippy, { followCursor, roundArrow, createSingleton } from 'tippy.js';
6
- import { parseFollowCursor, parseDuration } from './utils';
7
- /**
8
- * Nile lite-tooltip component.
9
- *
10
- * Supports wrapper, sibling (for), and singleton modes.
11
- * Aligns with Tippy.js props and Nile design system.
12
- *
13
- * @tag nile-lite-tooltip
14
- */
15
- let NileliteTooltip = class NileliteTooltip extends NileElement {
16
- static get styles() {
17
- return [styles];
18
- }
19
- createRenderRoot() {
20
- return this; // lite DOM
21
- }
22
- constructor() {
23
- super();
24
- // ───────────── Props ─────────────
25
- /** ID of the target element (for sibling mode) */
26
- this.for = null;
27
- /** Tooltip content text or HTML */
28
- this.content = '';
29
- /** Tooltip size (applies CSS class) */
30
- this.size = 'small';
31
- /** Animation duration for show/hide (ms). Can be a single value or [show, hide]. */
32
- this.duration = 200;
33
- /** Interactive mode */
34
- this.interactive = false;
35
- /** Placement of the tooltip */
36
- this.placement = 'top';
37
- /** Disabled state */
38
- this.disabled = false;
39
- /** Distance (Popper offset Y or main axis) */
40
- this.distance = 8;
41
- /** Skidding (Popper offset X or cross axis) */
42
- this.skidding = 0;
43
- /** Whether tooltip is open (controlled mode) */
44
- this.open = false;
45
- /** Trigger behavior */
46
- this.trigger = 'mouseenter focus';
47
- /** Hoist the tooltip to body (avoid clipping) */
48
- this.hoist = false;
49
- /** Allow HTML content rendering */
50
- this.allowHTML = false;
51
- /** Cursor following mode */
52
- this.followCursor = false;
53
- /** Arrow type for tooltip */
54
- this.arrow = 'default';
55
- /** Enables singleton mode when multiple children exist */
56
- this.singleton = false;
57
- /** Not added in Doc */
58
- /** Delay before show/hide (ms or [show, hide]) */
59
- this.delay = 0;
60
- /** Tooltip max width */
61
- this.maxWidth = 'auto';
62
- /** Z-index of tooltip */
63
- this.zIndex = 9999;
64
- /** Whether tooltip hides on click */
65
- this.hideOnClick = true;
66
- /** Enables inertia motion effect */
67
- this.inertia = false;
68
- /** Interactive border (px) */
69
- this.interactiveBorder = 2;
70
- this.injectTippyStyles();
71
- }
72
- // Inject custom styles for tooltips
73
- injectTippyStyles() {
74
- const STYLE_ID = 'nile-lite-tooltip-styles';
75
- if (document.getElementById(STYLE_ID))
76
- return;
77
- const style = document.createElement('style');
78
- style.id = STYLE_ID;
79
- style.textContent = `
80
- .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }
81
- [data-tippy-root] { max-width: calc(100vw - 10px); }
82
- .tippy-box {
83
- position: relative;
84
- background-color: #333;
85
- color: #fff;
86
- border-radius: 4px;
87
- font-size: 14px;
88
- line-height: 1.4;
89
- white-space: normal;
90
- outline: 0;
91
- transition-property: transform, visibility, opacity;
92
- }
93
-
94
- /* Placement-specific arrows */
95
- .tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }
96
- .tippy-box[data-placement^=top] > .tippy-arrow:before {
97
- bottom: -7px;
98
- border-width: 8px 8px 0;
99
- border-top-color: initial;
100
- }
101
-
102
- .tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }
103
- .tippy-box[data-placement^=bottom] > .tippy-arrow:before {
104
- top: -7px;
105
- border-width: 0 8px 8px;
106
- border-bottom-color: initial;
107
- }
108
-
109
- .tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }
110
- .tippy-box[data-placement^=left] > .tippy-arrow:before {
111
- right: -7px;
112
- border-width: 8px 0 8px 8px;
113
- border-left-color: initial;
114
- }
115
-
116
- .tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }
117
- .tippy-box[data-placement^=right] > .tippy-arrow:before {
118
- left: -7px;
119
- border-width: 8px 8px 8px 0;
120
- border-right-color: initial;
121
- }
122
-
123
- .tippy-box[data-inertia][data-state=visible] {
124
- transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);
125
- }
126
-
127
- .tippy-box.large { font-size: 16px; padding: 8px 12px; }
128
- .tippy-arrow { width: 16px; height: 16px; color: #333; }
129
- .tippy-arrow:before {
130
- content: "";
131
- position: absolute;
132
- border-color: transparent;
133
- border-style: solid;
134
- }
135
-
136
- .tippy-content {
137
- position: relative;
138
- padding: 2px 6px;
139
- z-index: 1;
140
- }
141
- .tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}
142
- `;
143
- document.head.appendChild(style);
144
- }
145
- firstUpdated() {
146
- this.attachTooltip();
147
- }
148
- attachTooltip() {
149
- this.destroyTooltips();
150
- if (this.disabled)
151
- return;
152
- const options = {
153
- content: this.content || this.getAttribute('data-tippy-content') || undefined,
154
- placement: this.placement,
155
- trigger: this.trigger,
156
- offset: [this.skidding, this.distance],
157
- theme: 'lite',
158
- animation: 'fade',
159
- interactive: this.interactive,
160
- arrow: roundArrow,
161
- duration: parseDuration(this.duration),
162
- allowHTML: this.allowHTML,
163
- delay: this.delay,
164
- maxWidth: this.maxWidth,
165
- zIndex: this.zIndex,
166
- hideOnClick: this.hideOnClick,
167
- inertia: this.inertia,
168
- interactiveBorder: this.interactiveBorder,
169
- appendTo: this.hoist ? document.body : undefined,
170
- followCursor: parseFollowCursor(this.followCursor),
171
- plugins: parseFollowCursor(this.followCursor) ? [followCursor] : [],
172
- onShow: instance => {
173
- this.open = true;
174
- this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));
175
- this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));
176
- return undefined;
177
- },
178
- onHide: instance => {
179
- this.open = false;
180
- this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));
181
- this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));
182
- return undefined;
183
- },
184
- };
185
- if (this.for) {
186
- this.targetEl = document.getElementById(this.for);
187
- if (!this.targetEl)
188
- return;
189
- if (!this.id) {
190
- this.generatedId = `nile-tooltip-${Math.random().toString(36).slice(2, 9)}`;
191
- this.id = this.generatedId;
192
- }
193
- this.prevDescribedby = this.targetEl.getAttribute('aria-describedby');
194
- const describedby = this.prevDescribedby
195
- ? `${this.prevDescribedby} ${this.id}`
196
- : this.id;
197
- this.targetEl.setAttribute('aria-describedby', describedby);
198
- this.singleInstance = tippy(this.targetEl, options);
199
- if (this.size)
200
- this.singleInstance.popper
201
- .querySelector('.tippy-box')
202
- ?.classList.add(this.size);
203
- if (this.open) {
204
- queueMicrotask(() => this.singleInstance?.show());
205
- }
206
- return;
207
- }
208
- // ───────────── Wrapper mode ─────────────
209
- const children = Array.from(this.querySelectorAll('*'));
210
- if (children.length > 0) {
211
- this.tooltipInstances = children.map(child => {
212
- const el = child;
213
- const localContent = el.getAttribute('content') || this.content;
214
- const instance = tippy(el, { ...options, content: localContent });
215
- instance.popper.querySelector('.tippy-box')?.classList.add(this.size);
216
- return instance;
217
- });
218
- if (this.singleton && this.tooltipInstances.length > 1) {
219
- this.singletonInstance = createSingleton(this.tooltipInstances, {
220
- delay: [75, 0],
221
- arrow: roundArrow,
222
- moveTransition: 'transform 0.15s ease-out',
223
- });
224
- }
225
- if (this.open) {
226
- if (this.singletonInstance)
227
- this.singletonInstance.show();
228
- else
229
- this.tooltipInstances.forEach(t => t.show());
230
- }
231
- }
232
- }
233
- destroyTooltips() {
234
- this.tooltipInstances?.forEach(t => t.destroy());
235
- this.singleInstance?.destroy();
236
- this.singletonInstance?.destroy();
237
- this.tooltipInstances = undefined;
238
- this.singleInstance = undefined;
239
- this.singletonInstance = undefined;
240
- if (this.targetEl && this.id) {
241
- const current = this.targetEl
242
- .getAttribute('aria-describedby')
243
- ?.split(' ')
244
- .filter(id => id !== this.id)
245
- .join(' ')
246
- .trim();
247
- if (current) {
248
- this.targetEl.setAttribute('aria-describedby', current);
249
- }
250
- else {
251
- this.targetEl.removeAttribute('aria-describedby');
252
- }
253
- }
254
- }
255
- disconnectedCallback() {
256
- super.disconnectedCallback();
257
- this.destroyTooltips();
258
- }
259
- updated(changed) {
260
- super.updated(changed);
261
- if (['for', 'content', 'placement', 'distance', 'skidding', 'trigger', 'disabled', 'hoist', 'size', 'arrow', 'singleton']
262
- .some(p => changed.has(p))) {
263
- this.attachTooltip();
264
- }
265
- if (changed.has('open')) {
266
- if (this.open) {
267
- this.singleInstance?.show();
268
- this.singletonInstance?.show();
269
- this.tooltipInstances?.forEach(t => t.show());
270
- }
271
- else {
272
- this.singleInstance?.hide();
273
- this.singletonInstance?.hide();
274
- this.tooltipInstances?.forEach(t => t.hide());
275
- }
276
- }
277
- }
278
- };
279
- __decorate([
280
- property({ type: String, attribute: 'for' })
281
- ], NileliteTooltip.prototype, "for", void 0);
282
- __decorate([
283
- property({ type: String, reflect: true })
284
- ], NileliteTooltip.prototype, "content", void 0);
285
- __decorate([
286
- property({ type: String, reflect: true })
287
- ], NileliteTooltip.prototype, "size", void 0);
288
- __decorate([
289
- property({ type: String, reflect: true })
290
- ], NileliteTooltip.prototype, "duration", void 0);
291
- __decorate([
292
- property({ type: Boolean, reflect: true })
293
- ], NileliteTooltip.prototype, "interactive", void 0);
294
- __decorate([
295
- property({ type: String })
296
- ], NileliteTooltip.prototype, "placement", void 0);
297
- __decorate([
298
- property({ type: Boolean })
299
- ], NileliteTooltip.prototype, "disabled", void 0);
300
- __decorate([
301
- property({ type: Number })
302
- ], NileliteTooltip.prototype, "distance", void 0);
303
- __decorate([
304
- property({ type: Number })
305
- ], NileliteTooltip.prototype, "skidding", void 0);
306
- __decorate([
307
- property({ type: Boolean, reflect: true })
308
- ], NileliteTooltip.prototype, "open", void 0);
309
- __decorate([
310
- property({ type: String })
311
- ], NileliteTooltip.prototype, "trigger", void 0);
312
- __decorate([
313
- property({ type: Boolean, reflect: true })
314
- ], NileliteTooltip.prototype, "hoist", void 0);
315
- __decorate([
316
- property({ type: Boolean, reflect: true })
317
- ], NileliteTooltip.prototype, "allowHTML", void 0);
318
- __decorate([
319
- property({ type: String, reflect: true, attribute: true })
320
- ], NileliteTooltip.prototype, "followCursor", void 0);
321
- __decorate([
322
- property({ type: String, reflect: true, attribute: true })
323
- ], NileliteTooltip.prototype, "arrow", void 0);
324
- __decorate([
325
- property({ type: Boolean, reflect: true })
326
- ], NileliteTooltip.prototype, "singleton", void 0);
327
- __decorate([
328
- property({ type: String, reflect: true })
329
- ], NileliteTooltip.prototype, "delay", void 0);
330
- __decorate([
331
- property({ type: String, reflect: true })
332
- ], NileliteTooltip.prototype, "maxWidth", void 0);
333
- __decorate([
334
- property({ type: Number })
335
- ], NileliteTooltip.prototype, "zIndex", void 0);
336
- __decorate([
337
- property({ type: [Boolean, String], reflect: true })
338
- ], NileliteTooltip.prototype, "hideOnClick", void 0);
339
- __decorate([
340
- property({ type: Boolean, reflect: true })
341
- ], NileliteTooltip.prototype, "inertia", void 0);
342
- __decorate([
343
- property({ type: Number })
344
- ], NileliteTooltip.prototype, "interactiveBorder", void 0);
345
- NileliteTooltip = __decorate([
346
- customElement('nile-lite-tooltip')
347
- ], NileliteTooltip);
348
- export { NileliteTooltip };
349
- export default NileliteTooltip;
350
- //# sourceMappingURL=nile-lite-tooltip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-lite-tooltip.js","sourceRoot":"","sources":["../../../src/nile-light-tooltip/nile-lite-tooltip.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,EAAmB,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE3D;;;;;;;GAOG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,WAAW;IACvC,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAES,gBAAgB;QACxB,OAAO,IAAI,CAAC,CAAC,WAAW;IAC1B,CAAC;IA4GD;QACE,KAAK,EAAE,CAAC;QA3GV,oCAAoC;QACpC,kDAAkD;QACJ,QAAG,GAAkB,IAAI,CAAC;QAExE,mCAAmC;QACQ,YAAO,GAAG,EAAE,CAAC;QAExD,uCAAuC;QACI,SAAI,GAAsB,OAAO,CAAC;QAE7E,oFAAoF;QACzC,aAAQ,GAAuC,GAAG,CAAC;QAE9F,uBAAuB;QACqB,gBAAW,GAAG,KAAK,CAAC;QAEhE,+BAA+B;QAE/B,cAAS,GAeQ,KAAK,CAAC;QAEvB,qBAAqB;QACQ,a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,IAAI,EAAE,CAAC;8CAAe;AAGd;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAmB;AAI9D;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;qDAOvC;AAIpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;8CAE/C;AAGgC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAmB;AAOrB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAsC;AAGrC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAoC;AAGlD;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAe;AAGY;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAAwC;AAGjD;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAiB;AAGhC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAAuB;AAvGrC,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAqV3B;;AAED,eAAe,eAAe,CAAC","sourcesContent":["import { customElement, property } from 'lit/decorators.js';\nimport { CSSResultArray, PropertyValues } from 'lit';\nimport { styles } from './nile-lite-tooltip.css';\nimport NileElement from '../internal/nile-element';\nimport tippy, { Instance, Props, followCursor, roundArrow, createSingleton } from 'tippy.js';\nimport { parseFollowCursor, parseDuration } from './utils';\n\n/**\n * Nile lite-tooltip component.\n *\t\n * Supports wrapper, sibling (for), and singleton modes.\n * Aligns with Tippy.js props and Nile design system.\n *\n * @tag nile-lite-tooltip\n */\n@customElement('nile-lite-tooltip')\nexport class NileliteTooltip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected createRenderRoot() {\n return this; // lite DOM\n }\n\n // ───────────── Props ─────────────\n /** ID of the target element (for sibling mode) */\n @property({ type: String, attribute: 'for' }) for: string | null = null;\n\n /** Tooltip content text or HTML */\n @property({ type: String, reflect: true }) content = '';\n\n /** Tooltip size (applies CSS class) */\n @property({ type: String, reflect: true }) size: 'small' | 'large' = 'small';\n\n /** Animation duration for show/hide (ms). Can be a single value or [show, hide]. */\n @property({ type: String, reflect: true }) duration: string | number | [number, number] = 200;\n\n /** Interactive mode */\n @property({ type: Boolean, reflect: true }) interactive = false;\n\n /** Placement of the tooltip */\n @property({ type: String })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n | 'auto-start'\n | 'auto-end' = 'top';\n\n /** Disabled state */\n @property({ type: Boolean }) disabled = false;\n\n /** Distance (Popper offset Y or main axis) */\n @property({ type: Number }) distance = 8;\n\n /** Skidding (Popper offset X or cross axis) */\n @property({ type: Number }) skidding = 0;\n\n /** Whether tooltip is open (controlled mode) */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /** Trigger behavior */\n @property({ type: String }) trigger: Props['trigger'] = 'mouseenter focus';\n\n /** Hoist the tooltip to body (avoid clipping) */\n @property({ type: Boolean, reflect: true }) hoist = false;\n\n /** Allow HTML content rendering */\n @property({ type: Boolean, reflect: true }) allowHTML = false;\n\n /** Cursor following mode */\n @property({ type: String, reflect: true, attribute: true })\n followCursor:\n | boolean\n | 'initial'\n | 'horizontal'\n | 'vertical'\n | 'true'\n | 'false' = false;\n\n /** Arrow type for tooltip */\n @property({ type: String, reflect: true, attribute: true })\n arrow: 'default' | 'round' | 'large' | 'small' | 'wide' | 'narrow' | 'none' =\n 'default';\n\n /** Enables singleton mode when multiple children exist */\n @property({ type: Boolean, reflect: true }) singleton = false;\n\n\n /** Not added in Doc */\n\n\n /** Delay before show/hide (ms or [show, hide]) */\n@property({ type: String, reflect: true }) delay: number | [number, number] = 0;\n\n/** Tooltip max width */\n@property({ type: String, reflect: true }) maxWidth: string | number = 'auto';\n\n/** Z-index of tooltip */\n@property({ type: Number }) zIndex = 9999;\n\n/** Whether tooltip hides on click */\n@property({ type: [Boolean, String], reflect: true }) hideOnClick: boolean | 'toggle' = true;\n\n/** Enables inertia motion effect */\n@property({ type: Boolean, reflect: true }) inertia = false;\n\n/** Interactive border (px) */\n@property({ type: Number }) interactiveBorder = 2;\n\n \n\n\n private tooltipInstances?: Instance[];\n private singleInstance?: Instance;\n private singletonInstance?: Instance;\n private targetEl?: HTMLElement | null;\n private generatedId?: string;\n private prevDescribedby?: string | null;\n\n constructor() {\n super();\n this.injectTippyStyles();\n }\n\n // Inject custom styles for tooltips\n private injectTippyStyles(): void {\n const STYLE_ID = 'nile-lite-tooltip-styles';\n if (document.getElementById(STYLE_ID)) return;\n\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = `\n .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }\n [data-tippy-root] { max-width: calc(100vw - 10px); }\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: 14px;\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n /* Placement-specific arrows */\n .tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }\n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n\n .tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n\n .tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n\n .tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);\n }\n\n .tippy-box.large { font-size: 16px; padding: 8px 12px; }\n .tippy-arrow { width: 16px; height: 16px; color: #333; }\n .tippy-arrow:before {\n content: \"\";\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n\n .tippy-content {\n position: relative;\n padding: 2px 6px;\n z-index: 1;\n }\n\t\t.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}\n `;\n document.head.appendChild(style);\n }\n\n firstUpdated(): void {\n this.attachTooltip();\n }\n\n private attachTooltip(): void {\n this.destroyTooltips();\n if (this.disabled) return;\n\n const options: Partial<Props> = {\n content: this.content || this.getAttribute('data-tippy-content') || undefined,\n placement: this.placement,\n trigger: this.trigger,\n offset: [this.skidding, this.distance],\n theme: 'lite',\n animation: 'fade',\n interactive: this.interactive,\n arrow: roundArrow,\n duration: parseDuration(this.duration),\n allowHTML: this.allowHTML,\n delay: this.delay,\n maxWidth: this.maxWidth,\n zIndex: this.zIndex,\n hideOnClick: this.hideOnClick,\n inertia: this.inertia,\n interactiveBorder: this.interactiveBorder,\n appendTo: this.hoist ? document.body : undefined,\n followCursor: parseFollowCursor(this.followCursor),\n plugins: parseFollowCursor(this.followCursor) ? [followCursor] : [],\n onShow: instance => {\n this.open = true;\n this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));\n return undefined;\n },\n onHide: instance => {\n this.open = false;\n this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));\n return undefined;\n },\n };\n if (this.for) {\n this.targetEl = document.getElementById(this.for);\n if (!this.targetEl) return;\n\n if (!this.id) {\n this.generatedId = `nile-tooltip-${Math.random().toString(36).slice(2, 9)}`;\n this.id = this.generatedId;\n }\n\n this.prevDescribedby = this.targetEl.getAttribute('aria-describedby');\n const describedby = this.prevDescribedby\n ? `${this.prevDescribedby} ${this.id}`\n : this.id;\n this.targetEl.setAttribute('aria-describedby', describedby);\n\n this.singleInstance = tippy(this.targetEl, options);\n if (this.size)\n this.singleInstance.popper\n .querySelector('.tippy-box')\n ?.classList.add(this.size);\n if (this.open) {\n queueMicrotask(() => this.singleInstance?.show());\n }\n return;\n }\n\n // ───────────── Wrapper mode ─────────────\nconst children = Array.from(this.querySelectorAll('*'));\nif (children.length > 0) {\n \n this.tooltipInstances = children.map(child => {\n const el = child as HTMLElement;\n const localContent = el.getAttribute('content') || this.content; \n const instance = tippy(el, { ...options, content: localContent });\n instance.popper.querySelector('.tippy-box')?.classList.add(this.size);\n return instance;\n });\n\n\n if (this.singleton && this.tooltipInstances.length > 1) {\n this.singletonInstance = createSingleton(this.tooltipInstances, {\n delay: [75, 0],\n arrow: roundArrow,\n moveTransition: 'transform 0.15s ease-out',\n });\n }\n\n if (this.open) {\n if (this.singletonInstance) this.singletonInstance.show();\n else this.tooltipInstances.forEach(t => t.show());\n }\n}\n\n }\n\n private destroyTooltips(): void {\n this.tooltipInstances?.forEach(t => t.destroy());\n this.singleInstance?.destroy();\n this.singletonInstance?.destroy();\n\n this.tooltipInstances = undefined;\n this.singleInstance = undefined;\n this.singletonInstance = undefined;\n\n if (this.targetEl && this.id) {\n const current = this.targetEl\n .getAttribute('aria-describedby')\n ?.split(' ')\n .filter(id => id !== this.id)\n .join(' ')\n .trim();\n if (current) {\n this.targetEl.setAttribute('aria-describedby', current);\n } else {\n this.targetEl.removeAttribute('aria-describedby');\n }\n }\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.destroyTooltips();\n }\n\n updated(changed: PropertyValues): void {\n super.updated(changed);\n\n if (\n ['for', 'content', 'placement', 'distance', 'skidding', 'trigger', 'disabled', 'hoist', 'size', 'arrow', 'singleton']\n .some(p => changed.has(p))\n ) {\n this.attachTooltip();\n }\n\n if (changed.has('open')) {\n if (this.open) {\n this.singleInstance?.show();\n this.singletonInstance?.show();\n this.tooltipInstances?.forEach(t => t.show());\n } else {\n this.singleInstance?.hide();\n this.singletonInstance?.hide();\n this.tooltipInstances?.forEach(t => t.hide());\n }\n }\n }\n}\n\nexport default NileliteTooltip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-lite-tooltip': NileliteTooltip;\n }\n}\n"]}
@@ -1,2 +0,0 @@
1
- export declare function parseFollowCursor(value: boolean | 'initial' | 'horizontal' | 'vertical' | 'true' | 'false'): boolean | 'initial' | 'horizontal' | 'vertical';
2
- export declare function parseDuration(value: string | number | [number, number] | undefined): number | [number, number];
@@ -1,29 +0,0 @@
1
- export function parseFollowCursor(value) {
2
- if (value === true || value === 'true')
3
- return true;
4
- if (value === false || value === 'false')
5
- return false;
6
- if (['initial', 'horizontal', 'vertical'].includes(String(value))) {
7
- return value;
8
- }
9
- return false;
10
- }
11
- export function parseDuration(value) {
12
- if (Array.isArray(value))
13
- return value;
14
- if (typeof value === 'number')
15
- return value;
16
- if (typeof value === 'string') {
17
- // Handle comma-separated (e.g. "200,100")
18
- if (value.includes(',')) {
19
- const parts = value.split(',').map(v => parseInt(v.trim(), 10));
20
- return parts;
21
- }
22
- // Single numeric string
23
- const num = parseInt(value, 10);
24
- if (!isNaN(num))
25
- return num;
26
- }
27
- return 200; // default fallback
28
- }
29
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/nile-light-tooltip/utils.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,iBAAiB,CAC/B,KAAyE;IAEzE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACpD,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IACvD,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAClE,OAAO,KAA8C,CAAC;IACxD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAGD,MAAM,UAAU,aAAa,CACzB,KAAqD;IAErD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,0CAA0C;QAC1C,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YAChE,OAAO,KAAyB,CAAC;QACnC,CAAC;QAED,wBAAwB;QACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;IAC9B,CAAC;IAED,OAAO,GAAG,CAAC,CAAC,mBAAmB;AACjC,CAAC","sourcesContent":[" \nexport function parseFollowCursor(\n value: boolean | 'initial' | 'horizontal' | 'vertical' | 'true' | 'false'\n): boolean | 'initial' | 'horizontal' | 'vertical' {\n if (value === true || value === 'true') return true;\n if (value === false || value === 'false') return false;\n if (['initial', 'horizontal', 'vertical'].includes(String(value))) {\n return value as 'initial' | 'horizontal' | 'vertical';\n }\n return false;\n}\n\n\nexport function parseDuration(\n value: string | number | [number, number] | undefined\n ): number | [number, number] {\n if (Array.isArray(value)) return value;\n if (typeof value === 'number') return value;\n \n if (typeof value === 'string') {\n // Handle comma-separated (e.g. \"200,100\")\n if (value.includes(',')) {\n const parts = value.split(',').map(v => parseInt(v.trim(), 10));\n return parts as [number, number];\n }\n \n // Single numeric string\n const num = parseInt(value, 10);\n if (!isNaN(num)) return num;\n }\n \n return 200; // default fallback\n }"]}
@@ -1,22 +0,0 @@
1
- import{noChange as t,html as i}from"lit";import{directive as s,PartType as h}from"lit/directive.js";import{AsyncDirective as e}from"lit/async-directive.js";import{repeat as n}from"lit/directives/repeat.js";
2
- /**
3
- * @license
4
- * Copyright 2021 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */class l extends Event{constructor(t){super(l.eventName,{bubbles:!1}),this.first=t.first,this.last=t.last}}l.eventName="rangeChanged";class o extends Event{constructor(t){super(o.eventName,{bubbles:!1}),this.first=t.first,this.last=t.last}}o.eventName="visibilityChanged";class r extends Event{constructor(){super(r.eventName,{bubbles:!1})}}r.eventName="unpinned";class u extends
7
- /**
8
- * @license
9
- * Copyright 2021 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */
12
- class{constructor(t){this._element=null;const i=t??window;this._node=i,t&&(this._element=t)}get element(){return this._element||document.scrollingElement||document.documentElement}get scrollTop(){return this.element.scrollTop||window.scrollY}get scrollLeft(){return this.element.scrollLeft||window.scrollX}get scrollHeight(){return this.element.scrollHeight}get scrollWidth(){return this.element.scrollWidth}get viewportHeight(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight}get viewportWidth(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth}get maxScrollTop(){return this.scrollHeight-this.viewportHeight}get maxScrollLeft(){return this.scrollWidth-this.viewportWidth}}{constructor(t,i){super(i),this._clients=new Set,this._retarget=null,this._end=null,this.t=null,this.correctingScrollError=!1,this._checkForArrival=this._checkForArrival.bind(this),this._updateManagedScrollTo=this._updateManagedScrollTo.bind(this),this.scrollTo=this.scrollTo.bind(this),this.scrollBy=this.scrollBy.bind(this);const s=this._node;this._originalScrollTo=s.scrollTo,this._originalScrollBy=s.scrollBy,this._originalScroll=s.scroll,this._attach(t)}get _destination(){return this.t}get scrolling(){return null!==this._destination}scrollTo(t,i){const s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;this._scrollTo(s)}scrollBy(t,i){const s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;void 0!==s.top&&(s.top+=this.scrollTop),void 0!==s.left&&(s.left+=this.scrollLeft),this._scrollTo(s)}_nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t)}_scrollTo(t,i=null,s=null){null!==this._end&&this._end(),"smooth"===t.behavior?(this._setDestination(t),this._retarget=i,this._end=s):this._resetScrollState(),this._nativeScrollTo(t)}_setDestination(t){let{top:i,left:s}=t;return i=void 0===i?void 0:Math.max(0,Math.min(i,this.maxScrollTop)),s=void 0===s?void 0:Math.max(0,Math.min(s,this.maxScrollLeft)),(null===this._destination||s!==this._destination.left||i!==this._destination.top)&&(this.t={top:i,left:s,behavior:"smooth"},!0)}_resetScrollState(){this.t=null,this._retarget=null,this._end=null}_updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination)}managedScrollTo(t,i,s){return this._scrollTo(t,i,s),this._updateManagedScrollTo}correctScrollError(t){this.correctingScrollError=!0,requestAnimationFrame((()=>requestAnimationFrame((()=>this.correctingScrollError=!1)))),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination)}_checkForArrival(){if(null!==this._destination){const{scrollTop:t,scrollLeft:i}=this;let{top:s,left:h}=this._destination;s=Math.min(s||0,this.maxScrollTop),h=Math.min(h||0,this.maxScrollLeft);const e=Math.abs(s-t),n=Math.abs(h-i);e<1&&n<1&&(this._end&&this._end(),this._resetScrollState())}}detach(t){return this._clients.delete(t),0===this._clients.size&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null}_attach(t){this._clients.add(t),1===this._clients.size&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival))}}
13
- /**
14
- * @license
15
- * Copyright 2021 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */let a="undefined"!=typeof window?window.ResizeObserver:void 0;const c=Symbol("virtualizerRef");let d;class f{constructor(t){if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map,this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet,this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(!t.hostElement)throw new Error('Virtualizer configuration requires the "hostElement" property');this._init(t)}set items(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout))}_init(t){this._isScroller=!!t.scroller,this._initHostElement(t);const i=t.layout||{};this._layoutInitialized=this._initLayout(i)}_initObservers(){this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new a((()=>this._hostElementSizeChanged())),this._childrenRO=new a(this._childrenSizeChanged.bind(this))}_initHostElement(t){const i=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),i[c]=this}connected(){this._initObservers();const t=this._isScroller;this._clippingAncestors=function(t,i=!1){let s=!1;return function(t,i=!1){const s=[];let h=i?t:w(t);for(;null!==h;)s.push(h),h=w(h);return s}(t,i).filter((t=>{if(s)return!1;const i=getComputedStyle(t);return s="fixed"===i.position,"visible"!==i.overflow}))}
18
- /**
19
- * @license
20
- * Copyright 2021 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */(this._hostElement,t),this._scrollerController=new u(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0}_observeAndListen(){this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach((t=>{t.addEventListener("scroll",this,this._scrollEventListenerOptions),this._scrollEventListeners.push(t),this._hostElementRO.observe(t)})),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach((t=>this._childrenRO.observe(t))),this._scrollEventListeners.forEach((t=>t.addEventListener("scroll",this,this._scrollEventListenerOptions)))}disconnected(){this._scrollEventListeners.forEach((t=>t.removeEventListener("scroll",this,this._scrollEventListenerOptions))),this._scrollEventListeners=[],this._clippingAncestors=[],this._scrollerController?.detach(this),this._scrollerController=null,this._mutationObserver?.disconnect(),this._mutationObserver=null,this._hostElementRO?.disconnect(),this._hostElementRO=null,this._childrenRO?.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1}_applyVirtualizerStyles(){const t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px")}_getSizer(){const t=this._hostElement;if(!this._sizer){let i=t.querySelector("[virtualizer-sizer]");i||(i=document.createElement("div"),i.setAttribute("virtualizer-sizer",""),t.appendChild(i)),Object.assign(i.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),i.textContent="&nbsp;",i.setAttribute("virtualizer-sizer",""),this._sizer=i}return this._sizer}async updateLayoutConfig(t){await this._layoutInitialized;const i=t.type||d;if("function"==typeof i&&this._layout instanceof i){const i={...t};return delete i.type,this._layout.config=i,!0}return!1}async _initLayout(t){let i,s;if("function"==typeof t.type){s=t.type;const h={...t};delete h.type,i=h}else i=t;void 0===s&&(d=s=(await import("./flow-3e83b6f4.esm.js")).FlowLayout),this._layout=new s((t=>this._handleLayoutMessage(t)),i),this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout)),this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0),this._schedule(this._updateLayout)}startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now())}stopBenchmarking(){if(null!==this._benchmarkStart){const t=window.performance.now(),i=t-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter((i=>i.startTime>=this._benchmarkStart&&i.startTime<t)).reduce(((t,i)=>t+i.duration),0);return this._benchmarkStart=null,{timeElapsed:i,virtualizationTime:s}}return null}_measureChildren(){const t={},i=this._children,s=this._measureChildOverride||this._measureChild;for(let h=0;h<i.length;h++){const e=i[h],n=this._first+h;(this._itemsChanged||this._toBeMeasured.has(e))&&(t[n]=s.call(this,e,this._items[n]))}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear()}_measureChild(t){const{width:i,height:s}=t.getBoundingClientRect();return Object.assign({width:i,height:s},function(t){const i=window.getComputedStyle(t);return{marginTop:p(i.marginTop),marginRight:p(i.marginRight),marginBottom:p(i.marginBottom),marginLeft:p(i.marginLeft)}}(t))}async _schedule(t){this._scheduled.has(t)||(this._scheduled.add(t),await Promise.resolve(),this._scheduled.delete(t),t.call(this))}async _updateDOM(t){this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;const{_rangeChanged:i,_itemsChanged:s}=this;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(i||s)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate()}_finishDOMUpdate(){this._connected&&(this._children.forEach((t=>this._childrenRO.observe(t))),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"))}_handleScrollEvent(){if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end")}catch(t){console.warn("Error measuring performance data: ",t)}window.performance.mark("uv-start")}!1===this._scrollerController.correctingScrollError&&this._layout?.unpin(),this._schedule(this._updateLayout)}handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t)}_handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new r)}get _children(){const t=[];let i=this._hostElement.firstElementChild;for(;i;)i.hasAttribute("virtualizer-sizer")||t.push(i),i=i.nextElementSibling;return t}_updateView(){const t=this._hostElement,i=this._scrollerController?.element,s=this._layout;if(t&&i&&s){let h,e,n,l;const o=t.getBoundingClientRect();h=0,e=0,n=window.innerHeight,l=window.innerWidth;const r=this._clippingAncestors.map((t=>t.getBoundingClientRect()));r.unshift(o);for(const t of r)h=Math.max(h,t.top),e=Math.max(e,t.left),n=Math.min(n,t.bottom),l=Math.min(l,t.right);const u=i.getBoundingClientRect(),a={left:o.left-u.left,top:o.top-u.top},c={width:i.scrollWidth,height:i.scrollHeight},d=h-o.top+t.scrollTop,f=e-o.left+t.scrollLeft,p=Math.max(0,n-h),w=Math.max(0,l-e);s.viewportSize={width:w,height:p},s.viewportScroll={top:d,left:f},s.totalScrollSize=c,s.offsetWithinScroller=a}}_sizeHostElement(t){const i=82e5,s=t&&null!==t.width?Math.min(i,t.width):0,h=t&&null!==t.height?Math.min(i,t.height):0;if(this._isScroller)this._getSizer().style.transform=`translate(${s}px, ${h}px)`;else{const t=this._hostElement.style;t.minWidth=s?`${s}px`:"100%",t.minHeight=h?`${h}px`:"100%"}}_positionChildren(t){t&&t.forEach((({top:t,left:i,width:s,height:h,xOffset:e,yOffset:n},l)=>{const o=this._children[l-this._first];o&&(o.style.position="absolute",o.style.boxSizing="border-box",o.style.transform=`translate(${i}px, ${t}px)`,void 0!==s&&(o.style.width=s+"px"),void 0!==h&&(o.style.height=h+"px"),o.style.left=void 0===e?null:e+"px",o.style.top=void 0===n?null:n+"px")}))}async _adjustRange(t){const{_first:i,_last:s,_firstVisible:h,_lastVisible:e}=this;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==i||this._last!==s,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==h||this._lastVisible!==e}_correctScrollError(){if(this._scrollError){const{scrollTop:t,scrollLeft:i}=this._scrollerController,{top:s,left:h}=this._scrollError;this._scrollError=null,this._scrollerController.correctScrollError({top:t-s,left:i-h})}}element(t){return t===1/0&&(t=this._items.length-1),void 0===this._items?.[t]?void 0:{scrollIntoView:(i={})=>this._scrollElementIntoView({...i,index:t})}}_scrollElementIntoView(t){if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){const i=this._layout.getScrollIntoViewCoordinates(t),{behavior:s}=t;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(i,{behavior:s}),(()=>this._layout.getScrollIntoViewCoordinates(t)),(()=>this._scrollIntoViewTarget=null)),this._scrollIntoViewTarget=t}else this._layout.pin=t}_checkScrollIntoViewTarget(t){const{index:i}=this._scrollIntoViewTarget||{};i&&t?.has(i)&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget))}_notifyRange(){this._hostElement.dispatchEvent(new l({first:this._first,last:this._last}))}_notifyVisibility(){this._hostElement.dispatchEvent(new o({first:this._firstVisible,last:this._lastVisible}))}get layoutComplete(){return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(((t,i)=>{this._layoutCompleteResolver=t,this._layoutCompleteRejecter=i}))),this._layoutCompletePromise}_rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState()}_scheduleLayoutComplete(){this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame((()=>requestAnimationFrame((()=>this._resolveLayoutCompletePromise())))))}_resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState()}_resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null}_hostElementSizeChanged(){this._schedule(this._updateLayout)}_childLoaded(){}_childrenSizeChanged(t){if(this._layout?.measureChildren){for(const i of t)this._toBeMeasured.set(i.target,i.contentRect);this._measureChildren()}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1}}function p(t){const i=t?parseFloat(t):NaN;return Number.isNaN(i)?0:i}function w(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;const i=t.parentNode;return i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&i.host||null}const m=s(class extends e{constructor(t){if(super(t),this._virtualizer=null,this._first=0,this._last=-1,this._renderItem=(t,s)=>((t,s)=>i`${s}: ${JSON.stringify(t,null,2)}`)(t,s+this._first),this._keyFunction=(t,i)=>(t=>t)(t,this._first),this._items=[],t.type!==h.CHILD)throw new Error("The virtualize directive can only be used in child expressions")}render(t){t&&this._setFunctions(t);const i=[];if(this._first>=0&&this._last>=this._first)for(let t=this._first;t<=this._last;t++)i.push(this._items[t]);return n(i,this._keyFunction,this._renderItem)}update(i,[s]){this._setFunctions(s);const h=this._items!==s.items;return this._items=s.items||[],this._virtualizer?this._updateVirtualizerConfig(i,s):this._initialize(i,s),h?t:this.render()}async _updateVirtualizerConfig(t,i){if(!await this._virtualizer.updateLayoutConfig(i.layout||{})){const s=t.parentNode;this._makeVirtualizer(s,i)}this._virtualizer.items=this._items}_setFunctions(t){const{renderItem:i,keyFunction:s}=t;i&&(this._renderItem=(t,s)=>i(t,s+this._first)),s&&(this._keyFunction=(t,i)=>s(t,i+this._first))}_makeVirtualizer(t,i){this._virtualizer&&this._virtualizer.disconnected();const{layout:s,scroller:h,items:e}=i;this._virtualizer=new f({hostElement:t,layout:s,scroller:h}),this._virtualizer.items=e,this._virtualizer.connected()}_initialize(t,i){const s=t.parentNode;s&&1===s.nodeType&&(s.addEventListener("rangeChanged",(t=>{this._first=t.first,this._last=t.last,this.setValue(this.render())})),this._makeVirtualizer(s,i))}disconnected(){this._virtualizer?.disconnected()}reconnected(){this._virtualizer?.connected()}});export{m as v};
@@ -1,18 +0,0 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["lit","lit/directive.js","lit/async-directive.js","lit/directives/repeat.js"],function(_export,_context){"use strict";var t,i,s,h,e,n,_templateObject,l,o,r,u,a,c,d,f,m;function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n4){function n(){return _n4.apply(this,arguments);}n.toString=function(){return _n4.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _regeneratorRuntime(){"use strict";var r=_regenerator(),e=r.m(_regeneratorRuntime),t=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function n(r){var e="function"==typeof r&&r.constructor;return!!e&&(e===t||"GeneratorFunction"===(e.displayName||e.name));}var o={"throw":1,"return":2,"break":3,"continue":3};function a(r){var e,t;return function(n){e||(e={stop:function stop(){return t(n.a,2);},"catch":function _catch(){return n.v;},abrupt:function abrupt(r,e){return t(n.a,o[r],e);},delegateYield:function delegateYield(r,o,a){return e.resultName=o,t(n.d,_regeneratorValues(r),a);},finish:function finish(r){return t(n.f,r);}},t=function(_t7){function t(_x8,_x9,_x0){return _t7.apply(this,arguments);}t.toString=function(){return _t7.toString();};return t;}(function(r,t,o){n.p=e.prev,n.n=e.next;try{return r(t,o);}finally{e.next=n.n;}})),e.resultName&&(e[e.resultName]=n.v,e.resultName=void 0),e.sent=n.v,e.next=n.n;try{return r.call(this,e);}finally{n.p=e.prev,n.n=e.next;}};}return(_regeneratorRuntime=function _regeneratorRuntime(){return{wrap:function wrap(e,t,n,o){return r.w(a(e),t,n,o&&o.reverse());},isGeneratorFunction:n,mark:r.m,awrap:function awrap(r,e){return new _OverloadYield(r,e);},AsyncIterator:_regeneratorAsyncIterator,async:function async(r,e,t,o,u){return(n(e)?_regeneratorAsyncGen:_regeneratorAsync)(a(r),e,t,o,u);},keys:_regeneratorKeys,values:_regeneratorValues};})();}function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function next(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e};}};}throw new TypeError(_typeof(e)+" is not iterable");}function _regeneratorKeys(e){var n=Object(e),r=[];for(var t in n)r.unshift(t);return function e(){for(;r.length;)if((t=r.pop())in n)return e.value=t,e.done=!1,e;return e.done=!0,e;};}function _regeneratorAsync(n,e,r,t,o){var a=_regeneratorAsyncGen(n,e,r,t,o);return a.next().then(function(n){return n.done?n.value:a.next();});}function _regeneratorAsyncGen(r,e,t,o,n){return new _regeneratorAsyncIterator(_regenerator().w(r,e,t,o),n||Promise);}function _regeneratorAsyncIterator(t,e){function n(r,o,i,f){try{var c=t[r](o),u=c.value;return u instanceof _OverloadYield?e.resolve(u.v).then(function(t){n("next",t,i,f);},function(t){n("throw",t,i,f);}):e.resolve(u).then(function(t){c.value=t,i(c);},function(t){return n("throw",t,i,f);});}catch(t){f(t);}}var r;this.next||(_regeneratorDefine2(_regeneratorAsyncIterator.prototype),_regeneratorDefine2(_regeneratorAsyncIterator.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this;})),_regeneratorDefine2(this,"_invoke",function(t,o,i){function f(){return new e(function(e,r){n(t,i,e,r);});}return r=r?r.then(f,f):f();},!0);}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a;}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0));}if(o||r>1)return a;throw y=!0,n;}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0);}else 1===c&&(t=i["return"])&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e;}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break;}catch(t){i=e,c=1,u=t;}finally{f=1;}}return{value:t,done:y};};}(r,o,i),!0),u;}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this;}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e;}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this;}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]";}),(_regenerator=function _regenerator(){return{w:i,m:f};})();}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{});}catch(e){i=0;}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e);});}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2));},_regeneratorDefine2(e,r,n,t);}function _OverloadYield(e,d){this.v=e,this.k=d;}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map():void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper);}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor);}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t);},_wrapNativeSuper(t);}function _construct(t,e,r){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,e);var p=new(t.bind.apply(t,o))();return r&&_setPrototypeOf(p,r.prototype),p;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]");}catch(n){return"function"==typeof t;}}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function p(t){var i=t?parseFloat(t):NaN;return Number.isNaN(i)?0:i;}function w(t){if(null!==t.assignedSlot)return t.assignedSlot;if(null!==t.parentElement)return t.parentElement;var i=t.parentNode;return i&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&i.host||null;}return{setters:[function(_lit){t=_lit.noChange;i=_lit.html;},function(_litDirectiveJs){s=_litDirectiveJs.directive;h=_litDirectiveJs.PartType;},function(_litAsyncDirectiveJs){e=_litAsyncDirectiveJs.AsyncDirective;},function(_litDirectivesRepeatJs){n=_litDirectivesRepeatJs.repeat;}],execute:function execute(){/**
2
- * @license
3
- * Copyright 2021 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */l=/*#__PURE__*/function(_Event){function l(t){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,[l.eventName,{bubbles:!1}]),_this.first=t.first,_this.last=t.last;return _this;}_inherits(l,_Event);return _createClass(l);}(/*#__PURE__*/_wrapNativeSuper(Event));l.eventName="rangeChanged";o=/*#__PURE__*/function(_Event2){function o(t){var _this2;_classCallCheck(this,o);_this2=_callSuper(this,o,[o.eventName,{bubbles:!1}]),_this2.first=t.first,_this2.last=t.last;return _this2;}_inherits(o,_Event2);return _createClass(o);}(/*#__PURE__*/_wrapNativeSuper(Event));o.eventName="visibilityChanged";r=/*#__PURE__*/function(_Event3){function r(){_classCallCheck(this,r);return _callSuper(this,r,[r.eventName,{bubbles:!1}]);}_inherits(r,_Event3);return _createClass(r);}(/*#__PURE__*/_wrapNativeSuper(Event));r.eventName="unpinned";u=/*#__PURE__*/function(_ref){function u(t,i){var _this3;_classCallCheck(this,u);_this3=_callSuper(this,u,[i]),_this3._clients=new Set(),_this3._retarget=null,_this3._end=null,_this3.t=null,_this3.correctingScrollError=!1,_this3._checkForArrival=_this3._checkForArrival.bind(_assertThisInitialized(_this3)),_this3._updateManagedScrollTo=_this3._updateManagedScrollTo.bind(_assertThisInitialized(_this3)),_this3.scrollTo=_this3.scrollTo.bind(_assertThisInitialized(_this3)),_this3.scrollBy=_this3.scrollBy.bind(_assertThisInitialized(_this3));var s=_this3._node;_this3._originalScrollTo=s.scrollTo,_this3._originalScrollBy=s.scrollBy,_this3._originalScroll=s.scroll,_this3._attach(t);return _this3;}_inherits(u,_ref);return _createClass(u,[{key:"_destination",get:function get(){return this.t;}},{key:"scrolling",get:function get(){return null!==this._destination;}},{key:"scrollTo",value:function scrollTo(t,i){var s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;this._scrollTo(s);}},{key:"scrollBy",value:function scrollBy(t,i){var s="number"==typeof t&&"number"==typeof i?{left:t,top:i}:t;void 0!==s.top&&(s.top+=this.scrollTop),void 0!==s.left&&(s.left+=this.scrollLeft),this._scrollTo(s);}},{key:"_nativeScrollTo",value:function _nativeScrollTo(t){this._originalScrollTo.bind(this._element||window)(t);}},{key:"_scrollTo",value:function _scrollTo(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;var s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;null!==this._end&&this._end(),"smooth"===t.behavior?(this._setDestination(t),this._retarget=i,this._end=s):this._resetScrollState(),this._nativeScrollTo(t);}},{key:"_setDestination",value:function _setDestination(t){var i=t.top,s=t.left;return i=void 0===i?void 0:Math.max(0,Math.min(i,this.maxScrollTop)),s=void 0===s?void 0:Math.max(0,Math.min(s,this.maxScrollLeft)),(null===this._destination||s!==this._destination.left||i!==this._destination.top)&&(this.t={top:i,left:s,behavior:"smooth"},!0);}},{key:"_resetScrollState",value:function _resetScrollState(){this.t=null,this._retarget=null,this._end=null;}},{key:"_updateManagedScrollTo",value:function _updateManagedScrollTo(t){this._destination&&this._setDestination(t)&&this._nativeScrollTo(this._destination);}},{key:"managedScrollTo",value:function managedScrollTo(t,i,s){return this._scrollTo(t,i,s),this._updateManagedScrollTo;}},{key:"correctScrollError",value:function correctScrollError(t){var _this4=this;this.correctingScrollError=!0,requestAnimationFrame(function(){return requestAnimationFrame(function(){return _this4.correctingScrollError=!1;});}),this._nativeScrollTo(t),this._retarget&&this._setDestination(this._retarget()),this._destination&&this._nativeScrollTo(this._destination);}},{key:"_checkForArrival",value:function _checkForArrival(){if(null!==this._destination){var _t=this.scrollTop,_i=this.scrollLeft;var _this$_destination=this._destination,_s=_this$_destination.top,_h=_this$_destination.left;_s=Math.min(_s||0,this.maxScrollTop),_h=Math.min(_h||0,this.maxScrollLeft);var _e=Math.abs(_s-_t),_n=Math.abs(_h-_i);_e<1&&_n<1&&(this._end&&this._end(),this._resetScrollState());}}},{key:"detach",value:function detach(t){return this._clients["delete"](t),0===this._clients.size&&(this._node.scrollTo=this._originalScrollTo,this._node.scrollBy=this._originalScrollBy,this._node.scroll=this._originalScroll,this._node.removeEventListener("scroll",this._checkForArrival)),null;}},{key:"_attach",value:function _attach(t){this._clients.add(t),1===this._clients.size&&(this._node.scrollTo=this.scrollTo,this._node.scrollBy=this.scrollBy,this._node.scroll=this.scrollTo,this._node.addEventListener("scroll",this._checkForArrival));}}]);}(/*#__PURE__*//**
6
- * @license
7
- * Copyright 2021 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- */function(){function _class(t){_classCallCheck(this,_class);this._element=null;var i=t!==null&&t!==void 0?t:window;this._node=i,t&&(this._element=t);}return _createClass(_class,[{key:"element",get:function get(){return this._element||document.scrollingElement||document.documentElement;}},{key:"scrollTop",get:function get(){return this.element.scrollTop||window.scrollY;}},{key:"scrollLeft",get:function get(){return this.element.scrollLeft||window.scrollX;}},{key:"scrollHeight",get:function get(){return this.element.scrollHeight;}},{key:"scrollWidth",get:function get(){return this.element.scrollWidth;}},{key:"viewportHeight",get:function get(){return this._element?this._element.getBoundingClientRect().height:window.innerHeight;}},{key:"viewportWidth",get:function get(){return this._element?this._element.getBoundingClientRect().width:window.innerWidth;}},{key:"maxScrollTop",get:function get(){return this.scrollHeight-this.viewportHeight;}},{key:"maxScrollLeft",get:function get(){return this.scrollWidth-this.viewportWidth;}}]);}());/**
10
- * @license
11
- * Copyright 2021 Google LLC
12
- * SPDX-License-Identifier: BSD-3-Clause
13
- */a="undefined"!=typeof window?window.ResizeObserver:void 0;c=Symbol("virtualizerRef");f=/*#__PURE__*/function(){function f(t){_classCallCheck(this,f);if(this._benchmarkStart=null,this._layout=null,this._clippingAncestors=[],this._scrollSize=null,this._scrollError=null,this._childrenPos=null,this._childMeasurements=null,this._toBeMeasured=new Map(),this._rangeChanged=!0,this._itemsChanged=!0,this._visibilityChanged=!0,this._scrollerController=null,this._isScroller=!1,this._sizer=null,this._hostElementRO=null,this._childrenRO=null,this._mutationObserver=null,this._scrollEventListeners=[],this._scrollEventListenerOptions={passive:!0},this._loadListener=this._childLoaded.bind(this),this._scrollIntoViewTarget=null,this._updateScrollIntoViewCoordinates=null,this._items=[],this._first=-1,this._last=-1,this._firstVisible=-1,this._lastVisible=-1,this._scheduled=new WeakSet(),this._measureCallback=null,this._measureChildOverride=null,this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null,this._layoutInitialized=null,this._connected=!1,!t)throw new Error("Virtualizer constructor requires a configuration object");if(!t.hostElement)throw new Error('Virtualizer configuration requires the "hostElement" property');this._init(t);}return _createClass(f,[{key:"items",set:function set(t){Array.isArray(t)&&t!==this._items&&(this._itemsChanged=!0,this._items=t,this._schedule(this._updateLayout));}},{key:"_init",value:function _init(t){this._isScroller=!!t.scroller,this._initHostElement(t);var i=t.layout||{};this._layoutInitialized=this._initLayout(i);}},{key:"_initObservers",value:function _initObservers(){var _this5=this;this._mutationObserver=new MutationObserver(this._finishDOMUpdate.bind(this)),this._hostElementRO=new a(function(){return _this5._hostElementSizeChanged();}),this._childrenRO=new a(this._childrenSizeChanged.bind(this));}},{key:"_initHostElement",value:function _initHostElement(t){var i=this._hostElement=t.hostElement;this._applyVirtualizerStyles(),i[c]=this;}},{key:"connected",value:function connected(){this._initObservers();var t=this._isScroller;this._clippingAncestors=function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=!1;return function(t){var i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:!1;var s=[];var h=i?t:w(t);for(;null!==h;)s.push(h),h=w(h);return s;}(t,i).filter(function(t){if(s)return!1;var i=getComputedStyle(t);return s="fixed"===i.position,"visible"!==i.overflow;});}/**
14
- * @license
15
- * Copyright 2021 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */(this._hostElement,t),this._scrollerController=new u(this,this._clippingAncestors[0]),this._schedule(this._updateLayout),this._observeAndListen(),this._connected=!0;}},{key:"_observeAndListen",value:function _observeAndListen(){var _this6=this;this._mutationObserver.observe(this._hostElement,{childList:!0}),this._hostElementRO.observe(this._hostElement),this._scrollEventListeners.push(window),window.addEventListener("scroll",this,this._scrollEventListenerOptions),this._clippingAncestors.forEach(function(t){t.addEventListener("scroll",_this6,_this6._scrollEventListenerOptions),_this6._scrollEventListeners.push(t),_this6._hostElementRO.observe(t);}),this._hostElementRO.observe(this._scrollerController.element),this._children.forEach(function(t){return _this6._childrenRO.observe(t);}),this._scrollEventListeners.forEach(function(t){return t.addEventListener("scroll",_this6,_this6._scrollEventListenerOptions);});}},{key:"disconnected",value:function disconnected(){var _this7=this,_this$_scrollerContro,_this$_mutationObserv,_this$_hostElementRO,_this$_childrenRO;this._scrollEventListeners.forEach(function(t){return t.removeEventListener("scroll",_this7,_this7._scrollEventListenerOptions);}),this._scrollEventListeners=[],this._clippingAncestors=[],(_this$_scrollerContro=this._scrollerController)!==null&&_this$_scrollerContro!==void 0&&_this$_scrollerContro.detach(this),this._scrollerController=null,(_this$_mutationObserv=this._mutationObserver)!==null&&_this$_mutationObserv!==void 0&&_this$_mutationObserv.disconnect(),this._mutationObserver=null,(_this$_hostElementRO=this._hostElementRO)!==null&&_this$_hostElementRO!==void 0&&_this$_hostElementRO.disconnect(),this._hostElementRO=null,(_this$_childrenRO=this._childrenRO)!==null&&_this$_childrenRO!==void 0&&_this$_childrenRO.disconnect(),this._childrenRO=null,this._rejectLayoutCompletePromise("disconnected"),this._connected=!1;}},{key:"_applyVirtualizerStyles",value:function _applyVirtualizerStyles(){var t=this._hostElement.style;t.display=t.display||"block",t.position=t.position||"relative",t.contain=t.contain||"size layout",this._isScroller&&(t.overflow=t.overflow||"auto",t.minHeight=t.minHeight||"150px");}},{key:"_getSizer",value:function _getSizer(){var t=this._hostElement;if(!this._sizer){var _i2=t.querySelector("[virtualizer-sizer]");_i2||(_i2=document.createElement("div"),_i2.setAttribute("virtualizer-sizer",""),t.appendChild(_i2)),Object.assign(_i2.style,{position:"absolute",margin:"-2px 0 0 0",padding:0,visibility:"hidden",fontSize:"2px"}),_i2.textContent="&nbsp;",_i2.setAttribute("virtualizer-sizer",""),this._sizer=_i2;}return this._sizer;}},{key:"updateLayoutConfig",value:function(){var _updateLayoutConfig=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var i,_i3;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this._layoutInitialized;case 2:i=t.type||d;if(!("function"==typeof i&&this._layout instanceof i)){_context2.next=6;break;}_i3=_objectSpread({},t);return _context2.abrupt("return",(delete _i3.type,this._layout.config=_i3,!0));case 6:return _context2.abrupt("return",!1);case 7:case"end":return _context2.stop();}},_callee,this);}));function updateLayoutConfig(_x){return _updateLayoutConfig.apply(this,arguments);}return updateLayoutConfig;}()},{key:"_initLayout",value:function(){var _initLayout2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(t){var _this8=this;var i,s,_h2;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if("function"==typeof t.type){s=t.type;_h2=_objectSpread({},t);delete _h2.type,i=_h2;}else i=t;_context3.t0=void 0===s;if(!_context3.t0){_context3.next=6;break;}_context3.next=5;return _context["import"]("./flow-ca47f938.cjs.js");case 5:d=s=_context3.sent.FlowLayout;case 6:this._layout=new s(function(t){return _this8._handleLayoutMessage(t);},i);this._layout.measureChildren&&"function"==typeof this._layout.updateItemSizes&&("function"==typeof this._layout.measureChildren&&(this._measureChildOverride=this._layout.measureChildren),this._measureCallback=this._layout.updateItemSizes.bind(this._layout));this._layout.listenForChildLoadEvents&&this._hostElement.addEventListener("load",this._loadListener,!0);this._schedule(this._updateLayout);case 10:case"end":return _context3.stop();}},_callee2,this);}));function _initLayout(_x2){return _initLayout2.apply(this,arguments);}return _initLayout;}()},{key:"startBenchmarking",value:function startBenchmarking(){null===this._benchmarkStart&&(this._benchmarkStart=window.performance.now());}},{key:"stopBenchmarking",value:function stopBenchmarking(){var _this9=this;if(null!==this._benchmarkStart){var _t2=window.performance.now(),i=_t2-this._benchmarkStart,s=performance.getEntriesByName("uv-virtualizing","measure").filter(function(i){return i.startTime>=_this9._benchmarkStart&&i.startTime<_t2;}).reduce(function(t,i){return t+i.duration;},0);return this._benchmarkStart=null,{timeElapsed:i,virtualizationTime:s};}return null;}},{key:"_measureChildren",value:function _measureChildren(){var t={},i=this._children,s=this._measureChildOverride||this._measureChild;for(var _h3=0;_h3<i.length;_h3++){var _e2=i[_h3],_n2=this._first+_h3;(this._itemsChanged||this._toBeMeasured.has(_e2))&&(t[_n2]=s.call(this,_e2,this._items[_n2]));}this._childMeasurements=t,this._schedule(this._updateLayout),this._toBeMeasured.clear();}},{key:"_measureChild",value:function _measureChild(t){var _t$getBoundingClientR=t.getBoundingClientRect(),i=_t$getBoundingClientR.width,s=_t$getBoundingClientR.height;return Object.assign({width:i,height:s},function(t){var i=window.getComputedStyle(t);return{marginTop:p(i.marginTop),marginRight:p(i.marginRight),marginBottom:p(i.marginBottom),marginLeft:p(i.marginLeft)};}(t));}},{key:"_schedule",value:function(){var _schedule2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(t){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.t0=this._scheduled.has(t);if(_context4.t0){_context4.next=7;break;}this._scheduled.add(t);_context4.next=5;return Promise.resolve();case 5:this._scheduled["delete"](t);t.call(this);case 7:case"end":return _context4.stop();}},_callee3,this);}));function _schedule(_x3){return _schedule2.apply(this,arguments);}return _schedule;}()},{key:"_updateDOM",value:function(){var _updateDOM2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(t){var i,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:this._scrollSize=t.scrollSize,this._adjustRange(t.range),this._childrenPos=t.childPositions,this._scrollError=t.scrollError||null;i=this._rangeChanged,s=this._itemsChanged;this._visibilityChanged&&(this._notifyVisibility(),this._visibilityChanged=!1),(i||s)&&(this._notifyRange(),this._rangeChanged=!1),this._finishDOMUpdate();case 3:case"end":return _context5.stop();}},_callee4,this);}));function _updateDOM(_x4){return _updateDOM2.apply(this,arguments);}return _updateDOM;}()},{key:"_finishDOMUpdate",value:function _finishDOMUpdate(){var _this0=this;this._connected&&(this._children.forEach(function(t){return _this0._childrenRO.observe(t);}),this._checkScrollIntoViewTarget(this._childrenPos),this._positionChildren(this._childrenPos),this._sizeHostElement(this._scrollSize),this._correctScrollError(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"));}},{key:"_updateLayout",value:function _updateLayout(){this._layout&&this._connected&&(this._layout.items=this._items,this._updateView(),null!==this._childMeasurements&&(this._measureCallback&&this._measureCallback(this._childMeasurements),this._childMeasurements=null),this._layout.reflowIfNeeded(),this._benchmarkStart&&"mark"in window.performance&&window.performance.mark("uv-end"));}},{key:"_handleScrollEvent",value:function _handleScrollEvent(){var _this$_layout;if(this._benchmarkStart&&"mark"in window.performance){try{window.performance.measure("uv-virtualizing","uv-start","uv-end");}catch(t){console.warn("Error measuring performance data: ",t);}window.performance.mark("uv-start");}!1===this._scrollerController.correctingScrollError&&(_this$_layout=this._layout)!==null&&_this$_layout!==void 0&&_this$_layout.unpin(),this._schedule(this._updateLayout);}},{key:"handleEvent",value:function handleEvent(t){if("scroll"===t.type)(t.currentTarget===window||this._clippingAncestors.includes(t.currentTarget))&&this._handleScrollEvent();else console.warn("event not handled",t);}},{key:"_handleLayoutMessage",value:function _handleLayoutMessage(t){"stateChanged"===t.type?this._updateDOM(t):"visibilityChanged"===t.type?(this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._notifyVisibility()):"unpinned"===t.type&&this._hostElement.dispatchEvent(new r());}},{key:"_children",get:function get(){var t=[];var i=this._hostElement.firstElementChild;for(;i;)i.hasAttribute("virtualizer-sizer")||t.push(i),i=i.nextElementSibling;return t;}},{key:"_updateView",value:function _updateView(){var _this$_scrollerContro2;var t=this._hostElement,i=(_this$_scrollerContro2=this._scrollerController)===null||_this$_scrollerContro2===void 0?void 0:_this$_scrollerContro2.element,s=this._layout;if(t&&i&&s){var _h4,_e3,_n3,_l;var _o=t.getBoundingClientRect();_h4=0,_e3=0,_n3=window.innerHeight,_l=window.innerWidth;var _r=this._clippingAncestors.map(function(t){return t.getBoundingClientRect();});_r.unshift(_o);var _iterator=_createForOfIteratorHelper(_r),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t3=_step.value;_h4=Math.max(_h4,_t3.top),_e3=Math.max(_e3,_t3.left),_n3=Math.min(_n3,_t3.bottom),_l=Math.min(_l,_t3.right);}}catch(err){_iterator.e(err);}finally{_iterator.f();}var _u=i.getBoundingClientRect(),_a={left:_o.left-_u.left,top:_o.top-_u.top},_c={width:i.scrollWidth,height:i.scrollHeight},_d=_h4-_o.top+t.scrollTop,_f=_e3-_o.left+t.scrollLeft,_p=Math.max(0,_n3-_h4),_w=Math.max(0,_l-_e3);s.viewportSize={width:_w,height:_p},s.viewportScroll={top:_d,left:_f},s.totalScrollSize=_c,s.offsetWithinScroller=_a;}}},{key:"_sizeHostElement",value:function _sizeHostElement(t){var i=82e5,s=t&&null!==t.width?Math.min(i,t.width):0,h=t&&null!==t.height?Math.min(i,t.height):0;if(this._isScroller)this._getSizer().style.transform="translate(".concat(s,"px, ").concat(h,"px)");else{var _t4=this._hostElement.style;_t4.minWidth=s?"".concat(s,"px"):"100%",_t4.minHeight=h?"".concat(h,"px"):"100%";}}},{key:"_positionChildren",value:function _positionChildren(t){var _this1=this;t&&t.forEach(function(_ref2,l){var t=_ref2.top,i=_ref2.left,s=_ref2.width,h=_ref2.height,e=_ref2.xOffset,n=_ref2.yOffset;var o=_this1._children[l-_this1._first];o&&(o.style.position="absolute",o.style.boxSizing="border-box",o.style.transform="translate(".concat(i,"px, ").concat(t,"px)"),void 0!==s&&(o.style.width=s+"px"),void 0!==h&&(o.style.height=h+"px"),o.style.left=void 0===e?null:e+"px",o.style.top=void 0===n?null:n+"px");});}},{key:"_adjustRange",value:function(){var _adjustRange2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(t){var i,s,h,e;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i=this._first,s=this._last,h=this._firstVisible,e=this._lastVisible;this._first=t.first,this._last=t.last,this._firstVisible=t.firstVisible,this._lastVisible=t.lastVisible,this._rangeChanged=this._rangeChanged||this._first!==i||this._last!==s,this._visibilityChanged=this._visibilityChanged||this._firstVisible!==h||this._lastVisible!==e;case 2:case"end":return _context6.stop();}},_callee5,this);}));function _adjustRange(_x5){return _adjustRange2.apply(this,arguments);}return _adjustRange;}()},{key:"_correctScrollError",value:function _correctScrollError(){if(this._scrollError){var _this$_scrollerContro3=this._scrollerController,_t5=_this$_scrollerContro3.scrollTop,i=_this$_scrollerContro3.scrollLeft,_this$_scrollError=this._scrollError,s=_this$_scrollError.top,_h5=_this$_scrollError.left;this._scrollError=null,this._scrollerController.correctScrollError({top:_t5-s,left:i-_h5});}}},{key:"element",value:function element(t){var _this$_items,_this10=this;return t===1/0&&(t=this._items.length-1),void 0===((_this$_items=this._items)===null||_this$_items===void 0?void 0:_this$_items[t])?void 0:{scrollIntoView:function scrollIntoView(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return _this10._scrollElementIntoView(_objectSpread(_objectSpread({},i),{},{index:t}));}};}},{key:"_scrollElementIntoView",value:function _scrollElementIntoView(t){var _this11=this;if(t.index>=this._first&&t.index<=this._last)this._children[t.index-this._first].scrollIntoView(t);else if(t.index=Math.min(t.index,this._items.length-1),"smooth"===t.behavior){var i=this._layout.getScrollIntoViewCoordinates(t),s=t.behavior;this._updateScrollIntoViewCoordinates=this._scrollerController.managedScrollTo(Object.assign(i,{behavior:s}),function(){return _this11._layout.getScrollIntoViewCoordinates(t);},function(){return _this11._scrollIntoViewTarget=null;}),this._scrollIntoViewTarget=t;}else this._layout.pin=t;}},{key:"_checkScrollIntoViewTarget",value:function _checkScrollIntoViewTarget(t){var _ref3=this._scrollIntoViewTarget||{},i=_ref3.index;i&&(t===null||t===void 0?void 0:t.has(i))&&this._updateScrollIntoViewCoordinates(this._layout.getScrollIntoViewCoordinates(this._scrollIntoViewTarget));}},{key:"_notifyRange",value:function _notifyRange(){this._hostElement.dispatchEvent(new l({first:this._first,last:this._last}));}},{key:"_notifyVisibility",value:function _notifyVisibility(){this._hostElement.dispatchEvent(new o({first:this._firstVisible,last:this._lastVisible}));}},{key:"layoutComplete",get:function get(){var _this12=this;return this._layoutCompletePromise||(this._layoutCompletePromise=new Promise(function(t,i){_this12._layoutCompleteResolver=t,_this12._layoutCompleteRejecter=i;})),this._layoutCompletePromise;}},{key:"_rejectLayoutCompletePromise",value:function _rejectLayoutCompletePromise(t){null!==this._layoutCompleteRejecter&&this._layoutCompleteRejecter(t),this._resetLayoutCompleteState();}},{key:"_scheduleLayoutComplete",value:function _scheduleLayoutComplete(){var _this13=this;this._layoutCompletePromise&&null===this._pendingLayoutComplete&&(this._pendingLayoutComplete=requestAnimationFrame(function(){return requestAnimationFrame(function(){return _this13._resolveLayoutCompletePromise();});}));}},{key:"_resolveLayoutCompletePromise",value:function _resolveLayoutCompletePromise(){null!==this._layoutCompleteResolver&&this._layoutCompleteResolver(),this._resetLayoutCompleteState();}},{key:"_resetLayoutCompleteState",value:function _resetLayoutCompleteState(){this._layoutCompletePromise=null,this._layoutCompleteResolver=null,this._layoutCompleteRejecter=null,this._pendingLayoutComplete=null;}},{key:"_hostElementSizeChanged",value:function _hostElementSizeChanged(){this._schedule(this._updateLayout);}},{key:"_childLoaded",value:function _childLoaded(){}},{key:"_childrenSizeChanged",value:function _childrenSizeChanged(t){var _this$_layout2;if((_this$_layout2=this._layout)!==null&&_this$_layout2!==void 0&&_this$_layout2.measureChildren){var _iterator2=_createForOfIteratorHelper(t),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var i=_step2.value;this._toBeMeasured.set(i.target,i.contentRect);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}this._measureChildren();}this._scheduleLayoutComplete(),this._itemsChanged=!1,this._rangeChanged=!1;}}]);}();_export("v",m=s(/*#__PURE__*/function(_e4){function _class2(t){var _this14;_classCallCheck(this,_class2);if(_this14=_callSuper(this,_class2,[t]),_this14._virtualizer=null,_this14._first=0,_this14._last=-1,_this14._renderItem=function(t,s){return function(t,s){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["",": ",""])),s,JSON.stringify(t,null,2));}(t,s+_this14._first);},_this14._keyFunction=function(t,i){return function(t){return t;}(t,_this14._first);},_this14._items=[],t.type!==h.CHILD)throw new Error("The virtualize directive can only be used in child expressions");return _this14;}_inherits(_class2,_e4);return _createClass(_class2,[{key:"render",value:function render(t){t&&this._setFunctions(t);var i=[];if(this._first>=0&&this._last>=this._first)for(var _t6=this._first;_t6<=this._last;_t6++)i.push(this._items[_t6]);return n(i,this._keyFunction,this._renderItem);}},{key:"update",value:function update(i,_ref4){var _ref5=_slicedToArray(_ref4,1),s=_ref5[0];this._setFunctions(s);var h=this._items!==s.items;return this._items=s.items||[],this._virtualizer?this._updateVirtualizerConfig(i,s):this._initialize(i,s),h?t:this.render();}},{key:"_updateVirtualizerConfig",value:function(){var _updateVirtualizerConfig2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(t,i){var s;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return this._virtualizer.updateLayoutConfig(i.layout||{});case 2:if(_context7.sent){_context7.next=5;break;}s=t.parentNode;this._makeVirtualizer(s,i);case 5:this._virtualizer.items=this._items;case 6:case"end":return _context7.stop();}},_callee6,this);}));function _updateVirtualizerConfig(_x6,_x7){return _updateVirtualizerConfig2.apply(this,arguments);}return _updateVirtualizerConfig;}()},{key:"_setFunctions",value:function _setFunctions(t){var _this15=this;var i=t.renderItem,s=t.keyFunction;i&&(this._renderItem=function(t,s){return i(t,s+_this15._first);}),s&&(this._keyFunction=function(t,i){return s(t,i+_this15._first);});}},{key:"_makeVirtualizer",value:function _makeVirtualizer(t,i){this._virtualizer&&this._virtualizer.disconnected();var s=i.layout,h=i.scroller,e=i.items;this._virtualizer=new f({hostElement:t,layout:s,scroller:h}),this._virtualizer.items=e,this._virtualizer.connected();}},{key:"_initialize",value:function _initialize(t,i){var _this16=this;var s=t.parentNode;s&&1===s.nodeType&&(s.addEventListener("rangeChanged",function(t){_this16._first=t.first,_this16._last=t.last,_this16.setValue(_this16.render());}),this._makeVirtualizer(s,i));}},{key:"disconnected",value:function disconnected(){var _this$_virtualizer;(_this$_virtualizer=this._virtualizer)===null||_this$_virtualizer===void 0?void 0:_this$_virtualizer.disconnected();}},{key:"reconnected",value:function reconnected(){var _this$_virtualizer2;(_this$_virtualizer2=this._virtualizer)===null||_this$_virtualizer2===void 0?void 0:_this$_virtualizer2.connected();}}]);}(e)));}};});
18
- //# sourceMappingURL=virtualize-eb33a9a0.cjs.js.map