@expressivecss/expressive 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (602) hide show
  1. package/CHANGELOG.md +1502 -1
  2. package/README.md +9 -8
  3. package/dist/css/expressive.css +19247 -11923
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/fonts/LICENSE-noto-sans-arabic +93 -0
  8. package/dist/fonts/LICENSE-noto-sans-hebrew +93 -0
  9. package/dist/fonts/LICENSE-noto-sans-thai +93 -0
  10. package/dist/fonts/material-symbols-outlined.woff2 +0 -0
  11. package/dist/fonts/material-symbols-rounded.woff2 +0 -0
  12. package/dist/fonts/material-symbols-sharp.woff2 +0 -0
  13. package/dist/fonts/noto-sans-arabic-arabic-400.woff2 +0 -0
  14. package/dist/fonts/noto-sans-arabic-arabic-500.woff2 +0 -0
  15. package/dist/fonts/noto-sans-arabic-arabic-700.woff2 +0 -0
  16. package/dist/fonts/noto-sans-cyrillic-400.woff2 +0 -0
  17. package/dist/fonts/noto-sans-cyrillic-500.woff2 +0 -0
  18. package/dist/fonts/noto-sans-cyrillic-700.woff2 +0 -0
  19. package/dist/fonts/noto-sans-cyrillic-ext-400.woff2 +0 -0
  20. package/dist/fonts/noto-sans-cyrillic-ext-500.woff2 +0 -0
  21. package/dist/fonts/noto-sans-cyrillic-ext-700.woff2 +0 -0
  22. package/dist/fonts/noto-sans-devanagari-400.woff2 +0 -0
  23. package/dist/fonts/noto-sans-devanagari-500.woff2 +0 -0
  24. package/dist/fonts/noto-sans-devanagari-700.woff2 +0 -0
  25. package/dist/fonts/noto-sans-greek-400.woff2 +0 -0
  26. package/dist/fonts/noto-sans-greek-500.woff2 +0 -0
  27. package/dist/fonts/noto-sans-greek-700.woff2 +0 -0
  28. package/dist/fonts/noto-sans-greek-ext-400.woff2 +0 -0
  29. package/dist/fonts/noto-sans-greek-ext-500.woff2 +0 -0
  30. package/dist/fonts/noto-sans-greek-ext-700.woff2 +0 -0
  31. package/dist/fonts/noto-sans-hebrew-hebrew-400.woff2 +0 -0
  32. package/dist/fonts/noto-sans-hebrew-hebrew-500.woff2 +0 -0
  33. package/dist/fonts/noto-sans-hebrew-hebrew-700.woff2 +0 -0
  34. package/dist/fonts/noto-sans-latin-700.woff2 +0 -0
  35. package/dist/fonts/noto-sans-latin-ext-400.woff2 +0 -0
  36. package/dist/fonts/noto-sans-latin-ext-500.woff2 +0 -0
  37. package/dist/fonts/noto-sans-latin-ext-700.woff2 +0 -0
  38. package/dist/fonts/noto-sans-thai-thai-400.woff2 +0 -0
  39. package/dist/fonts/noto-sans-thai-thai-500.woff2 +0 -0
  40. package/dist/fonts/noto-sans-thai-thai-700.woff2 +0 -0
  41. package/dist/fonts/noto-sans-vietnamese-400.woff2 +0 -0
  42. package/dist/fonts/noto-sans-vietnamese-500.woff2 +0 -0
  43. package/dist/fonts/noto-sans-vietnamese-700.woff2 +0 -0
  44. package/dist/fonts/roboto-cyrillic-400.woff2 +0 -0
  45. package/dist/fonts/roboto-cyrillic-500.woff2 +0 -0
  46. package/dist/fonts/roboto-cyrillic-700.woff2 +0 -0
  47. package/dist/fonts/roboto-cyrillic-ext-400.woff2 +0 -0
  48. package/dist/fonts/roboto-cyrillic-ext-500.woff2 +0 -0
  49. package/dist/fonts/roboto-cyrillic-ext-700.woff2 +0 -0
  50. package/dist/fonts/roboto-greek-400.woff2 +0 -0
  51. package/dist/fonts/roboto-greek-500.woff2 +0 -0
  52. package/dist/fonts/roboto-greek-700.woff2 +0 -0
  53. package/dist/fonts/roboto-greek-ext-400.woff2 +0 -0
  54. package/dist/fonts/roboto-greek-ext-500.woff2 +0 -0
  55. package/dist/fonts/roboto-greek-ext-700.woff2 +0 -0
  56. package/dist/fonts/roboto-latin-700.woff2 +0 -0
  57. package/dist/fonts/roboto-latin-ext-400.woff2 +0 -0
  58. package/dist/fonts/roboto-latin-ext-500.woff2 +0 -0
  59. package/dist/fonts/roboto-latin-ext-700.woff2 +0 -0
  60. package/dist/fonts/roboto-vietnamese-400.woff2 +0 -0
  61. package/dist/fonts/roboto-vietnamese-500.woff2 +0 -0
  62. package/dist/fonts/roboto-vietnamese-700.woff2 +0 -0
  63. package/dist/js/chunks/chunk-2CS6TITK.mjs +219 -0
  64. package/dist/js/chunks/chunk-2CS6TITK.mjs.map +7 -0
  65. package/dist/js/chunks/chunk-2RLBDFH4.mjs +108 -0
  66. package/dist/js/chunks/chunk-2RLBDFH4.mjs.map +7 -0
  67. package/dist/js/chunks/chunk-3L3QIYLC.mjs +85 -0
  68. package/dist/js/chunks/chunk-3L3QIYLC.mjs.map +7 -0
  69. package/dist/js/chunks/chunk-4EWGD4V2.mjs +75 -0
  70. package/dist/js/chunks/chunk-4EWGD4V2.mjs.map +7 -0
  71. package/dist/js/chunks/chunk-4IKVPCSU.mjs +7 -0
  72. package/dist/js/chunks/chunk-4IKVPCSU.mjs.map +7 -0
  73. package/dist/js/chunks/chunk-4PIXLDNJ.mjs +127 -0
  74. package/dist/js/chunks/chunk-4PIXLDNJ.mjs.map +7 -0
  75. package/dist/js/chunks/{chunk-KVJAVDBC.mjs → chunk-4QUCNFSD.mjs} +64 -113
  76. package/dist/js/chunks/chunk-4QUCNFSD.mjs.map +7 -0
  77. package/dist/js/chunks/{chunk-UETTGDLI.mjs → chunk-4TRZ2AER.mjs} +35 -41
  78. package/dist/js/chunks/chunk-4TRZ2AER.mjs.map +7 -0
  79. package/dist/js/chunks/{chunk-C6CHEWYP.mjs → chunk-5KIHWJI2.mjs} +40 -26
  80. package/dist/js/chunks/chunk-5KIHWJI2.mjs.map +7 -0
  81. package/dist/js/chunks/{chunk-L27Q6ZMI.mjs → chunk-67ZPPKXS.mjs} +20 -33
  82. package/dist/js/chunks/chunk-67ZPPKXS.mjs.map +7 -0
  83. package/dist/js/chunks/{chunk-XAEAEHIX.mjs → chunk-6FSEUFVW.mjs} +39 -26
  84. package/dist/js/chunks/chunk-6FSEUFVW.mjs.map +7 -0
  85. package/dist/js/chunks/chunk-752ADW4M.mjs +225 -0
  86. package/dist/js/chunks/chunk-752ADW4M.mjs.map +7 -0
  87. package/dist/js/chunks/{chunk-CK2XCICY.mjs → chunk-75E5EDJF.mjs} +3 -11
  88. package/dist/js/chunks/chunk-75E5EDJF.mjs.map +7 -0
  89. package/dist/js/chunks/{chunk-KHXZ2A4K.mjs → chunk-7NLUI3RR.mjs} +139 -66
  90. package/dist/js/chunks/chunk-7NLUI3RR.mjs.map +7 -0
  91. package/dist/js/chunks/chunk-7W7TV6NY.mjs +108 -0
  92. package/dist/js/chunks/chunk-7W7TV6NY.mjs.map +7 -0
  93. package/dist/js/chunks/chunk-7YQBHTK3.mjs +225 -0
  94. package/dist/js/chunks/chunk-7YQBHTK3.mjs.map +7 -0
  95. package/dist/js/chunks/chunk-7YZ5CN3V.mjs +33 -0
  96. package/dist/js/chunks/chunk-7YZ5CN3V.mjs.map +7 -0
  97. package/dist/js/chunks/chunk-AI73GJKG.mjs +28 -0
  98. package/dist/js/chunks/chunk-AI73GJKG.mjs.map +7 -0
  99. package/dist/js/chunks/{chunk-LQWUDNHZ.mjs → chunk-ANKFWNWT.mjs} +21 -45
  100. package/dist/js/chunks/chunk-ANKFWNWT.mjs.map +7 -0
  101. package/dist/js/chunks/{chunk-5CEAOLUA.mjs → chunk-B7DQFHA5.mjs} +30 -47
  102. package/dist/js/chunks/chunk-B7DQFHA5.mjs.map +7 -0
  103. package/dist/js/chunks/chunk-BIGU5RCJ.mjs +153 -0
  104. package/dist/js/chunks/chunk-BIGU5RCJ.mjs.map +7 -0
  105. package/dist/js/chunks/{chunk-VGNYF6FB.mjs → chunk-BPF3I2MN.mjs} +109 -24
  106. package/dist/js/chunks/chunk-BPF3I2MN.mjs.map +7 -0
  107. package/dist/js/chunks/chunk-CMGXGYUC.mjs +74 -0
  108. package/dist/js/chunks/chunk-CMGXGYUC.mjs.map +7 -0
  109. package/dist/js/chunks/{chunk-NUHMOAOY.mjs → chunk-CSYWKEK3.mjs} +310 -196
  110. package/dist/js/chunks/chunk-CSYWKEK3.mjs.map +7 -0
  111. package/dist/js/chunks/chunk-CZSQHXEV.mjs +227 -0
  112. package/dist/js/chunks/chunk-CZSQHXEV.mjs.map +7 -0
  113. package/dist/js/chunks/chunk-DZYVU75J.mjs +121 -0
  114. package/dist/js/chunks/chunk-DZYVU75J.mjs.map +7 -0
  115. package/dist/js/chunks/{chunk-74MXKKLN.mjs → chunk-EC26RU2D.mjs} +11 -29
  116. package/dist/js/chunks/chunk-EC26RU2D.mjs.map +7 -0
  117. package/dist/js/chunks/{chunk-WDK4T63U.mjs → chunk-EVCVFEV3.mjs} +235 -146
  118. package/dist/js/chunks/chunk-EVCVFEV3.mjs.map +7 -0
  119. package/dist/js/chunks/chunk-FCNF4GRJ.mjs +445 -0
  120. package/dist/js/chunks/chunk-FCNF4GRJ.mjs.map +7 -0
  121. package/dist/js/chunks/chunk-GCWWEZKO.mjs +342 -0
  122. package/dist/js/chunks/chunk-GCWWEZKO.mjs.map +7 -0
  123. package/dist/js/chunks/chunk-GNRSYMVH.mjs +1 -0
  124. package/dist/js/chunks/chunk-GVZQH2H5.mjs +54 -0
  125. package/dist/js/chunks/chunk-GVZQH2H5.mjs.map +7 -0
  126. package/dist/js/chunks/chunk-GWZ76SR4.mjs +435 -0
  127. package/dist/js/chunks/chunk-GWZ76SR4.mjs.map +7 -0
  128. package/dist/js/chunks/{chunk-PDG64UHF.mjs → chunk-ILDRRG7T.mjs} +21 -23
  129. package/dist/js/chunks/chunk-ILDRRG7T.mjs.map +7 -0
  130. package/dist/js/chunks/chunk-INLZWHLY.mjs +80 -0
  131. package/dist/js/chunks/chunk-INLZWHLY.mjs.map +7 -0
  132. package/dist/js/chunks/chunk-JUKBBN6P.mjs +175 -0
  133. package/dist/js/chunks/chunk-JUKBBN6P.mjs.map +7 -0
  134. package/dist/js/chunks/chunk-KYIEG4U3.mjs +730 -0
  135. package/dist/js/chunks/chunk-KYIEG4U3.mjs.map +7 -0
  136. package/dist/js/chunks/{chunk-BGZLF6JZ.mjs → chunk-KZPSAXIU.mjs} +142 -32
  137. package/dist/js/chunks/chunk-KZPSAXIU.mjs.map +7 -0
  138. package/dist/js/chunks/chunk-LDXCC2L3.mjs +438 -0
  139. package/dist/js/chunks/chunk-LDXCC2L3.mjs.map +7 -0
  140. package/dist/js/chunks/chunk-NAC72P7R.mjs +137 -0
  141. package/dist/js/chunks/chunk-NAC72P7R.mjs.map +7 -0
  142. package/dist/js/chunks/chunk-NBJAUGPP.mjs +244 -0
  143. package/dist/js/chunks/chunk-NBJAUGPP.mjs.map +7 -0
  144. package/dist/js/chunks/chunk-NNHVANQA.mjs +113 -0
  145. package/dist/js/chunks/chunk-NNHVANQA.mjs.map +7 -0
  146. package/dist/js/chunks/chunk-NVQ5EHCU.mjs +376 -0
  147. package/dist/js/chunks/chunk-NVQ5EHCU.mjs.map +7 -0
  148. package/dist/js/chunks/{chunk-DXGRXYYL.mjs → chunk-OP43LLIC.mjs} +28 -45
  149. package/dist/js/chunks/chunk-OP43LLIC.mjs.map +7 -0
  150. package/dist/js/chunks/chunk-OUCHKSAW.mjs +63 -0
  151. package/dist/js/chunks/chunk-OUCHKSAW.mjs.map +7 -0
  152. package/dist/js/chunks/{chunk-TSZYSW7F.mjs → chunk-OYNUDOHR.mjs} +19 -47
  153. package/dist/js/chunks/chunk-OYNUDOHR.mjs.map +7 -0
  154. package/dist/js/chunks/{chunk-UAZSDUVP.mjs → chunk-P6DRQ6KS.mjs} +36 -30
  155. package/dist/js/chunks/chunk-P6DRQ6KS.mjs.map +7 -0
  156. package/dist/js/chunks/chunk-PA7NU5AK.mjs +99 -0
  157. package/dist/js/chunks/chunk-PA7NU5AK.mjs.map +7 -0
  158. package/dist/js/chunks/chunk-QACZ6TUP.mjs +224 -0
  159. package/dist/js/chunks/chunk-QACZ6TUP.mjs.map +7 -0
  160. package/dist/js/chunks/{chunk-GJL6GCIU.mjs → chunk-QXKWVHBD.mjs} +265 -161
  161. package/dist/js/chunks/chunk-QXKWVHBD.mjs.map +7 -0
  162. package/dist/js/chunks/{chunk-X4ISMKE2.mjs → chunk-ROH2HDB4.mjs} +7 -6
  163. package/dist/js/chunks/chunk-ROH2HDB4.mjs.map +7 -0
  164. package/dist/js/chunks/chunk-S23RJ3XY.mjs +86 -0
  165. package/dist/js/chunks/chunk-S23RJ3XY.mjs.map +7 -0
  166. package/dist/js/chunks/{chunk-SMY7GJSS.mjs → chunk-SPPHF7YZ.mjs} +36 -29
  167. package/dist/js/chunks/chunk-SPPHF7YZ.mjs.map +7 -0
  168. package/dist/js/chunks/chunk-T3BNSRP3.mjs +152 -0
  169. package/dist/js/chunks/chunk-T3BNSRP3.mjs.map +7 -0
  170. package/dist/js/chunks/chunk-TFABTUAZ.mjs +108 -0
  171. package/dist/js/chunks/chunk-TFABTUAZ.mjs.map +7 -0
  172. package/dist/js/chunks/chunk-U4B3VHFS.mjs +507 -0
  173. package/dist/js/chunks/chunk-U4B3VHFS.mjs.map +7 -0
  174. package/dist/js/chunks/chunk-UGJHCHXG.mjs +341 -0
  175. package/dist/js/chunks/chunk-UGJHCHXG.mjs.map +7 -0
  176. package/dist/js/chunks/chunk-VFV75DHF.mjs +70 -0
  177. package/dist/js/chunks/chunk-VFV75DHF.mjs.map +7 -0
  178. package/dist/js/chunks/{chunk-ZX6M7SWO.mjs → chunk-VGY4M57S.mjs} +266 -120
  179. package/dist/js/chunks/chunk-VGY4M57S.mjs.map +7 -0
  180. package/dist/js/chunks/chunk-VH4BMAZS.mjs +167 -0
  181. package/dist/js/chunks/chunk-VH4BMAZS.mjs.map +7 -0
  182. package/dist/js/chunks/chunk-VJVQIXHC.mjs +123 -0
  183. package/dist/js/chunks/chunk-VJVQIXHC.mjs.map +7 -0
  184. package/dist/js/chunks/{chunk-SFI2U4YW.mjs → chunk-VMY55K2X.mjs} +76 -109
  185. package/dist/js/chunks/chunk-VMY55K2X.mjs.map +7 -0
  186. package/dist/js/chunks/{chunk-KUFHW3DS.mjs → chunk-VR3L2WN5.mjs} +11 -17
  187. package/dist/js/chunks/chunk-VR3L2WN5.mjs.map +7 -0
  188. package/dist/js/chunks/chunk-W6FAL3TI.mjs +38 -0
  189. package/dist/js/chunks/chunk-W6FAL3TI.mjs.map +7 -0
  190. package/dist/js/chunks/chunk-WU7XJ4RR.mjs +450 -0
  191. package/dist/js/chunks/chunk-WU7XJ4RR.mjs.map +7 -0
  192. package/dist/js/chunks/chunk-X7SDA2J5.mjs +116 -0
  193. package/dist/js/chunks/chunk-X7SDA2J5.mjs.map +7 -0
  194. package/dist/js/chunks/chunk-Y6H2X7ZC.mjs +209 -0
  195. package/dist/js/chunks/chunk-Y6H2X7ZC.mjs.map +7 -0
  196. package/dist/js/chunks/chunk-Y6TLRA3U.mjs +129 -0
  197. package/dist/js/chunks/chunk-Y6TLRA3U.mjs.map +7 -0
  198. package/dist/js/chunks/chunk-Z4GICXR2.mjs +190 -0
  199. package/dist/js/chunks/chunk-Z4GICXR2.mjs.map +7 -0
  200. package/dist/js/chunks/chunk-Z4OARDZ7.mjs +442 -0
  201. package/dist/js/chunks/chunk-Z4OARDZ7.mjs.map +7 -0
  202. package/dist/js/chunks/{chunk-FM5CZOUB.mjs → chunk-ZJNLAGY5.mjs} +19 -30
  203. package/dist/js/chunks/chunk-ZJNLAGY5.mjs.map +7 -0
  204. package/dist/js/chunks/chunk-ZKWUWBUB.mjs +81 -0
  205. package/dist/js/chunks/chunk-ZKWUWBUB.mjs.map +7 -0
  206. package/dist/js/chunks/chunk-ZM3XBHWV.mjs +746 -0
  207. package/dist/js/chunks/chunk-ZM3XBHWV.mjs.map +7 -0
  208. package/dist/js/chunks/chunk-ZO6ZLHFF.mjs +48 -0
  209. package/dist/js/chunks/chunk-ZO6ZLHFF.mjs.map +7 -0
  210. package/dist/js/chunks/chunk-ZVLOUDIJ.mjs +251 -0
  211. package/dist/js/chunks/chunk-ZVLOUDIJ.mjs.map +7 -0
  212. package/dist/js/expressive.cjs +10613 -4327
  213. package/dist/js/expressive.cjs.map +4 -4
  214. package/dist/js/expressive.js +10613 -4327
  215. package/dist/js/expressive.js.map +4 -4
  216. package/dist/js/expressive.min.js +23 -22
  217. package/dist/js/expressive.min.js.map +4 -4
  218. package/dist/js/expressive.mjs +182 -71
  219. package/dist/js/expressive.mjs.map +2 -2
  220. package/dist/js/internal/behaviors/bottomSheets.mjs +4 -3
  221. package/dist/js/internal/behaviors/copy.mjs +9 -0
  222. package/dist/js/internal/behaviors/copy.mjs.map +7 -0
  223. package/dist/js/internal/behaviors/dataTables.mjs +10 -0
  224. package/dist/js/internal/behaviors/dataTables.mjs.map +7 -0
  225. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  226. package/dist/js/internal/behaviors/forms.mjs +2 -2
  227. package/dist/js/internal/behaviors/imageCompare.mjs +8 -0
  228. package/dist/js/internal/behaviors/imageCompare.mjs.map +7 -0
  229. package/dist/js/internal/behaviors/lists.mjs +8 -0
  230. package/dist/js/internal/behaviors/lists.mjs.map +7 -0
  231. package/dist/js/internal/behaviors/paneResize.mjs +8 -0
  232. package/dist/js/internal/behaviors/paneResize.mjs.map +7 -0
  233. package/dist/js/internal/behaviors/sheetDrag.mjs +7 -2
  234. package/dist/js/internal/behaviors/sideSheets.mjs +4 -3
  235. package/dist/js/internal/behaviors/sortable.mjs +8 -0
  236. package/dist/js/internal/behaviors/sortable.mjs.map +7 -0
  237. package/dist/js/internal/behaviors/theme.mjs +8 -0
  238. package/dist/js/internal/behaviors/theme.mjs.map +7 -0
  239. package/dist/js/internal/behaviors/tour.mjs +8 -0
  240. package/dist/js/internal/behaviors/tour.mjs.map +7 -0
  241. package/dist/js/internal/behaviors/transferList.mjs +8 -0
  242. package/dist/js/internal/behaviors/transferList.mjs.map +7 -0
  243. package/dist/js/internal/components/appBar.mjs +3 -2
  244. package/dist/js/internal/components/autocomplete.mjs +4 -4
  245. package/dist/js/internal/components/backToTop.mjs +9 -0
  246. package/dist/js/internal/components/backToTop.mjs.map +7 -0
  247. package/dist/js/internal/components/barChart.mjs +5 -4
  248. package/dist/js/internal/components/buttonGroup.mjs +3 -2
  249. package/dist/js/internal/components/buttons.mjs +3 -3
  250. package/dist/js/internal/components/cards.mjs +3 -3
  251. package/dist/js/internal/components/carousel.mjs +3 -3
  252. package/dist/js/internal/components/cascader.mjs +10 -0
  253. package/dist/js/internal/components/cascader.mjs.map +7 -0
  254. package/dist/js/internal/components/characterCounter.mjs +3 -2
  255. package/dist/js/internal/components/chips.mjs +6 -5
  256. package/dist/js/internal/components/colorPicker.mjs +9 -0
  257. package/dist/js/internal/components/colorPicker.mjs.map +7 -0
  258. package/dist/js/internal/components/columnChart.mjs +4 -3
  259. package/dist/js/internal/components/commandPalette.mjs +3 -3
  260. package/dist/js/internal/components/confetti.mjs +3 -2
  261. package/dist/js/internal/components/currencyInput.mjs +9 -0
  262. package/dist/js/internal/components/currencyInput.mjs.map +7 -0
  263. package/dist/js/internal/components/datepicker.mjs +11 -8
  264. package/dist/js/internal/components/expandingCard.mjs +3 -3
  265. package/dist/js/internal/components/funnelChart.mjs +10 -0
  266. package/dist/js/internal/components/funnelChart.mjs.map +7 -0
  267. package/dist/js/internal/components/heatmapChart.mjs +4 -3
  268. package/dist/js/internal/components/hoverCard.mjs +9 -0
  269. package/dist/js/internal/components/hoverCard.mjs.map +7 -0
  270. package/dist/js/internal/components/index.mjs +131 -66
  271. package/dist/js/internal/components/inputMask.mjs +9 -0
  272. package/dist/js/internal/components/inputMask.mjs.map +7 -0
  273. package/dist/js/internal/components/keypad.mjs +3 -3
  274. package/dist/js/internal/components/lightbox.mjs +3 -3
  275. package/dist/js/internal/components/lineChart.mjs +25 -4
  276. package/dist/js/internal/components/loadingOverlay.mjs +9 -0
  277. package/dist/js/internal/components/loadingOverlay.mjs.map +7 -0
  278. package/dist/js/internal/components/mapView.mjs +3 -3
  279. package/dist/js/internal/components/menu.mjs +3 -3
  280. package/dist/js/internal/components/menubar.mjs +10 -0
  281. package/dist/js/internal/components/menubar.mjs.map +7 -0
  282. package/dist/js/internal/components/messageScroller.mjs +3 -3
  283. package/dist/js/internal/components/mixedChart.mjs +5 -4
  284. package/dist/js/internal/components/navigationRail.mjs +3 -2
  285. package/dist/js/internal/components/particles.mjs +3 -2
  286. package/dist/js/internal/components/pieChart.mjs +4 -3
  287. package/dist/js/internal/components/pullToRefresh.mjs +9 -0
  288. package/dist/js/internal/components/pullToRefresh.mjs.map +7 -0
  289. package/dist/js/internal/components/questionnaire.mjs +3 -3
  290. package/dist/js/internal/components/radarChart.mjs +4 -3
  291. package/dist/js/internal/components/radialChart.mjs +4 -3
  292. package/dist/js/internal/components/registry.mjs +59 -41
  293. package/dist/js/internal/components/richTextEditor.mjs +3 -3
  294. package/dist/js/internal/components/sankeyChart.mjs +10 -0
  295. package/dist/js/internal/components/sankeyChart.mjs.map +7 -0
  296. package/dist/js/internal/components/scatterChart.mjs +10 -0
  297. package/dist/js/internal/components/scatterChart.mjs.map +7 -0
  298. package/dist/js/internal/components/scrollspy.mjs +3 -2
  299. package/dist/js/internal/components/select.mjs +4 -4
  300. package/dist/js/internal/components/showMore.mjs +9 -0
  301. package/dist/js/internal/components/showMore.mjs.map +7 -0
  302. package/dist/js/internal/components/slider.mjs +3 -3
  303. package/dist/js/internal/components/snackbar.mjs +2 -2
  304. package/dist/js/internal/components/swipeActions.mjs +9 -0
  305. package/dist/js/internal/components/swipeActions.mjs.map +7 -0
  306. package/dist/js/internal/components/tabs.mjs +3 -4
  307. package/dist/js/internal/components/timepicker.mjs +5 -4
  308. package/dist/js/internal/components/tooltip.mjs +3 -3
  309. package/dist/js/internal/components/treeSelect.mjs +13 -0
  310. package/dist/js/internal/components/treeSelect.mjs.map +7 -0
  311. package/dist/js/internal/components/treemapChart.mjs +10 -0
  312. package/dist/js/internal/components/treemapChart.mjs.map +7 -0
  313. package/dist/js/internal/core/component.mjs +2 -1
  314. package/dist/js/internal/core/formControl.mjs +12 -0
  315. package/dist/js/internal/core/formControl.mjs.map +7 -0
  316. package/dist/js/internal/core/spring.mjs +11 -0
  317. package/dist/js/internal/core/spring.mjs.map +7 -0
  318. package/dist/js/internal/core/utils.mjs +11 -3
  319. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  320. package/dist/js/internal/plugins/modalDisplayPlugin.mjs +13 -0
  321. package/dist/js/internal/plugins/modalDisplayPlugin.mjs.map +7 -0
  322. package/dist/js/modular.mjs +173 -71
  323. package/dist/types/behaviors/bottomSheets.d.ts +19 -3
  324. package/dist/types/behaviors/copy.d.ts +18 -0
  325. package/dist/types/behaviors/dataTables.d.ts +129 -0
  326. package/dist/types/behaviors/dialogs.d.ts +27 -1
  327. package/dist/types/behaviors/forms.d.ts +68 -2
  328. package/dist/types/behaviors/imageCompare.d.ts +12 -0
  329. package/dist/types/behaviors/lists.d.ts +12 -0
  330. package/dist/types/behaviors/paneResize.d.ts +29 -0
  331. package/dist/types/behaviors/sheetDrag.d.ts +18 -0
  332. package/dist/types/behaviors/sideSheets.d.ts +1 -1
  333. package/dist/types/behaviors/sortable.d.ts +28 -0
  334. package/dist/types/behaviors/theme.d.ts +22 -0
  335. package/dist/types/behaviors/tour.d.ts +36 -0
  336. package/dist/types/behaviors/transferList.d.ts +51 -0
  337. package/dist/types/components/appBar.d.ts +5 -6
  338. package/dist/types/components/autocomplete.d.ts +91 -17
  339. package/dist/types/components/backToTop.d.ts +36 -0
  340. package/dist/types/components/barChart.d.ts +3 -6
  341. package/dist/types/components/buttonGroup.d.ts +2 -4
  342. package/dist/types/components/buttons.d.ts +5 -5
  343. package/dist/types/components/cards.d.ts +3 -16
  344. package/dist/types/components/carousel.d.ts +9 -15
  345. package/dist/types/components/cascader.d.ts +130 -0
  346. package/dist/types/components/characterCounter.d.ts +2 -15
  347. package/dist/types/components/chips.d.ts +65 -19
  348. package/dist/types/components/colorPicker.d.ts +42 -0
  349. package/dist/types/components/columnChart.d.ts +23 -10
  350. package/dist/types/components/commandPalette.d.ts +11 -16
  351. package/dist/types/components/confetti.d.ts +2 -4
  352. package/dist/types/components/currencyInput.d.ts +59 -0
  353. package/dist/types/components/datepicker.d.ts +56 -32
  354. package/dist/types/components/expandingCard.d.ts +4 -6
  355. package/dist/types/components/funnelChart.d.ts +38 -0
  356. package/dist/types/components/heatmapChart.d.ts +39 -8
  357. package/dist/types/components/hoverCard.d.ts +58 -0
  358. package/dist/types/components/index.d.ts +16 -1
  359. package/dist/types/components/inputMask.d.ts +30 -0
  360. package/dist/types/components/keypad.d.ts +38 -6
  361. package/dist/types/components/lightbox.d.ts +14 -20
  362. package/dist/types/components/lineChart.d.ts +172 -10
  363. package/dist/types/components/loadingOverlay.d.ts +42 -0
  364. package/dist/types/components/mapView.d.ts +26 -17
  365. package/dist/types/components/menu.d.ts +60 -22
  366. package/dist/types/components/menubar.d.ts +37 -0
  367. package/dist/types/components/messageScroller.d.ts +2 -14
  368. package/dist/types/components/mixedChart.d.ts +15 -6
  369. package/dist/types/components/navigationRail.d.ts +16 -5
  370. package/dist/types/components/particles.d.ts +8 -4
  371. package/dist/types/components/pieChart.d.ts +32 -7
  372. package/dist/types/components/pullToRefresh.d.ts +80 -0
  373. package/dist/types/components/questionnaire.d.ts +58 -16
  374. package/dist/types/components/radarChart.d.ts +10 -6
  375. package/dist/types/components/radialChart.d.ts +58 -7
  376. package/dist/types/components/registry.d.ts +73 -3
  377. package/dist/types/components/richTextEditor.d.ts +6 -14
  378. package/dist/types/components/sankeyChart.d.ts +72 -0
  379. package/dist/types/components/scatterChart.d.ts +102 -0
  380. package/dist/types/components/scrollspy.d.ts +3 -5
  381. package/dist/types/components/select.d.ts +43 -30
  382. package/dist/types/components/showMore.d.ts +51 -0
  383. package/dist/types/components/slider.d.ts +3 -15
  384. package/dist/types/components/snackbar.d.ts +61 -0
  385. package/dist/types/components/swipeActions.d.ts +81 -0
  386. package/dist/types/components/tabs.d.ts +89 -27
  387. package/dist/types/components/timepicker.d.ts +113 -21
  388. package/dist/types/components/tooltip.d.ts +56 -20
  389. package/dist/types/components/treeSelect.d.ts +106 -0
  390. package/dist/types/components/treemapChart.d.ts +56 -0
  391. package/dist/types/core/component.d.ts +43 -25
  392. package/dist/types/core/formControl.d.ts +21 -0
  393. package/dist/types/core/spring.d.ts +20 -0
  394. package/dist/types/core/utils.d.ts +85 -72
  395. package/dist/types/modular.d.ts +33 -1
  396. package/dist/types/plugins/dockedDisplayPlugin.d.ts +10 -8
  397. package/dist/types/plugins/modalDisplayPlugin.d.ts +32 -0
  398. package/package.json +10 -8
  399. package/src/sass/README.md +27 -18
  400. package/src/sass/abstracts/_elevation.scss +13 -7
  401. package/src/sass/abstracts/_index.scss +1 -0
  402. package/src/sass/abstracts/_mixins.scss +422 -36
  403. package/src/sass/abstracts/_spring.scss +63 -0
  404. package/src/sass/abstracts/_variables.scss +39 -21
  405. package/src/sass/base/_fonts.scss +61 -48
  406. package/src/sass/base/_global.scss +104 -24
  407. package/src/sass/base/_index.scss +2 -0
  408. package/src/sass/base/_normalize.scss +59 -114
  409. package/src/sass/base/_print.scss +21 -0
  410. package/src/sass/base/_prose.scss +68 -0
  411. package/src/sass/base/_typography.scss +9 -5
  412. package/src/sass/components/_accordion.scss +9 -16
  413. package/src/sass/components/_alert.scss +102 -0
  414. package/src/sass/components/_aura.scss +8 -3
  415. package/src/sass/components/_avatar.scss +3 -3
  416. package/src/sass/components/_back-to-top.scss +38 -0
  417. package/src/sass/components/_badges.scss +6 -5
  418. package/src/sass/components/_bar-chart.scss +41 -19
  419. package/src/sass/components/_bottom-sheet.scss +44 -16
  420. package/src/sass/components/_breadcrumb.scss +8 -1
  421. package/src/sass/components/_button-groups.scss +15 -25
  422. package/src/sass/components/_buttons.scss +156 -63
  423. package/src/sass/components/_calendar.scss +246 -0
  424. package/src/sass/components/_cards.scss +36 -44
  425. package/src/sass/components/_carousel.scss +27 -103
  426. package/src/sass/components/_cascader.scss +142 -0
  427. package/src/sass/components/_chips.scss +36 -46
  428. package/src/sass/components/_column-chart.scss +19 -12
  429. package/src/sass/components/_command-palette.scss +4 -7
  430. package/src/sass/components/_confetti.scss +0 -2
  431. package/src/sass/components/_countdown.scss +1 -1
  432. package/src/sass/components/_data-table.scss +162 -25
  433. package/src/sass/components/_datepicker.scss +54 -40
  434. package/src/sass/components/_description-list.scss +85 -0
  435. package/src/sass/components/_dialog.scss +42 -41
  436. package/src/sass/components/_docked-display.scss +1 -3
  437. package/src/sass/components/_drag-handle.scss +16 -20
  438. package/src/sass/components/_expanding-card.scss +20 -9
  439. package/src/sass/components/_fab-menu.scss +44 -32
  440. package/src/sass/components/_funnel-chart.scss +124 -0
  441. package/src/sass/components/_heatmap-chart.scss +111 -22
  442. package/src/sass/components/_icon-buttons.scss +7 -7
  443. package/src/sass/components/_icons-material-design.scss +2 -2
  444. package/src/sass/components/_image-compare.scss +108 -0
  445. package/src/sass/components/_index.scss +20 -0
  446. package/src/sass/components/_keypad.scss +39 -19
  447. package/src/sass/components/_kpi.scss +6 -11
  448. package/src/sass/components/_lightbox.scss +24 -13
  449. package/src/sass/components/_line-chart.scss +16 -2
  450. package/src/sass/components/_list.scss +59 -14
  451. package/src/sass/components/_loading-indicator.scss +1 -0
  452. package/src/sass/components/_loading-overlay.scss +105 -0
  453. package/src/sass/components/_map.scss +33 -11
  454. package/src/sass/components/_marquee.scss +3 -2
  455. package/src/sass/components/_mega-menu.scss +137 -0
  456. package/src/sass/components/_menu.scss +143 -123
  457. package/src/sass/components/_menubar.scss +59 -0
  458. package/src/sass/components/_message-scroller.scss +2 -2
  459. package/src/sass/components/_message.scss +3 -3
  460. package/src/sass/components/_mixed-chart.scss +37 -9
  461. package/src/sass/components/_modal-display.scss +21 -0
  462. package/src/sass/components/_navbar.scss +34 -20
  463. package/src/sass/components/_navigation-bar.scss +15 -77
  464. package/src/sass/components/_navigation-rail.scss +151 -92
  465. package/src/sass/components/_org-chart.scss +192 -0
  466. package/src/sass/components/_page-footer.scss +1 -1
  467. package/src/sass/components/_pagination.scss +6 -13
  468. package/src/sass/components/_panes.scss +32 -26
  469. package/src/sass/components/_particles.scss +0 -2
  470. package/src/sass/components/_pie-chart.scss +91 -11
  471. package/src/sass/components/_popover.scss +18 -5
  472. package/src/sass/components/_progress.scss +152 -31
  473. package/src/sass/components/_pull-to-refresh.scss +90 -0
  474. package/src/sass/components/_questionnaire.scss +74 -3
  475. package/src/sass/components/_radar-chart.scss +38 -10
  476. package/src/sass/components/_radial-chart.scss +113 -5
  477. package/src/sass/components/_rich-text-editor.scss +2 -2
  478. package/src/sass/components/_sankey-chart.scss +114 -0
  479. package/src/sass/components/_scatter-chart.scss +153 -0
  480. package/src/sass/components/_scrim.scss +0 -2
  481. package/src/sass/components/_scrollspy.scss +0 -2
  482. package/src/sass/components/_search.scss +26 -22
  483. package/src/sass/components/_show-more.scss +8 -0
  484. package/src/sass/components/_side-sheet.scss +23 -37
  485. package/src/sass/components/_skeleton.scss +2 -4
  486. package/src/sass/components/_snackbar.scss +27 -21
  487. package/src/sass/components/_split-button.scss +5 -5
  488. package/src/sass/components/_stat.scss +3 -8
  489. package/src/sass/components/_stepper.scss +1 -1
  490. package/src/sass/components/_swipe-actions.scss +71 -0
  491. package/src/sass/components/_tabs.scss +51 -32
  492. package/src/sass/components/_timeline.scss +12 -12
  493. package/src/sass/components/_timepicker.scss +109 -78
  494. package/src/sass/components/_toolbar.scss +35 -43
  495. package/src/sass/components/_tooltip.scss +21 -12
  496. package/src/sass/components/_tour.scss +89 -0
  497. package/src/sass/components/_transfer-list.scss +73 -0
  498. package/src/sass/components/_transitions.scss +4 -4
  499. package/src/sass/components/_tree.scss +3 -16
  500. package/src/sass/components/_treemap-chart.scss +122 -0
  501. package/src/sass/components/forms/_checkboxes.scss +106 -24
  502. package/src/sass/components/forms/_color-picker.scss +135 -0
  503. package/src/sass/components/forms/_color-swatches.scss +85 -0
  504. package/src/sass/components/forms/_drop-zone.scss +15 -9
  505. package/src/sass/components/forms/_fieldset.scss +7 -7
  506. package/src/sass/components/forms/_file-input.scss +6 -8
  507. package/src/sass/components/forms/_index.scss +3 -1
  508. package/src/sass/components/forms/_input-fields.scss +254 -90
  509. package/src/sass/components/forms/_radio-buttons.scss +33 -94
  510. package/src/sass/components/forms/_rating.scss +2 -32
  511. package/src/sass/components/forms/_select.scss +199 -20
  512. package/src/sass/components/forms/_slider.scss +91 -94
  513. package/src/sass/components/forms/_switches.scss +53 -164
  514. package/src/sass/custom.scss +10 -1
  515. package/src/sass/expressive.scss +3 -63
  516. package/src/sass/tokens/_contrast.scss +94 -0
  517. package/src/sass/tokens/_elevation.scss +16 -0
  518. package/src/sass/tokens/_index.scss +5 -0
  519. package/src/sass/tokens/_motion.scss +109 -0
  520. package/src/sass/tokens/_reference.scss +72 -141
  521. package/src/sass/tokens/_shape.scss +38 -0
  522. package/src/sass/tokens/_stacking.scss +27 -0
  523. package/src/sass/tokens/_state.scss +0 -2
  524. package/src/sass/tokens/_theme.scss +10 -1
  525. package/src/sass/tokens/_vibrant.scss +2 -5
  526. package/src/sass/utilities/_defer-render.scss +17 -0
  527. package/src/sass/utilities/_helpers.scss +183 -26
  528. package/src/sass/utilities/_index.scss +1 -0
  529. package/src/sass/utilities/_scroll-area.scss +0 -2
  530. package/src/sass/utilities/_spacing.scss +52 -34
  531. package/src/sass/utilities/_typescale.scss +8 -1
  532. package/src/sass/utilities/_visibility.scss +47 -76
  533. package/src/sass/utilities/_z-depth.scss +7 -4
  534. package/dist/js/chunks/chunk-33QVDDGR.mjs +0 -270
  535. package/dist/js/chunks/chunk-33QVDDGR.mjs.map +0 -7
  536. package/dist/js/chunks/chunk-45FER6RI.mjs +0 -59
  537. package/dist/js/chunks/chunk-45FER6RI.mjs.map +0 -7
  538. package/dist/js/chunks/chunk-5CEAOLUA.mjs.map +0 -7
  539. package/dist/js/chunks/chunk-6VATUZC6.mjs +0 -295
  540. package/dist/js/chunks/chunk-6VATUZC6.mjs.map +0 -7
  541. package/dist/js/chunks/chunk-74MXKKLN.mjs.map +0 -7
  542. package/dist/js/chunks/chunk-AIURVCG6.mjs +0 -55
  543. package/dist/js/chunks/chunk-AIURVCG6.mjs.map +0 -7
  544. package/dist/js/chunks/chunk-BGZLF6JZ.mjs.map +0 -7
  545. package/dist/js/chunks/chunk-C6CHEWYP.mjs.map +0 -7
  546. package/dist/js/chunks/chunk-CK2XCICY.mjs.map +0 -7
  547. package/dist/js/chunks/chunk-CXXM2L4F.mjs +0 -344
  548. package/dist/js/chunks/chunk-CXXM2L4F.mjs.map +0 -7
  549. package/dist/js/chunks/chunk-DXGRXYYL.mjs.map +0 -7
  550. package/dist/js/chunks/chunk-FM5CZOUB.mjs.map +0 -7
  551. package/dist/js/chunks/chunk-GJL6GCIU.mjs.map +0 -7
  552. package/dist/js/chunks/chunk-K3HZMFMD.mjs +0 -135
  553. package/dist/js/chunks/chunk-K3HZMFMD.mjs.map +0 -7
  554. package/dist/js/chunks/chunk-KHXZ2A4K.mjs.map +0 -7
  555. package/dist/js/chunks/chunk-KQACNQ22.mjs +0 -7
  556. package/dist/js/chunks/chunk-KQACNQ22.mjs.map +0 -7
  557. package/dist/js/chunks/chunk-KUFHW3DS.mjs.map +0 -7
  558. package/dist/js/chunks/chunk-KVJAVDBC.mjs.map +0 -7
  559. package/dist/js/chunks/chunk-L27Q6ZMI.mjs.map +0 -7
  560. package/dist/js/chunks/chunk-LQWUDNHZ.mjs.map +0 -7
  561. package/dist/js/chunks/chunk-M372EDXD.mjs +0 -322
  562. package/dist/js/chunks/chunk-M372EDXD.mjs.map +0 -7
  563. package/dist/js/chunks/chunk-M3MURWMB.mjs +0 -82
  564. package/dist/js/chunks/chunk-M3MURWMB.mjs.map +0 -7
  565. package/dist/js/chunks/chunk-NUHMOAOY.mjs.map +0 -7
  566. package/dist/js/chunks/chunk-OWG3LMUL.mjs +0 -169
  567. package/dist/js/chunks/chunk-OWG3LMUL.mjs.map +0 -7
  568. package/dist/js/chunks/chunk-PD6HYHAE.mjs +0 -48
  569. package/dist/js/chunks/chunk-PD6HYHAE.mjs.map +0 -7
  570. package/dist/js/chunks/chunk-PDG64UHF.mjs.map +0 -7
  571. package/dist/js/chunks/chunk-PO3AXVR3.mjs +0 -546
  572. package/dist/js/chunks/chunk-PO3AXVR3.mjs.map +0 -7
  573. package/dist/js/chunks/chunk-QYGK36OG.mjs +0 -181
  574. package/dist/js/chunks/chunk-QYGK36OG.mjs.map +0 -7
  575. package/dist/js/chunks/chunk-SFI2U4YW.mjs.map +0 -7
  576. package/dist/js/chunks/chunk-SMY7GJSS.mjs.map +0 -7
  577. package/dist/js/chunks/chunk-TCCA2HDG.mjs +0 -414
  578. package/dist/js/chunks/chunk-TCCA2HDG.mjs.map +0 -7
  579. package/dist/js/chunks/chunk-TSZYSW7F.mjs.map +0 -7
  580. package/dist/js/chunks/chunk-UAZSDUVP.mjs.map +0 -7
  581. package/dist/js/chunks/chunk-UBRZZWRA.mjs +0 -127
  582. package/dist/js/chunks/chunk-UBRZZWRA.mjs.map +0 -7
  583. package/dist/js/chunks/chunk-UCOE7ZDL.mjs +0 -287
  584. package/dist/js/chunks/chunk-UCOE7ZDL.mjs.map +0 -7
  585. package/dist/js/chunks/chunk-UETTGDLI.mjs.map +0 -7
  586. package/dist/js/chunks/chunk-UNCRDLP6.mjs +0 -136
  587. package/dist/js/chunks/chunk-UNCRDLP6.mjs.map +0 -7
  588. package/dist/js/chunks/chunk-VGNYF6FB.mjs.map +0 -7
  589. package/dist/js/chunks/chunk-VGPGBNGL.mjs +0 -68
  590. package/dist/js/chunks/chunk-VGPGBNGL.mjs.map +0 -7
  591. package/dist/js/chunks/chunk-VKAUVTQY.mjs +0 -1
  592. package/dist/js/chunks/chunk-VM4FTS7L.mjs +0 -48
  593. package/dist/js/chunks/chunk-VM4FTS7L.mjs.map +0 -7
  594. package/dist/js/chunks/chunk-WDK4T63U.mjs.map +0 -7
  595. package/dist/js/chunks/chunk-WOCCTVUF.mjs +0 -185
  596. package/dist/js/chunks/chunk-WOCCTVUF.mjs.map +0 -7
  597. package/dist/js/chunks/chunk-WQYN5L4E.mjs +0 -107
  598. package/dist/js/chunks/chunk-WQYN5L4E.mjs.map +0 -7
  599. package/dist/js/chunks/chunk-X4ISMKE2.mjs.map +0 -7
  600. package/dist/js/chunks/chunk-XAEAEHIX.mjs.map +0 -7
  601. package/dist/js/chunks/chunk-ZX6M7SWO.mjs.map +0 -7
  602. /package/dist/js/chunks/{chunk-VKAUVTQY.mjs.map → chunk-GNRSYMVH.mjs.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ts/components/scatterChart.ts"],
4
+ "sourcesContent": ["import { svgNode } from '../core/utils';\nimport { LineChart, LineChartOptions, ChartScale, Series, affix, cellValue, morph, numberFormat, pace, tickText } from './lineChart';\n\nexport interface ScatterChartOptions extends LineChartOptions {\n /**\n * Lowest value on the x axis. Defaults to the data minimum less 10% of\n * the range. Overridden by `data-x-min` on the chart.\n */\n xMin: number | null;\n /**\n * Highest value on the x axis. Defaults to the data maximum plus 10% of\n * the range. Overridden by `data-x-max` on the chart.\n */\n xMax: number | null;\n}\n\n/**\n * A drawn point: its row and series, where it sits in the plot, in percent,\n * and its diameter as a share of the largest bubble's.\n */\ninterface Mark {\n row: number;\n series: Series;\n x: number;\n y: number;\n size: number;\n}\n\n/** Points as path data: round caps on zero-length lines. */\nconst dots = (marks: Mark[]) => marks.map(({ x, y }) => `M${x},${y}h0`).join('');\n\n/** A point's row and series column, which update() matches old and new points by. */\nconst place = ({ row, series }: Mark) => `${row} ${series.column}`;\n\n/** A tooltip line part. */\nconst span = (text: string) => Object.assign(document.createElement('span'), { textContent: text });\n\n/** A CSS time, such as 400ms or 0.4s, in milliseconds. */\nconst ms = (time: string) => parseFloat(time) * (time.trim().endsWith('ms') ? 1 : 1000);\n\n/**\n * Sizes a bubble, and with motion timing grows or shrinks it from its old\n * point's size. The Web Animations API, since SVG animation cannot reach a\n * size that CSS computes from a token.\n */\nfunction sized(path: SVGElement, size: number, was: Mark | undefined, timing: ReturnType<typeof pace>) {\n path.style.setProperty('--scatter-chart-size', `${size}`);\n if (!timing || !was || was.size === size) return;\n path.animate({ '--scatter-chart-size': [`${was.size}`, `${size}`] }, { duration: ms(timing.dur), easing: `cubic-bezier(${timing.keySplines})` });\n}\n\n/**\n * Scatter chart. It reads its <table> like LineChart, but the first value\n * column is the x axis: each row draws one point per later column, at the\n * row's x value and that column's y value. A row without an x value, or a\n * cell without a y value, draws no point.\n *\n * With `.bubble`, the last column sizes each row's points, so their areas\n * follow its values, and a row without a positive size draws no point.\n *\n * Call `update()` after changing the table, or start it with `watch` or\n * `data-watch`.\n */\nexport class ScatterChart extends LineChart {\n // No initializers: LineChart's constructor draws before they would run.\n /** Each row's x value, or null. */\n private _xs: (number | null)[];\n /** Each row's size: 1 without .bubble, or the last cell's value, null unless positive. */\n private _sizes: (number | null)[];\n /** The x scale. */\n private _xFit: ChartScale;\n /** The signs around the x column's numbers, which its axis labels repeat. */\n private _xAffix: [string, string];\n /** The drawn points, row by row and within a row by series. */\n private _marks: Mark[];\n /** During update(), the points drawn before it, which the new ones move from. */\n private _drawn: Mark[];\n\n protected get _type() {\n return 'scatter-chart';\n }\n\n protected get _seriesFrom() {\n return 2;\n }\n\n protected get _seriesTo() {\n return this._bubble ? -1 : undefined;\n }\n\n private get _bubble() {\n return this.el.classList.contains('bubble');\n }\n\n static get defaults(): ScatterChartOptions {\n return { ...LineChart.defaults, xMin: null, xMax: null };\n }\n\n static key = 'Expressive_ScatterChart';\n\n /**\n * Reads each row's x value into `_xs` and its size into `_sizes`, which\n * the scales and the points use, and leaves out the values of rows\n * without either, so they neither draw nor stretch a scale. Nothing stacks.\n */\n protected _arrange(series: Series[]) {\n const xs = (this._xs = this._rows.map((row) => cellValue(row.cells[1])));\n const sizes = (this._sizes = this._rows.map((row) => this._size(row)));\n for (const each of series) {\n each.values = each.tops = each.values.map((value, row) => (xs[row] === null || sizes[row] === null ? null : value));\n }\n }\n\n /** A row's size: 1 without .bubble, or its last cell's value, null unless positive. */\n private _size(row: HTMLTableRowElement) {\n if (!this._bubble) return 1;\n const size = cellValue(row.cells[this._header.length - 1]) ?? 0;\n return size > 0 ? size : null;\n }\n\n protected get _count() {\n return this._marks?.length ?? 0;\n }\n\n /** Highlights one point, numbered as `_marks` lists them. Pass -1 to hide the tooltip. */\n show(index: number) {\n if (!this._tooltip || index === this.activeIndex) return;\n this.activeIndex = index;\n const mark = this._marks[index];\n this._cursor.hidden = this._tooltip.hidden = !mark;\n if (mark) this._fill(mark);\n }\n\n /**\n * Puts the marker on a point, at a bubble's size, and fills the tooltip\n * beside it: the row, its x header and text, the series and its text, and\n * with .bubble the size header and text, as the author wrote them. Past\n * the middle the tooltip opens back over the plot.\n */\n private _fill({ row, series, x, y, size }: Mark) {\n this._cursor.dataset.series = series.color;\n this._cursor.style.setProperty('--scatter-chart-size', `${size}`);\n for (const part of [this._cursor, this._tooltip]) Object.assign(part.style, { left: `${x}%`, top: `${y}%` });\n this._tooltip.classList.toggle('end', x > 50);\n const [title, name] = [document.createElement('strong'), span(series.name)];\n title.textContent = this.labels[row];\n name.dataset.series = series.color;\n const sizeText = this._bubble ? this._cellText(row, this._header.length - 1) : [];\n this._tooltip.replaceChildren(title, ...this._cellText(row, 1), name, span(series.text[row]), ...sizeText);\n }\n\n /** A column's header, without a swatch since it names no series, and the row's text in it. */\n private _cellText(row: number, column: number) {\n const header = span(this._header[column].textContent.trim());\n header.className = 'x';\n return [header, span(this._rows[row].cells[column]?.textContent.trim() ?? '')];\n }\n\n /** The point nearest the pointer, or -1 with none. */\n protected _indexAt(e: PointerEvent) {\n const [plot, box] = [this._plot, this._plot.getBoundingClientRect()];\n const away = ({ x, y }: Mark) => Math.hypot(\n box.left + plot.clientLeft + (x / 100) * plot.clientWidth - e.clientX,\n box.top + plot.clientTop + (y / 100) * plot.clientHeight - e.clientY);\n return this._marks.reduce((nearest, mark, i) => (nearest < 0 || away(mark) < away(this._marks[nearest]) ? i : nearest), -1);\n }\n\n /**\n * Steps through the points in table order. The arrows keep their meaning\n * in a right-to-left chart, since table order is no direction on screen.\n */\n protected _keyTarget(key: string): number | undefined {\n // With nothing shown, Escape is left to a dialog or sheet around the chart.\n if (key === 'Escape') return this.activeIndex < 0 ? undefined : -1;\n const last = this._marks.length - 1;\n const step = ({ ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 } as Record<string, number>)[key];\n if (step) return Math.min(last, Math.max(0, this.activeIndex + step));\n return ({ Home: 0, End: last } as Record<string, number>)[key];\n }\n\n protected _read() {\n [this._drawn, this._marks] = [this._marks ?? [], []];\n super._read();\n if (!this.series.length) return;\n this._xFit = this._xScale();\n this._xAffix = affix(this._rows.map((row) => row.cells[1]));\n }\n\n /** The x scale over the rows with a point, between `xMin` and `xMax` where they are set. */\n private _xScale(): ChartScale {\n const [low, high] = this._xRange();\n const [min, max] = [this._xEnd('xMin'), this._xEnd('xMax')];\n return this._fit(min ?? low, max ?? high, [min !== null, max !== null]);\n }\n\n /** The x values of the rows with a point, with 10% of their span to spare each side. */\n private _xRange(): [number, number] {\n const xs = this._xs.filter((_, row) => this._hasPoint(row)) as number[];\n if (!xs.length) return [-1, 1];\n const [low, high] = [xs.reduce((a, b) => Math.min(a, b)), xs.reduce((a, b) => Math.max(a, b))];\n const pad = (high - low) * 0.1 || 1;\n return [low - pad, high + pad];\n }\n\n /** An x scale end from its data attribute or option, or null. */\n private _xEnd(name: 'xMin' | 'xMax') {\n return this._number(name) ?? (this.options as Partial<ScatterChartOptions>)[name] ?? null;\n }\n\n /** A value's distance across the plot from its inline start, in percent. */\n private _xAt(value: number) {\n const { min, max } = this._xFit;\n const x = ((value - min) / (max - min || 1)) * 100;\n return this._reversed ? 100 - x : x;\n }\n\n /** Whether any series shown draws a point in a row. */\n private _hasPoint(row: number) {\n return this.series.some((series) => series.values[row] !== null);\n }\n\n /** The points, each diameter the square root of its row's share of the largest size drawn, so areas follow sizes. */\n private _layout(): Mark[] {\n const largest = this._sizes.reduce<number>((most, size, row) => (this._hasPoint(row) ? Math.max(most, size!) : most), 0);\n return this.labels.flatMap((_, row) => this.series\n .filter((series) => series.values[row] !== null)\n .map((series) => ({\n row,\n series,\n x: this._xAt(this._xs[row]!),\n y: series.y(series.values[row]!),\n size: Math.sqrt(this._sizes[row]! / largest)\n })));\n }\n\n /** One group per series, its points round caps on zero-length lines, so CSS sizes them in pixels. */\n protected _draw(): Element {\n this._marks = this._layout();\n const svg = svgNode('svg', {\n viewBox: '0 0 100 100',\n preserveAspectRatio: 'none',\n 'aria-hidden': 'true',\n focusable: 'false'\n });\n const timing = this._before.length ? pace(this.el) : null;\n const was = new Map(this._drawn.map((old) => [place(old), old]));\n svg.append(...this.series.map((series) => this._group(series, timing, was)));\n return svg;\n }\n\n /**\n * A series' points, in one path, or with .bubble one path each, largest\n * first so smaller bubbles stay on top.\n */\n private _group(series: Series, timing: ReturnType<typeof pace>, was: Map<string, Mark>) {\n const group = svgNode('g', {\n class: `scatter-chart-series ${series.className}`.trim(),\n 'data-series': series.color\n });\n const marks = this._marks.filter((mark) => mark.series === series);\n const sets = this._bubble ? marks.sort((a, b) => b.size - a.size).map((mark) => [mark]) : [marks];\n group.append(...sets.map((set) => this._pointPath(set, timing, was)));\n return group;\n }\n\n /**\n * A path of points. After update() each moves from where its row's point\n * in the same column was drawn, or appears where it is.\n */\n private _pointPath(marks: Mark[], timing: ReturnType<typeof pace>, was: Map<string, Mark>) {\n const path = svgNode('path', { class: 'scatter-chart-points', d: dots(marks) });\n if (timing) morph(path, dots(marks.map((mark) => was.get(place(mark)) ?? mark)), timing);\n if (this._bubble) sized(path, marks[0].size, was.get(place(marks[0])), timing);\n return path;\n }\n\n /** With .axis, the y scale's labels, and the x scale's below the plot with a grid line at each. */\n protected _axes(): Element[] {\n return this._axis ? [...super._axes(), this._xAxis()] : [];\n }\n\n private _xAxis() {\n const axis = document.createElement('ol');\n axis.className = 'scatter-chart-axis x';\n axis.setAttribute('aria-hidden', 'true');\n const number = numberFormat(this.el, { notation: 'compact', maximumSignificantDigits: 3 });\n for (const tick of this._xFit.ticks) {\n const li = document.createElement('li');\n const label = document.createElement('span');\n label.textContent = tickText(number, tick, this._xAffix);\n li.style.setProperty('--at', `${this._xAt(tick)}%`);\n li.append(label);\n axis.append(li);\n }\n return axis;\n }\n\n /** The legend only: the rows have no labels along an axis. */\n protected _guides(): Element[] {\n return this._legend();\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AA6BA,IAAM,OAAO,CAAC,UAAkB,MAAM,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;AAG/E,IAAM,QAAQ,CAAC,EAAE,KAAK,OAAO,MAAY,GAAG,GAAG,IAAI,OAAO,MAAM;AAGhE,IAAM,OAAO,CAAC,SAAiB,OAAO,OAAO,SAAS,cAAc,MAAM,GAAG,EAAE,aAAa,KAAK,CAAC;AAGlG,IAAM,KAAK,CAAC,SAAiB,WAAW,IAAI,KAAK,KAAK,KAAK,EAAE,SAAS,IAAI,IAAI,IAAI;AAOlF,SAAS,MAAM,MAAkB,MAAc,KAAuB,QAAiC;AACrG,OAAK,MAAM,YAAY,wBAAwB,GAAG,IAAI,EAAE;AACxD,MAAI,CAAC,UAAU,CAAC,OAAO,IAAI,SAAS,KAAM;AAC1C,OAAK,QAAQ,EAAE,wBAAwB,CAAC,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,GAAG,GAAG,QAAQ,gBAAgB,OAAO,UAAU,IAAI,CAAC;AACjJ;AAcO,IAAM,eAAN,cAA2B,UAAU;AAAA,EAe1C,IAAc,QAAQ;AACpB,WAAO;AAAA,EACT;AAAA,EAEA,IAAc,cAAc;AAC1B,WAAO;AAAA,EACT;AAAA,EAEA,IAAc,YAAY;AACxB,WAAO,KAAK,UAAU,KAAK;AAAA,EAC7B;AAAA,EAEA,IAAY,UAAU;AACpB,WAAO,KAAK,GAAG,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AAM;AAC7E,WAAO;AAAA,EACT;AAAA;AAAA,EAGU,QAAmB;AAC3B,WAAO,KAAK,QAAQ,CAAC,GAAG,MAAM,MAAM,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC;AAAA,EAC3D;AAAA,EAEQ,SAAS;AACf,UAAM,OAAO,SAAS,cAAc,IAAI;AACxC,SAAK,YAAY;AACjB,SAAK,aAAa,eAAe,MAAM;AACvC,UAAM,SAAS,aAAa,KAAK,IAAI,EAAE,UAAU,WAAW,0BAA0B,EAAE,CAAC;AACzF,eAAW,QAAQ,KAAK,MAAM,OAAO;AACnC,YAAM,KAAK,SAAS,cAAc,IAAI;AACtC,YAAM,QAAQ,SAAS,cAAc,MAAM;AAC3C,YAAM,cAAc,SAAS,QAAQ,MAAM,KAAK,OAAO;AACvD,SAAG,MAAM,YAAY,QAAQ,GAAG,KAAK,KAAK,IAAI,CAAC,GAAG;AAClD,SAAG,OAAO,KAAK;AACf,WAAK,OAAO,EAAE;AAAA,IAChB;AACA,WAAO;AAAA,EACT;AAAA;AAAA,EAGU,UAAqB;AAC7B,WAAO,KAAK,QAAQ;AAAA,EACtB;AACF;AA9Oa,aAmCJ,MAAM;",
6
+ "names": []
7
+ }
@@ -1,24 +1,15 @@
1
1
  import {
2
2
  ColumnChart
3
- } from "./chunk-45FER6RI.mjs";
3
+ } from "./chunk-PA7NU5AK.mjs";
4
4
 
5
5
  // src/ts/components/barChart.ts
6
6
  var BarChart = class extends ColumnChart {
7
7
  get _type() {
8
8
  return "bar-chart";
9
9
  }
10
- get _key() {
11
- return "Expressive_BarChart";
12
- }
13
10
  get _horizontal() {
14
11
  return true;
15
12
  }
16
- static init(els, options = {}) {
17
- return super.init(els, options);
18
- }
19
- static getInstance(el) {
20
- return el["Expressive_BarChart"];
21
- }
22
13
  /**
23
14
  * The column chart's spans; CSS reads their --top and --bottom across the
24
15
  * plot. With .values, a copy of the bars without their clipping holds each
@@ -40,8 +31,9 @@ var BarChart = class extends ColumnChart {
40
31
  return layers;
41
32
  }
42
33
  };
34
+ BarChart.key = "Expressive_BarChart";
43
35
 
44
36
  export {
45
37
  BarChart
46
38
  };
47
- //# sourceMappingURL=chunk-CK2XCICY.mjs.map
39
+ //# sourceMappingURL=chunk-75E5EDJF.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ts/components/barChart.ts"],
4
+ "sourcesContent": ["import { ColumnChart, ColumnChartOptions } from './columnChart';\n\nexport type BarChartOptions = ColumnChartOptions;\n\n/**\n * Bar chart. A column chart turned on its side: each row of the <table> is\n * a band of bars that grow from zero along the inline axis, with its label\n * beside it. The up and down arrows move the tooltip between rows.\n *\n * Call `update()` after changing the table, or start it with `watch` or\n * `data-watch`.\n */\nexport class BarChart extends ColumnChart {\n protected get _type() {\n return 'bar-chart';\n }\n\n protected get _horizontal() {\n return true;\n }\n\n static key = 'Expressive_BarChart';\n\n /**\n * The column chart's spans; CSS reads their --top and --bottom across the\n * plot. With .values, a copy of the bars without their clipping holds each\n * cell's text, so text longer than a short bar can run past its end.\n */\n protected _draw(): Element {\n const bars = super._draw() as HTMLElement;\n bars.className = 'bar-chart-bars';\n // Read here rather than with :dir(), which misses CSS `direction`.\n bars.classList.toggle('rtl', getComputedStyle(this.el).direction === 'rtl');\n if (!this.el.classList.contains('values')) return bars;\n\n const values = bars.cloneNode(true) as HTMLElement;\n values.classList.replace('bar-chart-bars', 'bar-chart-values');\n values.querySelectorAll<HTMLElement>('span[data-text]').forEach((span) => {\n span.textContent = span.dataset.text;\n });\n const layers = document.createElement('div');\n layers.className = 'bar-chart-layers';\n layers.append(bars, values);\n return layers;\n }\n}\n"],
5
+ "mappings": ";;;;;AAYO,IAAM,WAAN,cAAuB,YAAY;AAAA,EACxC,IAAc,QAAQ;AACpB,WAAO;AAAA,EACT;AAAA,EAEA,IAAc,cAAc;AAC1B,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASU,QAAiB;AACzB,UAAM,OAAO,MAAM,MAAM;AACzB,SAAK,YAAY;AAEjB,SAAK,UAAU,OAAO,OAAO,iBAAiB,KAAK,EAAE,EAAE,cAAc,KAAK;AAC1E,QAAI,CAAC,KAAK,GAAG,UAAU,SAAS,QAAQ,EAAG,QAAO;AAElD,UAAM,SAAS,KAAK,UAAU,IAAI;AAClC,WAAO,UAAU,QAAQ,kBAAkB,kBAAkB;AAC7D,WAAO,iBAA8B,iBAAiB,EAAE,QAAQ,CAAC,SAAS;AACxE,WAAK,cAAc,KAAK,QAAQ;AAAA,IAClC,CAAC;AACD,UAAM,SAAS,SAAS,cAAc,KAAK;AAC3C,WAAO,YAAY;AACnB,WAAO,OAAO,MAAM,MAAM;AAC1B,WAAO;AAAA,EACT;AACF;AAjCa,SASJ,MAAM;",
6
+ "names": []
7
+ }
@@ -1,9 +1,9 @@
1
- import {
2
- Utils
3
- } from "./chunk-M372EDXD.mjs";
4
1
  import {
5
2
  Component
6
- } from "./chunk-PD6HYHAE.mjs";
3
+ } from "./chunk-CMGXGYUC.mjs";
4
+ import {
5
+ Utils
6
+ } from "./chunk-ZVLOUDIJ.mjs";
7
7
 
8
8
  // src/ts/components/mapView.ts
9
9
  var OPENFREEMAP = "https://tiles.openfreemap.org/styles/";
@@ -14,7 +14,14 @@ var _defaults = {
14
14
  zoom: 1,
15
15
  mapOptions: {}
16
16
  };
17
- var lngLat = (el) => el.dataset.lngLat.split(",").map(Number);
17
+ var isLngLat = (value) => value.length === 2 && value.every(Number.isFinite) && Math.abs(value[1]) <= 90;
18
+ var lngLat = (el) => {
19
+ const value = el.dataset.lngLat.split(",").map((part) => part.trim() ? Number(part) : NaN);
20
+ if (isLngLat(value)) return value;
21
+ console.warn(`MapView skipped data-lng-lat="${el.dataset.lngLat}": expected "longitude,latitude".`, el);
22
+ return null;
23
+ };
24
+ var positioned = (elements) => elements.map((el) => [el, lngLat(el)]).filter((pair) => pair[1] !== null);
18
25
  function arc([x0, y0], [x2, y2], steps = 32) {
19
26
  const bow = x2 >= x0 ? 0.25 : -0.25;
20
27
  const x1 = (x0 + x2) / 2 - (y2 - y0) * bow;
@@ -24,9 +31,11 @@ function arc([x0, y0], [x2, y2], steps = 32) {
24
31
  return [u * u * x0 + 2 * u * t * x1 + t * t * x2, u * u * y0 + 2 * u * t * y1 + t * t * y2];
25
32
  });
26
33
  }
27
- var MapView = class _MapView extends Component {
34
+ var ARROWS = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };
35
+ var plainArrow = (e) => Utils.plainKey(e) ? ARROWS[e.key] : void 0;
36
+ var MapView = class extends Component {
28
37
  constructor(el, options) {
29
- super(el, options, _MapView);
38
+ super(el, options);
30
39
  /** The MapLibre map. */
31
40
  this.map = null;
32
41
  /** The MapLibre markers made from `.map-marker` children, in order. */
@@ -38,11 +47,27 @@ var MapView = class _MapView extends Component {
38
47
  this._styleReady = false;
39
48
  this._dark = false;
40
49
  this._location = null;
41
- this._media = null;
42
50
  this._observer = null;
43
51
  // Looked up once: `move` fires every frame of a pan or zoom.
44
52
  this._zoomIn = [];
45
53
  this._zoomOut = [];
54
+ // The draggable marker a tap picked up, waiting for the tap that drops it.
55
+ this._picked = null;
56
+ // The marker whose drag just ended, so the click that follows does not pick it up.
57
+ this._dragged = null;
58
+ // Undoes what the map added to the page's markup, for destroy().
59
+ this._restore = [];
60
+ this._actions = {
61
+ "zoom-in": () => this.map.zoomIn(),
62
+ "zoom-out": () => this.map.zoomOut(),
63
+ compass: () => this.map.resetNorthPitch(),
64
+ locate: (button) => this._locate(button),
65
+ fullscreen: () => this._toggleFullscreen(),
66
+ "pan-up": () => this._pan(0, -1),
67
+ "pan-down": () => this._pan(0, 1),
68
+ "pan-left": () => this._pan(-1, 0),
69
+ "pan-right": () => this._pan(1, 0)
70
+ };
46
71
  this._handleStyleLoad = () => {
47
72
  this._styleReady = true;
48
73
  for (const overlay of this._overlays.values()) overlay.draw();
@@ -68,39 +93,19 @@ var MapView = class _MapView extends Component {
68
93
  this._handleClick = (e) => {
69
94
  const target = e.target;
70
95
  const button = target.closest(".map-controls [data-action]");
71
- const action = button?.dataset.action;
72
- if (action === "zoom-in") this.map.zoomIn();
73
- else if (action === "zoom-out") this.map.zoomOut();
74
- else if (action === "compass") this.map.resetNorthPitch();
75
- else if (action === "locate") this._locate(button);
76
- else if (action === "fullscreen") {
77
- if (document.fullscreenElement === this.el) document.exitFullscreen();
78
- else this.el.requestFullscreen();
79
- } else {
80
- const marker = target.closest(".map-marker");
81
- if (this._markerPopups.has(marker)) this._toggle(marker);
82
- }
96
+ if (button) this._actions[button.dataset.action]?.(button);
97
+ else this._tapMarker(target.closest(".map-marker"));
83
98
  };
84
99
  // A click on the map closes marker popups, but not the one being toggled.
85
100
  this._handleMapClick = (e) => {
86
101
  const target = e.originalEvent.target;
102
+ this._drop(target, e.lngLat);
87
103
  for (const [marker, popup] of this._markerPopups) {
88
104
  if (!marker.contains(target) && !popup.getElement()?.contains(target)) popup.remove();
89
105
  }
90
106
  };
91
107
  this._handleKeydown = (e) => {
92
- if (e.key !== "Escape") return;
93
- for (const popup of this._popups) {
94
- if (popup.getElement()?.contains(e.target)) {
95
- e.preventDefault();
96
- popup.remove();
97
- }
98
- }
99
- };
100
- this.el["Expressive_MapView"] = this;
101
- this.options = {
102
- ..._MapView.defaults,
103
- ...options
108
+ if (e.key === "Escape") this._escape(e);
104
109
  };
105
110
  const lib = this.options.maplibregl;
106
111
  if (!lib) {
@@ -123,48 +128,34 @@ var MapView = class _MapView extends Component {
123
128
  this.map.on("click", this._handleMapClick);
124
129
  const children = this._children.filter((child) => child instanceof HTMLElement);
125
130
  const claimed = /* @__PURE__ */ new Set();
126
- for (const marker of children.filter((child) => child.matches(".map-marker[data-lng-lat]"))) {
131
+ for (const [marker, at] of positioned(children.filter((child) => child.matches(".map-marker[data-lng-lat]")))) {
127
132
  const target = marker.hasAttribute("aria-controls") ? Utils.getElementById(marker, marker.getAttribute("aria-controls")) : null;
128
133
  const popup = target?.parentElement === el && target.matches(".map-popup") ? target : null;
129
134
  if (popup) claimed.add(popup);
130
- this._addMarker(marker, popup);
135
+ this._addMarker(marker, popup, at);
131
136
  }
132
- for (const popup of children.filter((child) => child.matches(".map-popup[data-lng-lat]") && !claimed.has(child))) {
133
- this._popup(popup, 0).setLngLat(lngLat(popup)).addTo(this.map);
137
+ for (const [popup, at] of positioned(children.filter((child) => child.matches(".map-popup[data-lng-lat]") && !claimed.has(child)))) {
138
+ this._popup(popup, 0).setLngLat(at).addTo(this.map);
134
139
  }
140
+ const { signal } = this._events;
135
141
  if (this._themed()) {
136
- this._media = matchMedia("(prefers-color-scheme: dark)");
137
- this._media.addEventListener("change", this._handleScheme);
142
+ matchMedia("(prefers-color-scheme: dark)").addEventListener("change", this._handleScheme, { signal });
138
143
  this._observer = new MutationObserver(this._handleScheme);
139
144
  this._observer.observe(document.documentElement, { attributes: true, attributeFilter: ["theme"], subtree: true });
140
145
  }
141
146
  for (const button of this._buttons("fullscreen")) button.hidden = !document.fullscreenEnabled;
142
- document.addEventListener("fullscreenchange", this._handleFullscreen);
143
- el.addEventListener("click", this._handleClick);
144
- el.addEventListener("keydown", this._handleKeydown);
147
+ document.addEventListener("fullscreenchange", this._handleFullscreen, { signal });
148
+ el.addEventListener("click", this._handleClick, { signal });
149
+ el.addEventListener("keydown", this._handleKeydown, { signal });
145
150
  this._sync();
146
151
  }
147
152
  static get defaults() {
148
153
  return _defaults;
149
154
  }
150
- /**
151
- * Initializes instances of MapView.
152
- * @param els HTML elements.
153
- * @param options Component options.
154
- */
155
- static init(els, options = {}) {
156
- return super.init(els, options, _MapView);
157
- }
158
- static getInstance(el) {
159
- return el["Expressive_MapView"];
160
- }
161
155
  destroy() {
162
- this.el["Expressive_MapView"] = void 0;
156
+ super.destroy();
163
157
  if (!this.map) return;
164
- this.el.removeEventListener("click", this._handleClick);
165
- this.el.removeEventListener("keydown", this._handleKeydown);
166
- document.removeEventListener("fullscreenchange", this._handleFullscreen);
167
- this._media?.removeEventListener("change", this._handleScheme);
158
+ this._releaseMarkers();
168
159
  this._observer?.disconnect();
169
160
  for (const overlay of this._overlays.values()) overlay.off?.();
170
161
  for (const popup of this._popups) popup.remove();
@@ -210,7 +201,7 @@ var MapView = class _MapView extends Component {
210
201
  const zoomIn = async (e) => {
211
202
  const [feature] = e.features;
212
203
  const zoom = await this.map.getSource(id).getClusterExpansionZoom(feature.properties.cluster_id);
213
- this.map.easeTo({ center: feature.geometry.coordinates, zoom });
204
+ this.map?.easeTo({ center: feature.geometry.coordinates, zoom });
214
205
  };
215
206
  const pointer = () => {
216
207
  this.map.getCanvas().style.cursor = "pointer";
@@ -309,16 +300,13 @@ var MapView = class _MapView extends Component {
309
300
  this._overlays.set(id, overlay);
310
301
  if (this._styleReady) overlay.draw();
311
302
  }
312
- _addMarker(element, content) {
303
+ _addMarker(element, content, at) {
313
304
  const marker = new this.options.maplibregl.Marker({
314
305
  element,
315
306
  draggable: element.hasAttribute("data-draggable")
316
- }).setLngLat(lngLat(element)).addTo(this.map);
317
- marker.on("dragend", () => {
318
- const { lng, lat } = marker.getLngLat();
319
- element.dataset.lngLat = `${lng},${lat}`;
320
- element.dispatchEvent(new Event("change", { bubbles: true }));
321
- });
307
+ }).setLngLat(at).addTo(this.map);
308
+ marker.on("dragend", () => this._moved(marker));
309
+ if (element.hasAttribute("data-draggable")) this._makeMovable(element, marker);
322
310
  this.markers.push(marker);
323
311
  if (!content) return;
324
312
  element.setAttribute("aria-expanded", "false");
@@ -330,6 +318,68 @@ var MapView = class _MapView extends Component {
330
318
  });
331
319
  this._markerPopups.set(element, popup);
332
320
  }
321
+ /** A marker moved: its `data-lng-lat` holds the new place, and it fires `change`. */
322
+ _moved(marker) {
323
+ const element = marker.getElement();
324
+ const { lng, lat } = marker.getLngLat();
325
+ element.dataset.lngLat = `${lng},${lat}`;
326
+ element.dispatchEvent(new Event("change", { bubbles: true }));
327
+ }
328
+ // A drag is not the only way to move it (WCAG 2.5.7): a tap picks it up,
329
+ // and the arrow keys nudge it. A button is already a control; anything
330
+ // else becomes one, and destroy() takes that back off.
331
+ _makeMovable(element, marker) {
332
+ const added = element instanceof HTMLButtonElement ? [] : ["role", "tabindex"].filter((name) => !element.hasAttribute(name));
333
+ if (added.includes("role")) element.setAttribute("role", "button");
334
+ if (added.includes("tabindex")) element.tabIndex = 0;
335
+ element.setAttribute("aria-pressed", "false");
336
+ this._restore.push(() => ["aria-pressed", ...added].forEach((name) => element.removeAttribute(name)));
337
+ element.addEventListener("keydown", (e) => this._nudge(e, marker), { signal: this._events.signal });
338
+ marker.on("dragstart", () => this._dragged = element);
339
+ marker.on("dragend", () => setTimeout(() => this._dragged = null));
340
+ }
341
+ /** Takes back the attributes `_makeMovable()` added. Destroy removes its listeners. */
342
+ _releaseMarkers() {
343
+ this._restore.splice(0).forEach((undo) => undo());
344
+ this._picked = null;
345
+ }
346
+ /** The arrow keys move a focused draggable marker 10px, and the map stays put. */
347
+ _nudge(e, marker) {
348
+ const step = plainArrow(e);
349
+ if (!step) return;
350
+ e.preventDefault();
351
+ e.stopPropagation();
352
+ const at = this.map.project(marker.getLngLat());
353
+ marker.setLngLat(this.map.unproject([at.x + step[0] * 10, at.y + step[1] * 10]));
354
+ this._moved(marker);
355
+ }
356
+ /** Picks a marker up, or puts down the one already picked up. */
357
+ _pick(element) {
358
+ this._picked?.setAttribute("aria-pressed", "false");
359
+ this._picked = element;
360
+ element?.setAttribute("aria-pressed", "true");
361
+ }
362
+ // A tap on a draggable marker picks it up, or puts it back down; the click
363
+ // that ends a drag does neither.
364
+ _tapMarker(element) {
365
+ if (element?.hasAttribute("data-draggable")) this._tapMovable(element);
366
+ else if (this._markerPopups.has(element)) this._toggle(element);
367
+ }
368
+ _tapMovable(element) {
369
+ if (this._dragged !== element) this._pick(this._picked === element ? null : element);
370
+ }
371
+ /** A third of the map's width or height in a direction. */
372
+ _pan(x, y) {
373
+ const { width, height } = this.el.getBoundingClientRect();
374
+ this.map.panBy([x * width / 3, y * height / 3]);
375
+ }
376
+ // Either can be refused (an iframe without allowfullscreen, say). The
377
+ // button state follows fullscreenchange, so there is nothing to undo.
378
+ _toggleFullscreen() {
379
+ const request = document.fullscreenElement === this.el ? document.exitFullscreen() : this.el.requestFullscreen();
380
+ request.catch(() => {
381
+ });
382
+ }
333
383
  _popup(content, offset) {
334
384
  const popup = new this.options.maplibregl.Popup({ closeOnClick: false, maxWidth: "none", offset }).setDOMContent(content);
335
385
  this._popups.push(popup);
@@ -387,9 +437,32 @@ var MapView = class _MapView extends Component {
387
437
  _style() {
388
438
  return this._themed() ? this.options.style[this._dark ? "dark" : "light"] : this.options.style;
389
439
  }
440
+ // A tap on the map, not on a marker, puts a picked-up marker there.
441
+ _drop(target, at) {
442
+ if (!this._picked || target.closest?.(".map-marker")) return;
443
+ const marker = this.markers.find((m) => m.getElement() === this._picked);
444
+ marker.setLngLat(at);
445
+ this._moved(marker);
446
+ this._pick(null);
447
+ }
448
+ // Escape puts down a picked-up marker first, then closes a popup.
449
+ _escape(e) {
450
+ if (this._picked) {
451
+ e.preventDefault();
452
+ this._pick(null);
453
+ return;
454
+ }
455
+ for (const popup of this._popups) {
456
+ if (popup.getElement()?.contains(e.target)) {
457
+ e.preventDefault();
458
+ popup.remove();
459
+ }
460
+ }
461
+ }
390
462
  };
463
+ MapView.key = "Expressive_MapView";
391
464
 
392
465
  export {
393
466
  MapView
394
467
  };
395
- //# sourceMappingURL=chunk-KHXZ2A4K.mjs.map
468
+ //# sourceMappingURL=chunk-7NLUI3RR.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ts/components/mapView.ts"],
4
+ "sourcesContent": ["import { Utils } from '../core/utils';\nimport { Component, BaseOptions } from '../core/component';\n\n/** `[longitude, latitude]`, MapLibre's order. */\nexport type LngLat = [number, number];\n\n/**\n * The parts of the `maplibre-gl` module this component uses. Declared here so\n * the published types do not depend on MapLibre.\n */\nexport interface MapLibre {\n Map: new (options: object) => any;\n Marker: new (options: object) => any;\n Popup: new (options: object) => any;\n}\n\n/** A style for each color scheme. The map follows the page's theme. */\nexport interface MapThemedStyle {\n light: string | object;\n dark: string | object;\n}\n\nexport interface MapViewOptions extends BaseOptions {\n /**\n * The `maplibre-gl` module. ExpressiveCSS does not bundle MapLibre, so the\n * page imports it and passes it in.\n * @default null\n */\n maplibregl: MapLibre | null;\n /**\n * A MapLibre style URL or object, or `{ light, dark }` to follow the theme.\n * @default OpenFreeMap Positron and Dark\n */\n style: string | object | MapThemedStyle;\n /**\n * Starting `[longitude, latitude]`.\n * @default [0, 20]\n */\n center: LngLat;\n /**\n * Starting zoom level.\n * @default 1\n */\n zoom: number;\n /**\n * More MapLibre `Map` options, such as `maxZoom` or `bearing`.\n * @default {}\n */\n mapOptions: object;\n}\n\nexport interface MapLineOptions {\n /** CSS color. Defaults to the route or arc color token. */\n color?: string;\n /** Width in pixels. Routes default to 4, arcs to 2. */\n width?: number;\n /** 0 to 1. */\n opacity?: number;\n /** Dash and gap lengths in line widths, such as `[2, 2]`. */\n dashArray?: number[];\n}\n\nexport interface MapArc {\n from: LngLat;\n to: LngLat;\n}\n\nexport interface MapClusterOptions {\n /** CSS color. Defaults to the cluster color token. */\n color?: string;\n /**\n * Pixels within which points join a cluster.\n * @default 50\n */\n radius?: number;\n /**\n * Last zoom level that clusters points.\n * @default 14\n */\n maxZoom?: number;\n}\n\nconst OPENFREEMAP = 'https://tiles.openfreemap.org/styles/';\n\nconst _defaults: MapViewOptions = {\n maplibregl: null,\n style: { light: `${OPENFREEMAP}positron`, dark: `${OPENFREEMAP}dark` },\n center: [0, 20],\n zoom: 1,\n mapOptions: {}\n};\n\ntype Overlay = { draw: () => void; off?: () => void };\n\nconst isLngLat = (value: number[]): value is LngLat =>\n value.length === 2 && value.every(Number.isFinite) && Math.abs(value[1]) <= 90;\n\n// MapLibre throws on a bad position only after the map exists, which leaked\n// the map and stopped every later element in the same init(). A value that\n// is not \"lng,lat\", such as Google's lat,lng order past 90, is skipped.\nconst lngLat = (el: HTMLElement): LngLat | null => {\n // Number('') is 0, so an empty part (\"12.5,\") becomes NaN and fails.\n const value = el.dataset.lngLat.split(',').map((part) => (part.trim() ? Number(part) : NaN));\n if (isLngLat(value)) return value;\n console.warn(`MapView skipped data-lng-lat=\"${el.dataset.lngLat}\": expected \"longitude,latitude\".`, el);\n return null;\n};\n\n/** The elements with a usable `data-lng-lat`, each paired with its position. */\nconst positioned = (elements: HTMLElement[]) =>\n elements.map((el) => [el, lngLat(el)] as const).filter((pair): pair is readonly [HTMLElement, LngLat] => pair[1] !== null);\n\n// A quadratic B\u00E9zier from `from` to `to`, bowed north of an eastward line.\n// ponytail: drawn in degrees, so an arc across the antimeridian goes the long\n// way round; split it at \u00B1180 if that matters.\nfunction arc([x0, y0]: LngLat, [x2, y2]: LngLat, steps = 32): LngLat[] {\n const bow = x2 >= x0 ? 0.25 : -0.25;\n const x1 = (x0 + x2) / 2 - (y2 - y0) * bow;\n const y1 = (y0 + y2) / 2 + (x2 - x0) * bow;\n return Array.from({ length: steps + 1 }, (_, i) => {\n const t = i / steps, u = 1 - t;\n return [u * u * x0 + 2 * u * t * x1 + t * t * x2, u * u * y0 + 2 * u * t * y1 + t * t * y2];\n });\n}\n\n// How far each arrow key nudges a focused draggable marker, in steps.\nconst ARROWS: Record<string, [number, number]> = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] };\nconst plainArrow = (e: KeyboardEvent) => (Utils.plainKey(e) ? ARROWS[e.key] : undefined);\n\n/**\n * An interactive map built on MapLibre: a `.map` holding `.map-marker`,\n * `.map-popup` and `.map-controls` children.\n *\n * Each marker sits at its `data-lng-lat`. A marker button with\n * `aria-controls` opens the `.map-popup` it names; a popup with its own\n * `data-lng-lat` and no marker opens at init. Buttons in `.map-controls`\n * run their `data-action`: `zoom-in`, `zoom-out`, `compass`, `locate`,\n * `fullscreen` or `pan-up`, `pan-down`, `pan-left` and `pan-right`. A\n * `data-draggable` marker moves without a drag too: a tap picks it up and\n * the next tap on the map drops it, and the arrow keys nudge it. Routes, arcs and clusters are data, so they are added from\n * script. The default style follows the page's light or dark theme, and\n * line and cluster colors come from the theme.\n *\n * The class is `MapView` rather than `Map` so importing it does not shadow\n * JavaScript's `Map`.\n */\nexport class MapView extends Component<MapViewOptions> {\n /** The MapLibre map. */\n map: any = null;\n /** The MapLibre markers made from `.map-marker` children, in order. */\n markers: any[] = [];\n private _children: Element[] = [];\n private _popups: any[] = [];\n private _markerPopups = new Map<HTMLElement, any>();\n private _overlays = new Map<string, Overlay>();\n private _styleReady = false;\n private _dark = false;\n private _location: any = null;\n private _observer: MutationObserver | null = null;\n // Looked up once: `move` fires every frame of a pan or zoom.\n private _zoomIn: HTMLButtonElement[] = [];\n private _zoomOut: HTMLButtonElement[] = [];\n // The draggable marker a tap picked up, waiting for the tap that drops it.\n private _picked: HTMLElement | null = null;\n // The marker whose drag just ended, so the click that follows does not pick it up.\n private _dragged: HTMLElement | null = null;\n // Undoes what the map added to the page's markup, for destroy().\n private _restore: (() => void)[] = [];\n private _actions: Record<string, (button: HTMLButtonElement) => void> = {\n 'zoom-in': () => this.map.zoomIn(),\n 'zoom-out': () => this.map.zoomOut(),\n compass: () => this.map.resetNorthPitch(),\n locate: (button) => this._locate(button),\n fullscreen: () => this._toggleFullscreen(),\n 'pan-up': () => this._pan(0, -1),\n 'pan-down': () => this._pan(0, 1),\n 'pan-left': () => this._pan(-1, 0),\n 'pan-right': () => this._pan(1, 0)\n };\n\n constructor(el: HTMLElement, options: Partial<MapViewOptions>) {\n super(el, options);\n const lib = this.options.maplibregl;\n if (!lib) {\n console.error('MapView needs the maplibre-gl module in options.maplibregl.');\n return;\n }\n\n this._children = [...el.children];\n this._zoomIn = [...this._buttons('zoom-in')];\n this._zoomOut = [...this._buttons('zoom-out')];\n this._dark = this._isDark();\n this.map = new lib.Map({\n ...this.options.mapOptions,\n container: el,\n style: this._style(),\n center: this.options.center,\n zoom: this.options.zoom\n });\n this.map.on('style.load', this._handleStyleLoad);\n this.map.on('move', this._sync);\n this.map.on('click', this._handleMapClick);\n\n const children = this._children.filter((child): child is HTMLElement => child instanceof HTMLElement);\n const claimed = new Set<Element>();\n for (const [marker, at] of positioned(children.filter((child) => child.matches('.map-marker[data-lng-lat]')))) {\n const target = marker.hasAttribute('aria-controls') ? Utils.getElementById(marker, marker.getAttribute('aria-controls')) : null;\n const popup = target?.parentElement === el && target.matches('.map-popup') ? target : null;\n if (popup) claimed.add(popup);\n this._addMarker(marker, popup, at);\n }\n for (const [popup, at] of positioned(children.filter((child) => child.matches('.map-popup[data-lng-lat]') && !claimed.has(child)))) {\n this._popup(popup, 0).setLngLat(at).addTo(this.map);\n }\n\n const { signal } = this._events;\n if (this._themed()) {\n matchMedia('(prefers-color-scheme: dark)').addEventListener('change', this._handleScheme, { signal });\n this._observer = new MutationObserver(this._handleScheme);\n this._observer.observe(document.documentElement, { attributes: true, attributeFilter: ['theme'], subtree: true });\n }\n for (const button of this._buttons('fullscreen')) button.hidden = !document.fullscreenEnabled;\n document.addEventListener('fullscreenchange', this._handleFullscreen, { signal });\n el.addEventListener('click', this._handleClick, { signal });\n el.addEventListener('keydown', this._handleKeydown, { signal });\n this._sync();\n }\n\n static get defaults(): MapViewOptions {\n return _defaults;\n }\n\n static key = 'Expressive_MapView';\n\n destroy() {\n super.destroy();\n if (!this.map) return;\n this._releaseMarkers();\n this._observer?.disconnect();\n for (const overlay of this._overlays.values()) overlay.off?.();\n for (const popup of this._popups) popup.remove();\n for (const marker of this.markers) {\n marker.remove();\n const element: HTMLElement = marker.getElement();\n element.classList.remove(...[...element.classList].filter((name) => name.startsWith('maplibregl-')));\n element.style.removeProperty('transform');\n element.style.removeProperty('opacity');\n if (element.hasAttribute('aria-controls')) element.removeAttribute('aria-expanded');\n }\n this._location?.remove();\n this._location = null;\n this.map.remove();\n this.map = null;\n this.markers = [];\n this._popups = [];\n this._markerPopups.clear();\n this._overlays.clear();\n this.el.style.removeProperty('--md-comp-map-bearing');\n for (const button of this.el.querySelectorAll<HTMLButtonElement>('.map-controls [data-action]')) {\n button.disabled = false;\n button.hidden = false;\n button.removeAttribute('aria-pressed');\n }\n this.el.append(...this._children);\n }\n\n /** Draws a line through `[longitude, latitude]` points. Replaces an overlay with the same id. */\n addRoute(id: string, coordinates: LngLat[], options: MapLineOptions = {}) {\n this._line(id, { type: 'LineString', coordinates }, 'route', { width: 4, ...options });\n }\n\n /** Draws a curved line for each `{ from, to }`. Replaces an overlay with the same id. */\n addArcs(id: string, arcs: MapArc[], options: MapLineOptions = {}) {\n this._line(id, { type: 'MultiLineString', coordinates: arcs.map(({ from, to }) => arc(from, to)) }, 'arc', { width: 2, ...options });\n }\n\n /**\n * Draws GeoJSON points, or the URL of a GeoJSON file, as clusters that\n * show their count and zoom in when clicked. The layers are\n * `${id}-clusters`, `${id}-count` and `${id}-points`.\n */\n addClusters(id: string, data: object | string, options: MapClusterOptions = {}) {\n const clusters = `${id}-clusters`, points = `${id}-points`;\n const zoomIn = async (e: any) => {\n const [feature] = e.features;\n const zoom = await this.map.getSource(id).getClusterExpansionZoom(feature.properties.cluster_id);\n // destroy() may have run while the zoom was looked up.\n this.map?.easeTo({ center: feature.geometry.coordinates, zoom });\n };\n const pointer = () => { this.map.getCanvas().style.cursor = 'pointer'; };\n const reset = () => { this.map.getCanvas().style.cursor = ''; };\n const listen = (method: 'on' | 'off') => {\n this.map[method]('click', clusters, zoomIn);\n for (const layer of [clusters, points]) {\n this.map[method]('mouseenter', layer, pointer);\n this.map[method]('mouseleave', layer, reset);\n }\n };\n this._draw(id, {\n draw: () => {\n const color = options.color ?? this._color('var(--md-comp-map-cluster-color)');\n const surface = this._color('var(--md-comp-map-marker-ring-color)');\n this.map.addSource(id, {\n type: 'geojson',\n data,\n cluster: true,\n clusterRadius: options.radius ?? 50,\n clusterMaxZoom: options.maxZoom ?? 14\n });\n this.map.addLayer({\n id: clusters,\n type: 'circle',\n source: id,\n filter: ['has', 'point_count'],\n paint: {\n 'circle-color': color,\n 'circle-radius': ['step', ['get', 'point_count'], 16, 10, 20, 100, 26],\n 'circle-stroke-width': 6,\n 'circle-stroke-color': color,\n 'circle-stroke-opacity': 0.3\n }\n });\n // A symbol layer needs the style's glyphs and one of its fonts.\n const style = this.map.getStyle();\n const font = style.glyphs && style.layers.find((layer: any) => layer.layout?.['text-font'])?.layout['text-font'];\n if (font) {\n this.map.addLayer({\n id: `${id}-count`,\n type: 'symbol',\n source: id,\n filter: ['has', 'point_count'],\n layout: { 'text-field': ['get', 'point_count_abbreviated'], 'text-font': font, 'text-size': 12 },\n paint: { 'text-color': this._color('var(--md-comp-map-cluster-label-color)') }\n });\n }\n this.map.addLayer({\n id: points,\n type: 'circle',\n source: id,\n filter: ['!', ['has', 'point_count']],\n paint: { 'circle-color': color, 'circle-radius': 6, 'circle-stroke-width': 2, 'circle-stroke-color': surface }\n });\n },\n off: () => listen('off')\n });\n listen('on');\n }\n\n /** Removes a route, arcs or clusters added with this id. */\n removeOverlay(id: string) {\n const overlay = this._overlays.get(id);\n if (!overlay) return;\n this._overlays.delete(id);\n overlay.off?.();\n if (!this._styleReady || !this.map.getSource(id)) return;\n for (const layer of this.map.getStyle().layers) if (layer.source === id) this.map.removeLayer(layer.id);\n this.map.removeSource(id);\n }\n\n private _line(id: string, geometry: object, token: string, options: MapLineOptions) {\n this._draw(id, {\n draw: () => {\n this.map.addSource(id, { type: 'geojson', data: { type: 'Feature', properties: {}, geometry } });\n this.map.addLayer({\n id,\n type: 'line',\n source: id,\n layout: { 'line-cap': 'round', 'line-join': 'round' },\n paint: {\n 'line-color': options.color ?? this._color(`var(--md-comp-map-${token}-color)`),\n 'line-width': options.width,\n 'line-opacity': options.opacity ?? 1,\n ...(options.dashArray && { 'line-dasharray': options.dashArray })\n }\n });\n }\n });\n }\n\n // Sources and layers go with the style, so every overlay is drawn again\n // when a theme change swaps it.\n private _draw(id: string, overlay: Overlay) {\n this.removeOverlay(id);\n this._overlays.set(id, overlay);\n if (this._styleReady) overlay.draw();\n }\n\n private _addMarker(element: HTMLElement, content: HTMLElement | null, at: LngLat) {\n const marker = new this.options.maplibregl.Marker({\n element,\n draggable: element.hasAttribute('data-draggable')\n }).setLngLat(at).addTo(this.map);\n marker.on('dragend', () => this._moved(marker));\n if (element.hasAttribute('data-draggable')) this._makeMovable(element, marker);\n this.markers.push(marker);\n if (!content) return;\n element.setAttribute('aria-expanded', 'false');\n const popup = this._popup(content, 16);\n popup.on('open', () => element.setAttribute('aria-expanded', 'true'));\n popup.on('close', () => {\n element.setAttribute('aria-expanded', 'false');\n if (!document.activeElement || document.activeElement === document.body) element.focus();\n });\n this._markerPopups.set(element, popup);\n }\n\n /** A marker moved: its `data-lng-lat` holds the new place, and it fires `change`. */\n private _moved(marker: any) {\n const element: HTMLElement = marker.getElement();\n const { lng, lat } = marker.getLngLat();\n element.dataset.lngLat = `${lng},${lat}`;\n element.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n // A drag is not the only way to move it (WCAG 2.5.7): a tap picks it up,\n // and the arrow keys nudge it. A button is already a control; anything\n // else becomes one, and destroy() takes that back off.\n private _makeMovable(element: HTMLElement, marker: any) {\n const added = element instanceof HTMLButtonElement ? [] : ['role', 'tabindex'].filter((name) => !element.hasAttribute(name));\n if (added.includes('role')) element.setAttribute('role', 'button');\n if (added.includes('tabindex')) element.tabIndex = 0;\n element.setAttribute('aria-pressed', 'false');\n this._restore.push(() => ['aria-pressed', ...added].forEach((name) => element.removeAttribute(name)));\n element.addEventListener('keydown', (e) => this._nudge(e, marker), { signal: this._events.signal });\n marker.on('dragstart', () => (this._dragged = element));\n marker.on('dragend', () => setTimeout(() => (this._dragged = null)));\n }\n\n /** Takes back the attributes `_makeMovable()` added. Destroy removes its listeners. */\n private _releaseMarkers() {\n this._restore.splice(0).forEach((undo) => undo());\n this._picked = null;\n }\n\n /** The arrow keys move a focused draggable marker 10px, and the map stays put. */\n private _nudge(e: KeyboardEvent, marker: any) {\n const step = plainArrow(e);\n if (!step) return;\n e.preventDefault();\n e.stopPropagation();\n const at = this.map.project(marker.getLngLat());\n marker.setLngLat(this.map.unproject([at.x + step[0] * 10, at.y + step[1] * 10]));\n this._moved(marker);\n }\n\n /** Picks a marker up, or puts down the one already picked up. */\n private _pick(element: HTMLElement | null) {\n this._picked?.setAttribute('aria-pressed', 'false');\n this._picked = element;\n element?.setAttribute('aria-pressed', 'true');\n }\n\n // A tap on a draggable marker picks it up, or puts it back down; the click\n // that ends a drag does neither.\n private _tapMarker(element: HTMLElement | null) {\n if (element?.hasAttribute('data-draggable')) this._tapMovable(element);\n else if (this._markerPopups.has(element)) this._toggle(element);\n }\n\n private _tapMovable(element: HTMLElement) {\n if (this._dragged !== element) this._pick(this._picked === element ? null : element);\n }\n\n /** A third of the map's width or height in a direction. */\n private _pan(x: number, y: number) {\n const { width, height } = this.el.getBoundingClientRect();\n this.map.panBy([(x * width) / 3, (y * height) / 3]);\n }\n\n // Either can be refused (an iframe without allowfullscreen, say). The\n // button state follows fullscreenchange, so there is nothing to undo.\n private _toggleFullscreen() {\n const request = document.fullscreenElement === this.el ? document.exitFullscreen() : this.el.requestFullscreen();\n request.catch(() => {});\n }\n\n private _popup(content: HTMLElement, offset: number) {\n const popup = new this.options.maplibregl.Popup({ closeOnClick: false, maxWidth: 'none', offset }).setDOMContent(content);\n this._popups.push(popup);\n return popup;\n }\n\n private _toggle(marker: HTMLElement) {\n const popup = this._markerPopups.get(marker);\n if (popup.isOpen()) popup.remove();\n else popup.setLngLat(this.markers.find((m) => m.getElement() === marker).getLngLat()).addTo(this.map);\n }\n\n private _buttons(action: string) {\n return this.el.querySelectorAll<HTMLButtonElement>(`.map-controls [data-action=\"${action}\"]`);\n }\n\n private _locate(button: HTMLButtonElement) {\n navigator.geolocation?.getCurrentPosition(\n ({ coords }) => {\n if (!this.map) return;\n const center = [coords.longitude, coords.latitude];\n if (!this._location) {\n const dot = document.createElement('span');\n dot.className = 'map-marker location';\n dot.setAttribute('aria-hidden', 'true');\n this._location = new this.options.maplibregl.Marker({ element: dot });\n }\n this._location.setLngLat(center).addTo(this.map);\n this.map.flyTo({ center, zoom: Math.max(this.map.getZoom(), 14) });\n },\n (error) => { if (this.map && error.code === error.PERMISSION_DENIED) button.disabled = true; }\n );\n }\n\n // Resolves a CSS color where the map is, so light-dark() and scoped\n // themes apply, then paints it on a canvas to read back the sRGB value.\n // MapLibre does not parse the oklch() the theme tokens compute to.\n private _color(value: string) {\n const probe = document.createElement('span');\n probe.hidden = true;\n probe.style.color = value;\n this.el.append(probe);\n const context = document.createElement('canvas').getContext('2d', { willReadFrequently: true });\n context.fillStyle = getComputedStyle(probe).color;\n probe.remove();\n context.fillRect(0, 0, 1, 1);\n const [r, g, b, a] = context.getImageData(0, 0, 1, 1).data;\n return `rgba(${r}, ${g}, ${b}, ${Math.round((a / 255) * 100) / 100})`;\n }\n\n private _isDark() {\n return this._color('light-dark(black, white)') === 'rgba(255, 255, 255, 1)';\n }\n\n private _themed() {\n const style = this.options.style;\n return typeof style === 'object' && 'light' in style && 'dark' in style;\n }\n\n private _style() {\n return this._themed() ? this.options.style[this._dark ? 'dark' : 'light'] : this.options.style;\n }\n\n private _handleStyleLoad = () => {\n this._styleReady = true;\n for (const overlay of this._overlays.values()) overlay.draw();\n };\n\n private _handleScheme = () => {\n const dark = this._isDark();\n if (dark === this._dark) return;\n this._dark = dark;\n this._styleReady = false;\n this.map.setStyle(this._style(), { diff: false });\n };\n\n private _sync = () => {\n const zoom = this.map.getZoom();\n for (const button of this._zoomIn) button.disabled = zoom >= this.map.getMaxZoom();\n for (const button of this._zoomOut) button.disabled = zoom <= this.map.getMinZoom();\n this.el.style.setProperty('--md-comp-map-bearing', `${-this.map.getBearing()}deg`);\n };\n\n private _handleFullscreen = () => {\n for (const button of this._buttons('fullscreen')) {\n button.setAttribute('aria-pressed', String(document.fullscreenElement === this.el));\n }\n };\n\n private _handleClick = (e: MouseEvent) => {\n const target = e.target as Element;\n const button = target.closest<HTMLButtonElement>('.map-controls [data-action]');\n if (button) this._actions[button.dataset.action]?.(button);\n else this._tapMarker(target.closest<HTMLElement>('.map-marker'));\n };\n\n // A click on the map closes marker popups, but not the one being toggled.\n private _handleMapClick = (e: any) => {\n const target = e.originalEvent.target as Node;\n this._drop(target, e.lngLat);\n for (const [marker, popup] of this._markerPopups) {\n if (!marker.contains(target) && !popup.getElement()?.contains(target)) popup.remove();\n }\n };\n\n // A tap on the map, not on a marker, puts a picked-up marker there.\n private _drop(target: Node, at: any) {\n if (!this._picked || (target as Element).closest?.('.map-marker')) return;\n const marker = this.markers.find((m) => m.getElement() === this._picked);\n marker.setLngLat(at);\n this._moved(marker);\n this._pick(null);\n }\n\n private _handleKeydown = (e: KeyboardEvent) => {\n if (e.key === 'Escape') this._escape(e);\n };\n\n // Escape puts down a picked-up marker first, then closes a popup.\n private _escape(e: KeyboardEvent) {\n if (this._picked) {\n e.preventDefault();\n this._pick(null);\n return;\n }\n for (const popup of this._popups) {\n if (popup.getElement()?.contains(e.target as Node)) {\n e.preventDefault();\n popup.remove();\n }\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;AAkFA,IAAM,cAAc;AAEpB,IAAM,YAA4B;AAAA,EAChC,YAAY;AAAA,EACZ,OAAO,EAAE,OAAO,GAAG,WAAW,YAAY,MAAM,GAAG,WAAW,OAAO;AAAA,EACrE,QAAQ,CAAC,GAAG,EAAE;AAAA,EACd,MAAM;AAAA,EACN,YAAY,CAAC;AACf;AAIA,IAAM,WAAW,CAAC,UAChB,MAAM,WAAW,KAAK,MAAM,MAAM,OAAO,QAAQ,KAAK,KAAK,IAAI,MAAM,CAAC,CAAC,KAAK;AAK9E,IAAM,SAAS,CAAC,OAAmC;AAEjD,QAAM,QAAQ,GAAG,QAAQ,OAAO,MAAM,GAAG,EAAE,IAAI,CAAC,SAAU,KAAK,KAAK,IAAI,OAAO,IAAI,IAAI,GAAI;AAC3F,MAAI,SAAS,KAAK,EAAG,QAAO;AAC5B,UAAQ,KAAK,iCAAi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AM,SAAS,KAAK,QAAQ,KAAK,CAAC,MAAM,EAAE,WAAW,MAAM,KAAK,OAAO;AACvE,WAAO,UAAU,EAAE;AACnB,SAAK,OAAO,MAAM;AAClB,SAAK,MAAM,IAAI;AAAA,EACjB;AAAA;AAAA,EAOQ,QAAQ,GAAkB;AAChC,QAAI,KAAK,SAAS;AAChB,QAAE,eAAe;AACjB,WAAK,MAAM,IAAI;AACf;AAAA,IACF;AACA,eAAW,SAAS,KAAK,SAAS;AAChC,UAAI,MAAM,WAAW,GAAG,SAAS,EAAE,MAAc,GAAG;AAClD,UAAE,eAAe;AACjB,cAAM,OAAO;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF;AA9ca,QAsFJ,MAAM;",
6
+ "names": []
7
+ }
@@ -0,0 +1,108 @@
1
+ import {
2
+ Utils,
3
+ controllerFor
4
+ } from "./chunk-ZVLOUDIJ.mjs";
5
+
6
+ // src/ts/behaviors/paneResize.ts
7
+ var container = ":is(.panes, .pane-layout, .list-detail, .supporting-pane-layout):not(.equal, .three-pane)";
8
+ var handleSelector = `${container} > button.drag-handle`;
9
+ var minWidth = 240;
10
+ var step = 16;
11
+ var _PaneResize = class _PaneResize {
12
+ // A second Init adds nothing: addEventListener ignores a listener it has.
13
+ static Init() {
14
+ if (typeof document === "undefined") return;
15
+ document.addEventListener("pointerdown", _PaneResize._onPointerDown);
16
+ document.addEventListener("keydown", _PaneResize._onKeyDown);
17
+ document.addEventListener("click", _PaneResize._onClick);
18
+ }
19
+ /** The current width of the handle's resizable pane, or null for a handle outside a supported layout. */
20
+ static width(handle) {
21
+ const pane = _PaneResize._pane(handle);
22
+ return pane ? pane.getBoundingClientRect().width : null;
23
+ }
24
+ /** Sets the resizable pane's width, clamped to what the layout can hold. */
25
+ static setWidth(handle, width) {
26
+ const pane = _PaneResize._pane(handle);
27
+ if (!pane) return;
28
+ const [min, max] = _PaneResize._bounds(handle);
29
+ const layout = handle.parentElement;
30
+ layout.style.setProperty(_PaneResize._token(layout), `${Math.round(Math.min(Math.max(width, min), max))}px`);
31
+ }
32
+ static _token(layout) {
33
+ return layout.matches(".supporting, .supporting-pane-layout") ? "--md-comp-pane-supporting-width" : "--md-comp-pane-list-width";
34
+ }
35
+ /** The pane the handle resizes: the list or supporting pane beside it. */
36
+ static _pane(handle) {
37
+ if (!handle.matches(handleSelector)) return null;
38
+ const layout = handle.parentElement;
39
+ const trailing = layout.matches(".supporting, .supporting-pane-layout") && !layout.matches(".start, .left");
40
+ return trailing ? handle.nextElementSibling : handle.previousElementSibling;
41
+ }
42
+ static _bounds(handle) {
43
+ const layout = handle.parentElement;
44
+ const style = getComputedStyle(layout);
45
+ const other = parseFloat(style.getPropertyValue("--md-comp-pane-primary-min-width")) || 360;
46
+ const content = layout.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);
47
+ const room = content - handle.getBoundingClientRect().width - other;
48
+ return [minWidth, Math.max(minWidth, room)];
49
+ }
50
+ /** True when the resizable pane sits physically left of the handle, so moving right widens it. */
51
+ static _paneIsLeft(handle) {
52
+ return _PaneResize._pane(handle).getBoundingClientRect().left < handle.getBoundingClientRect().left;
53
+ }
54
+ static _onPointerDown(e) {
55
+ const handle = Utils.closestInPath(e, handleSelector);
56
+ if (!handle || e.button !== 0) return;
57
+ const pane = _PaneResize._pane(handle);
58
+ if (!pane) return;
59
+ const startX = e.clientX;
60
+ const startWidth = pane.getBoundingClientRect().width;
61
+ const sign = _PaneResize._paneIsLeft(handle) ? 1 : -1;
62
+ _PaneResize._dragged = false;
63
+ handle.setPointerCapture(e.pointerId);
64
+ const move = (event) => {
65
+ const delta = event.clientX - startX;
66
+ if (Math.abs(delta) < 4 && !_PaneResize._dragged) return;
67
+ _PaneResize._dragged = true;
68
+ _PaneResize.setWidth(handle, startWidth + sign * delta);
69
+ };
70
+ const drag = controllerFor(handle);
71
+ const end = () => drag.abort();
72
+ const { signal } = drag;
73
+ handle.addEventListener("pointermove", move, { signal });
74
+ handle.addEventListener("pointerup", end, { signal });
75
+ handle.addEventListener("pointercancel", end, { signal });
76
+ }
77
+ static _onClick(e) {
78
+ const handle = Utils.closestInPath(e, handleSelector);
79
+ if (!handle) return;
80
+ if (e.detail !== 0 && _PaneResize._dragged) return;
81
+ const [min, max] = _PaneResize._bounds(handle);
82
+ const current = _PaneResize.width(handle);
83
+ const next = [min, (min + max) / 2, max].find((width) => width > current + 1) ?? min;
84
+ _PaneResize.setWidth(handle, next);
85
+ }
86
+ static _onKeyDown(e) {
87
+ const handle = Utils.closestInPath(e, handleSelector);
88
+ if (!handle || !Utils.plainKey(e)) return;
89
+ const current = _PaneResize.width(handle);
90
+ const [min, max] = _PaneResize._bounds(handle);
91
+ const amount = e.shiftKey ? step * 4 : step;
92
+ const physical = { ArrowLeft: -amount, ArrowRight: amount }[e.key];
93
+ let width;
94
+ if (physical) width = current + (_PaneResize._paneIsLeft(handle) ? physical : -physical);
95
+ else if (e.key === "Home") width = min;
96
+ else if (e.key === "End") width = max;
97
+ else return;
98
+ e.preventDefault();
99
+ _PaneResize.setWidth(handle, width);
100
+ }
101
+ };
102
+ _PaneResize._dragged = false;
103
+ var PaneResize = _PaneResize;
104
+
105
+ export {
106
+ PaneResize
107
+ };
108
+ //# sourceMappingURL=chunk-7W7TV6NY.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/ts/behaviors/paneResize.ts"],
4
+ "sourcesContent": ["import { Utils, controllerFor } from '../core/utils';\n\nconst container = ':is(.panes, .pane-layout, .list-detail, .supporting-pane-layout):not(.equal, .three-pane)';\nconst handleSelector = `${container} > button.drag-handle`;\n// The narrowest a resized pane may get, and the arrow-key step.\nconst minWidth = 240;\nconst step = 16;\n\n/**\n * Resizable panes. A `<button class=\"drag-handle\">` between the two panes of a\n * list-detail or supporting layout resizes the pane whose width is a token:\n * the list pane, or the supporting pane. Dragging moves the boundary; Left and\n * Right move it 16px (64px with Shift); Home and End jump to the narrowest\n * and widest; a click, Enter or Space steps through narrow, middle and wide,\n * the single-pointer alternative to dragging. The other pane keeps at least\n * `--md-comp-pane-primary-min-width`.\n *\n * The width is written as `--md-comp-pane-list-width` or\n * `--md-comp-pane-supporting-width` on the container's style.\n */\nexport class PaneResize {\n private static _dragged = false;\n\n // A second Init adds nothing: addEventListener ignores a listener it has.\n static Init() {\n if (typeof document === 'undefined') return;\n document.addEventListener('pointerdown', PaneResize._onPointerDown);\n document.addEventListener('keydown', PaneResize._onKeyDown);\n document.addEventListener('click', PaneResize._onClick);\n }\n\n /** The current width of the handle's resizable pane, or null for a handle outside a supported layout. */\n static width(handle: Element): number | null {\n const pane = PaneResize._pane(handle);\n return pane ? pane.getBoundingClientRect().width : null;\n }\n\n /** Sets the resizable pane's width, clamped to what the layout can hold. */\n static setWidth(handle: Element, width: number) {\n const pane = PaneResize._pane(handle);\n if (!pane) return;\n const [min, max] = PaneResize._bounds(handle);\n const layout = handle.parentElement;\n layout.style.setProperty(PaneResize._token(layout), `${Math.round(Math.min(Math.max(width, min), max))}px`);\n }\n\n private static _token(layout: Element) {\n return layout.matches('.supporting, .supporting-pane-layout')\n ? '--md-comp-pane-supporting-width'\n : '--md-comp-pane-list-width';\n }\n\n /** The pane the handle resizes: the list or supporting pane beside it. */\n private static _pane(handle: Element): Element | null {\n if (!handle.matches(handleSelector)) return null;\n const layout = handle.parentElement;\n const trailing = layout.matches('.supporting, .supporting-pane-layout') && !layout.matches('.start, .left');\n return trailing ? handle.nextElementSibling : handle.previousElementSibling;\n }\n\n private static _bounds(handle: Element): [number, number] {\n const layout = handle.parentElement;\n const style = getComputedStyle(layout);\n const other = parseFloat(style.getPropertyValue('--md-comp-pane-primary-min-width')) || 360;\n // The separated appearance pads the layout, so measure its content box.\n const content = layout.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight);\n const room = content - handle.getBoundingClientRect().width - other;\n return [minWidth, Math.max(minWidth, room)];\n }\n\n /** True when the resizable pane sits physically left of the handle, so moving right widens it. */\n private static _paneIsLeft(handle: Element) {\n return PaneResize._pane(handle).getBoundingClientRect().left < handle.getBoundingClientRect().left;\n }\n\n private static _onPointerDown(e: PointerEvent) {\n const handle = Utils.closestInPath(e, handleSelector) as HTMLElement;\n if (!handle || e.button !== 0) return;\n const pane = PaneResize._pane(handle);\n if (!pane) return;\n const startX = e.clientX;\n const startWidth = pane.getBoundingClientRect().width;\n const sign = PaneResize._paneIsLeft(handle) ? 1 : -1;\n PaneResize._dragged = false;\n handle.setPointerCapture(e.pointerId);\n const move = (event: PointerEvent) => {\n const delta = event.clientX - startX;\n // A few pixels of travel is still a click.\n if (Math.abs(delta) < 4 && !PaneResize._dragged) return;\n PaneResize._dragged = true;\n PaneResize.setWidth(handle, startWidth + sign * delta);\n };\n const drag = controllerFor(handle);\n const end = () => drag.abort();\n const { signal } = drag;\n handle.addEventListener('pointermove', move, { signal });\n handle.addEventListener('pointerup', end, { signal });\n handle.addEventListener('pointercancel', end, { signal });\n }\n\n private static _onClick(e: MouseEvent) {\n const handle = Utils.closestInPath(e, handleSelector);\n if (!handle) return;\n // The click that ends a mouse drag is not a request to step. A keyboard\n // click (detail 0) always is, even after a touch drag that left the flag\n // set; the next pointerdown clears it. BottomSheets guards the same way.\n if (e.detail !== 0 && PaneResize._dragged) return;\n const [min, max] = PaneResize._bounds(handle);\n const current = PaneResize.width(handle);\n const next = [min, (min + max) / 2, max].find((width) => width > current + 1) ?? min;\n PaneResize.setWidth(handle, next);\n }\n\n private static _onKeyDown(e: KeyboardEvent) {\n const handle = Utils.closestInPath(e, handleSelector);\n if (!handle || !Utils.plainKey(e)) return;\n const current = PaneResize.width(handle);\n const [min, max] = PaneResize._bounds(handle);\n const amount = e.shiftKey ? step * 4 : step;\n const physical = { ArrowLeft: -amount, ArrowRight: amount }[e.key];\n let width: number;\n if (physical) width = current + (PaneResize._paneIsLeft(handle) ? physical : -physical);\n else if (e.key === 'Home') width = min;\n else if (e.key === 'End') width = max;\n else return;\n e.preventDefault();\n PaneResize.setWidth(handle, width);\n }\n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