@vuetify/nightly 3.0.0-beta.13 → 3.0.0-beta.15

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 (840) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/dist/json/importMap.json +26 -30
  3. package/dist/vuetify.css +262 -173
  4. package/dist/vuetify.d.ts +16645 -7306
  5. package/dist/vuetify.esm.js +1040 -2004
  6. package/dist/vuetify.esm.js.map +1 -1
  7. package/dist/vuetify.js +1038 -2003
  8. package/dist/vuetify.js.map +1 -1
  9. package/dist/vuetify.min.css +2 -2
  10. package/dist/vuetify.min.js +531 -537
  11. package/dist/vuetify.min.js.map +1 -1
  12. package/lib/blueprints/index.d.ts +24 -32
  13. package/lib/blueprints/index.mjs.map +1 -1
  14. package/lib/blueprints/md1.d.ts +24 -32
  15. package/lib/blueprints/md1.mjs +3 -1
  16. package/lib/blueprints/md1.mjs.map +1 -1
  17. package/lib/blueprints/md2.d.ts +24 -32
  18. package/lib/blueprints/md2.mjs +3 -1
  19. package/lib/blueprints/md2.mjs.map +1 -1
  20. package/lib/blueprints/md3.d.ts +24 -32
  21. package/lib/blueprints/md3.mjs +2 -2
  22. package/lib/blueprints/md3.mjs.map +1 -1
  23. package/lib/components/VAlert/VAlert.mjs +2 -9
  24. package/lib/components/VAlert/VAlert.mjs.map +1 -1
  25. package/lib/components/VAlert/VAlertTitle.mjs.map +1 -1
  26. package/lib/components/VAlert/index.d.ts +7 -5
  27. package/lib/components/VAlert/index.mjs.map +1 -1
  28. package/lib/components/VApp/VApp.mjs +5 -7
  29. package/lib/components/VApp/VApp.mjs.map +1 -1
  30. package/lib/components/VApp/index.d.ts +4 -2
  31. package/lib/components/VApp/index.mjs.map +1 -1
  32. package/lib/components/VAppBar/VAppBar.mjs +4 -8
  33. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  34. package/lib/components/VAppBar/VAppBarNavIcon.mjs +0 -4
  35. package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
  36. package/lib/components/VAppBar/VAppBarTitle.mjs +2 -4
  37. package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
  38. package/lib/components/VAppBar/index.d.ts +7 -3
  39. package/lib/components/VAppBar/index.mjs.map +1 -1
  40. package/lib/components/VAutocomplete/VAutocomplete.css +18 -1
  41. package/lib/components/VAutocomplete/VAutocomplete.mjs +16 -35
  42. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  43. package/lib/components/VAutocomplete/VAutocomplete.sass +11 -1
  44. package/lib/components/VAutocomplete/_variables.scss +1 -0
  45. package/lib/components/VAutocomplete/index.d.ts +267 -376
  46. package/lib/components/VAutocomplete/index.mjs.map +1 -1
  47. package/lib/components/VAvatar/VAvatar.mjs +3 -7
  48. package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
  49. package/lib/components/VAvatar/index.d.ts +5 -3
  50. package/lib/components/VAvatar/index.mjs.map +1 -1
  51. package/lib/components/VBadge/VBadge.mjs +2 -6
  52. package/lib/components/VBadge/VBadge.mjs.map +1 -1
  53. package/lib/components/VBadge/index.mjs.map +1 -1
  54. package/lib/components/VBanner/VBanner.mjs +5 -7
  55. package/lib/components/VBanner/VBanner.mjs.map +1 -1
  56. package/lib/components/VBanner/VBannerActions.mjs +0 -4
  57. package/lib/components/VBanner/VBannerActions.mjs.map +1 -1
  58. package/lib/components/VBanner/VBannerText.mjs.map +1 -1
  59. package/lib/components/VBanner/index.d.ts +7 -3
  60. package/lib/components/VBanner/index.mjs.map +1 -1
  61. package/lib/components/VBottomNavigation/VBottomNavigation.mjs +2 -5
  62. package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
  63. package/lib/components/VBottomNavigation/index.d.ts +5 -3
  64. package/lib/components/VBottomNavigation/index.mjs.map +1 -1
  65. package/lib/components/VBottomSheet/VBottomSheet.mjs +5 -5
  66. package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
  67. package/lib/components/VBottomSheet/index.mjs.map +1 -1
  68. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +5 -9
  69. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  70. package/lib/components/VBreadcrumbs/VBreadcrumbsDivider.mjs.map +1 -1
  71. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs +0 -5
  72. package/lib/components/VBreadcrumbs/VBreadcrumbsItem.mjs.map +1 -1
  73. package/lib/components/VBreadcrumbs/index.d.ts +50 -40
  74. package/lib/components/VBreadcrumbs/index.mjs.map +1 -1
  75. package/lib/components/VBtn/VBtn.mjs +2 -10
  76. package/lib/components/VBtn/VBtn.mjs.map +1 -1
  77. package/lib/components/VBtn/index.d.ts +5 -3
  78. package/lib/components/VBtn/index.mjs.map +1 -1
  79. package/lib/components/VBtnGroup/VBtnGroup.mjs +2 -4
  80. package/lib/components/VBtnGroup/VBtnGroup.mjs.map +1 -1
  81. package/lib/components/VBtnGroup/index.d.ts +6 -3
  82. package/lib/components/VBtnGroup/index.mjs.map +1 -1
  83. package/lib/components/VBtnToggle/VBtnToggle.mjs +2 -7
  84. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  85. package/lib/components/VBtnToggle/index.d.ts +20 -25
  86. package/lib/components/VBtnToggle/index.mjs.map +1 -1
  87. package/lib/components/VCalendar/VCalendar.mjs +6 -67
  88. package/lib/components/VCalendar/VCalendar.mjs.map +1 -1
  89. package/lib/components/VCalendar/VCalendarCategory.mjs +7 -18
  90. package/lib/components/VCalendar/VCalendarCategory.mjs.map +1 -1
  91. package/lib/components/VCalendar/VCalendarDaily.mjs +3 -34
  92. package/lib/components/VCalendar/VCalendarDaily.mjs.map +1 -1
  93. package/lib/components/VCalendar/VCalendarMonthly.mjs +3 -7
  94. package/lib/components/VCalendar/VCalendarMonthly.mjs.map +1 -1
  95. package/lib/components/VCalendar/VCalendarWeekly.mjs +3 -32
  96. package/lib/components/VCalendar/VCalendarWeekly.mjs.map +1 -1
  97. package/lib/components/VCalendar/index.mjs.map +1 -1
  98. package/lib/components/VCalendar/mixins/calendar-base.mjs +1 -19
  99. package/lib/components/VCalendar/mixins/calendar-base.mjs.map +1 -1
  100. package/lib/components/VCalendar/mixins/calendar-with-events.mjs +14 -78
  101. package/lib/components/VCalendar/mixins/calendar-with-events.mjs.map +1 -1
  102. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs +0 -30
  103. package/lib/components/VCalendar/mixins/calendar-with-intervals.mjs.map +1 -1
  104. package/lib/components/VCalendar/mixins/mouse.mjs +7 -17
  105. package/lib/components/VCalendar/mixins/mouse.mjs.map +1 -1
  106. package/lib/components/VCalendar/mixins/times.mjs +1 -9
  107. package/lib/components/VCalendar/mixins/times.mjs.map +1 -1
  108. package/lib/components/VCalendar/modes/column.mjs +0 -3
  109. package/lib/components/VCalendar/modes/column.mjs.map +1 -1
  110. package/lib/components/VCalendar/modes/common.mjs +0 -14
  111. package/lib/components/VCalendar/modes/common.mjs.map +1 -1
  112. package/lib/components/VCalendar/modes/index.mjs +0 -1
  113. package/lib/components/VCalendar/modes/index.mjs.map +1 -1
  114. package/lib/components/VCalendar/modes/stack.mjs +3 -45
  115. package/lib/components/VCalendar/modes/stack.mjs.map +1 -1
  116. package/lib/components/VCalendar/util/events.mjs +0 -1
  117. package/lib/components/VCalendar/util/events.mjs.map +1 -1
  118. package/lib/components/VCalendar/util/parser.mjs +3 -4
  119. package/lib/components/VCalendar/util/parser.mjs.map +1 -1
  120. package/lib/components/VCalendar/util/props.mjs +0 -13
  121. package/lib/components/VCalendar/util/props.mjs.map +1 -1
  122. package/lib/components/VCalendar/util/timestamp.mjs +2 -64
  123. package/lib/components/VCalendar/util/timestamp.mjs.map +1 -1
  124. package/lib/components/VCard/VCard.mjs +3 -8
  125. package/lib/components/VCard/VCard.mjs.map +1 -1
  126. package/lib/components/VCard/VCardActions.mjs +0 -4
  127. package/lib/components/VCard/VCardActions.mjs.map +1 -1
  128. package/lib/components/VCard/VCardItem.mjs +0 -5
  129. package/lib/components/VCard/VCardItem.mjs.map +1 -1
  130. package/lib/components/VCard/VCardSubtitle.mjs.map +1 -1
  131. package/lib/components/VCard/VCardText.mjs.map +1 -1
  132. package/lib/components/VCard/VCardTitle.mjs.map +1 -1
  133. package/lib/components/VCard/index.d.ts +13 -6
  134. package/lib/components/VCard/index.mjs.map +1 -1
  135. package/lib/components/VCarousel/VCarousel.mjs +5 -9
  136. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  137. package/lib/components/VCarousel/VCarouselItem.mjs +0 -3
  138. package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
  139. package/lib/components/VCarousel/index.d.ts +1 -0
  140. package/lib/components/VCarousel/index.mjs.map +1 -1
  141. package/lib/components/VCheckbox/VCheckbox.mjs +6 -6
  142. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  143. package/lib/components/VCheckbox/VCheckboxBtn.mjs +7 -15
  144. package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
  145. package/lib/components/VCheckbox/index.d.ts +24 -22
  146. package/lib/components/VCheckbox/index.mjs.map +1 -1
  147. package/lib/components/VChip/VChip.css +25 -0
  148. package/lib/components/VChip/VChip.mjs +2 -10
  149. package/lib/components/VChip/VChip.mjs.map +1 -1
  150. package/lib/components/VChip/VChip.sass +1 -0
  151. package/lib/components/VChip/index.d.ts +5 -3
  152. package/lib/components/VChip/index.mjs.map +1 -1
  153. package/lib/components/VChipGroup/VChipGroup.mjs +5 -6
  154. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  155. package/lib/components/VChipGroup/index.mjs.map +1 -1
  156. package/lib/components/VCode/index.d.ts +1 -0
  157. package/lib/components/VCode/index.mjs.map +1 -1
  158. package/lib/components/VColorPicker/VColorPicker.mjs +9 -12
  159. package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
  160. package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -20
  161. package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
  162. package/lib/components/VColorPicker/VColorPickerEdit.mjs +6 -10
  163. package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
  164. package/lib/components/VColorPicker/VColorPickerPreview.mjs +6 -8
  165. package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
  166. package/lib/components/VColorPicker/VColorPickerSwatches.mjs +2 -6
  167. package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
  168. package/lib/components/VColorPicker/index.mjs.map +1 -1
  169. package/lib/components/VColorPicker/util/index.mjs +24 -26
  170. package/lib/components/VColorPicker/util/index.mjs.map +1 -1
  171. package/lib/components/VCombobox/VCombobox.css +13 -0
  172. package/lib/components/VCombobox/VCombobox.mjs +23 -50
  173. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  174. package/lib/components/VCombobox/VCombobox.sass +5 -0
  175. package/lib/components/VCombobox/_variables.scss +1 -0
  176. package/lib/components/VCombobox/index.d.ts +275 -384
  177. package/lib/components/VCombobox/index.mjs.map +1 -1
  178. package/lib/components/VCounter/VCounter.mjs +2 -5
  179. package/lib/components/VCounter/VCounter.mjs.map +1 -1
  180. package/lib/components/VCounter/index.d.ts +1 -0
  181. package/lib/components/VCounter/index.mjs.map +1 -1
  182. package/lib/components/VData/VData.mjs +9 -67
  183. package/lib/components/VData/VData.mjs.map +1 -1
  184. package/lib/components/VData/index.mjs.map +1 -1
  185. package/lib/components/VDataIterator/VDataFooter.mjs +6 -25
  186. package/lib/components/VDataIterator/VDataFooter.mjs.map +1 -1
  187. package/lib/components/VDataIterator/VDataIterator.mjs +12 -51
  188. package/lib/components/VDataIterator/VDataIterator.mjs.map +1 -1
  189. package/lib/components/VDataIterator/index.mjs.map +1 -1
  190. package/lib/components/VDataTable/MobileRow.mjs +3 -8
  191. package/lib/components/VDataTable/MobileRow.mjs.map +1 -1
  192. package/lib/components/VDataTable/Row.mjs +1 -8
  193. package/lib/components/VDataTable/Row.mjs.map +1 -1
  194. package/lib/components/VDataTable/RowGroup.mjs +1 -7
  195. package/lib/components/VDataTable/RowGroup.mjs.map +1 -1
  196. package/lib/components/VDataTable/VDataTable.mjs +42 -90
  197. package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
  198. package/lib/components/VDataTable/VDataTableHeader.mjs +6 -10
  199. package/lib/components/VDataTable/VDataTableHeader.mjs.map +1 -1
  200. package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs +0 -18
  201. package/lib/components/VDataTable/VDataTableHeaderDesktop.mjs.map +1 -1
  202. package/lib/components/VDataTable/VDataTableHeaderMobile.mjs +0 -9
  203. package/lib/components/VDataTable/VDataTableHeaderMobile.mjs.map +1 -1
  204. package/lib/components/VDataTable/VEditDialog.mjs +3 -17
  205. package/lib/components/VDataTable/VEditDialog.mjs.map +1 -1
  206. package/lib/components/VDataTable/VVirtualTable.mjs +3 -28
  207. package/lib/components/VDataTable/VVirtualTable.mjs.map +1 -1
  208. package/lib/components/VDataTable/index.mjs +0 -1
  209. package/lib/components/VDataTable/index.mjs.map +1 -1
  210. package/lib/components/VDataTable/mixins/header.mjs +0 -5
  211. package/lib/components/VDataTable/mixins/header.mjs.map +1 -1
  212. package/lib/components/VDatePicker/VDatePicker.mjs +2 -69
  213. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  214. package/lib/components/VDatePicker/VDatePickerDateTable.mjs +1 -29
  215. package/lib/components/VDatePicker/VDatePickerDateTable.mjs.map +1 -1
  216. package/lib/components/VDatePicker/VDatePickerHeader.mjs +4 -17
  217. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
  218. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs +1 -12
  219. package/lib/components/VDatePicker/VDatePickerMonthTable.mjs.map +1 -1
  220. package/lib/components/VDatePicker/VDatePickerTitle.mjs +4 -15
  221. package/lib/components/VDatePicker/VDatePickerTitle.mjs.map +1 -1
  222. package/lib/components/VDatePicker/VDatePickerYears.mjs +4 -18
  223. package/lib/components/VDatePicker/VDatePickerYears.mjs.map +1 -1
  224. package/lib/components/VDatePicker/index.mjs.map +1 -1
  225. package/lib/components/VDatePicker/mixins/date-picker-table.mjs +6 -33
  226. package/lib/components/VDatePicker/mixins/date-picker-table.mjs.map +1 -1
  227. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs +0 -5
  228. package/lib/components/VDatePicker/util/createNativeLocaleFormatter.mjs.map +1 -1
  229. package/lib/components/VDatePicker/util/eventHelpers.mjs +2 -3
  230. package/lib/components/VDatePicker/util/eventHelpers.mjs.map +1 -1
  231. package/lib/components/VDatePicker/util/index.mjs +0 -1
  232. package/lib/components/VDatePicker/util/index.mjs.map +1 -1
  233. package/lib/components/VDatePicker/util/isDateAllowed.mjs +1 -1
  234. package/lib/components/VDatePicker/util/isDateAllowed.mjs.map +1 -1
  235. package/lib/components/VDatePicker/util/monthChange.mjs +0 -3
  236. package/lib/components/VDatePicker/util/monthChange.mjs.map +1 -1
  237. package/lib/components/VDatePicker/util/pad.mjs +1 -6
  238. package/lib/components/VDatePicker/util/pad.mjs.map +1 -1
  239. package/lib/components/VDatePicker/util/sanitizeDateString.mjs.map +1 -1
  240. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +2 -4
  241. package/lib/components/VDefaultsProvider/VDefaultsProvider.mjs.map +1 -1
  242. package/lib/components/VDefaultsProvider/index.d.ts +1 -0
  243. package/lib/components/VDefaultsProvider/index.mjs.map +1 -1
  244. package/lib/components/VDialog/VDialog.mjs +7 -20
  245. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  246. package/lib/components/VDialog/index.d.ts +1208 -188
  247. package/lib/components/VDialog/index.mjs.map +1 -1
  248. package/lib/components/VDivider/VDivider.mjs +2 -8
  249. package/lib/components/VDivider/VDivider.mjs.map +1 -1
  250. package/lib/components/VDivider/index.d.ts +1 -0
  251. package/lib/components/VDivider/index.mjs.map +1 -1
  252. package/lib/components/VExpansionPanel/VExpansionPanel.mjs +0 -5
  253. package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
  254. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs +2 -6
  255. package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
  256. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +3 -8
  257. package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
  258. package/lib/components/VExpansionPanel/VExpansionPanels.mjs +2 -5
  259. package/lib/components/VExpansionPanel/VExpansionPanels.mjs.map +1 -1
  260. package/lib/components/VExpansionPanel/index.mjs.map +1 -1
  261. package/lib/components/VField/VField.css +1 -1
  262. package/lib/components/VField/VField.mjs +4 -11
  263. package/lib/components/VField/VField.mjs.map +1 -1
  264. package/lib/components/VField/VField.sass +0 -1
  265. package/lib/components/VField/VFieldLabel.mjs +0 -3
  266. package/lib/components/VField/VFieldLabel.mjs.map +1 -1
  267. package/lib/components/VField/index.d.ts +33 -59
  268. package/lib/components/VField/index.mjs.map +1 -1
  269. package/lib/components/VFileInput/VFileInput.css +16 -0
  270. package/lib/components/VFileInput/VFileInput.mjs +6 -20
  271. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  272. package/lib/components/VFileInput/VFileInput.sass +10 -0
  273. package/lib/components/VFileInput/_variables.scss +2 -0
  274. package/lib/components/VFileInput/index.d.ts +233 -5
  275. package/lib/components/VFileInput/index.mjs.map +1 -1
  276. package/lib/components/VFooter/VFooter.mjs +2 -4
  277. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  278. package/lib/components/VFooter/index.d.ts +1 -0
  279. package/lib/components/VFooter/index.mjs.map +1 -1
  280. package/lib/components/VForm/VForm.mjs +2 -13
  281. package/lib/components/VForm/VForm.mjs.map +1 -1
  282. package/lib/components/VForm/index.d.ts +1 -1
  283. package/lib/components/VForm/index.mjs.map +1 -1
  284. package/lib/components/VGrid/VCol.mjs +8 -23
  285. package/lib/components/VGrid/VCol.mjs.map +1 -1
  286. package/lib/components/VGrid/VContainer.mjs +2 -4
  287. package/lib/components/VGrid/VContainer.mjs.map +1 -1
  288. package/lib/components/VGrid/VRow.mjs +6 -24
  289. package/lib/components/VGrid/VRow.mjs.map +1 -1
  290. package/lib/components/VGrid/VSpacer.mjs.map +1 -1
  291. package/lib/components/VGrid/index.d.ts +2 -0
  292. package/lib/components/VGrid/index.mjs.map +1 -1
  293. package/lib/components/VHover/VHover.mjs +0 -4
  294. package/lib/components/VHover/VHover.mjs.map +1 -1
  295. package/lib/components/VHover/index.d.ts +1 -0
  296. package/lib/components/VHover/index.mjs.map +1 -1
  297. package/lib/components/VIcon/VIcon.mjs +2 -8
  298. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  299. package/lib/components/VIcon/index.d.ts +1 -0
  300. package/lib/components/VIcon/index.mjs.map +1 -1
  301. package/lib/components/VImg/VImg.mjs +9 -35
  302. package/lib/components/VImg/VImg.mjs.map +1 -1
  303. package/lib/components/VImg/index.d.ts +8 -4
  304. package/lib/components/VImg/index.mjs.map +1 -1
  305. package/lib/components/VInput/InputIcon.mjs +0 -2
  306. package/lib/components/VInput/InputIcon.mjs.map +1 -1
  307. package/lib/components/VInput/VInput.mjs +5 -9
  308. package/lib/components/VInput/VInput.mjs.map +1 -1
  309. package/lib/components/VInput/index.d.ts +29 -45
  310. package/lib/components/VInput/index.mjs.map +1 -1
  311. package/lib/components/VItemGroup/VItem.mjs +0 -5
  312. package/lib/components/VItemGroup/VItem.mjs.map +1 -1
  313. package/lib/components/VItemGroup/VItemGroup.mjs +4 -6
  314. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  315. package/lib/components/VItemGroup/index.d.ts +19 -25
  316. package/lib/components/VItemGroup/index.mjs.map +1 -1
  317. package/lib/components/VKbd/index.d.ts +1 -0
  318. package/lib/components/VKbd/index.mjs.map +1 -1
  319. package/lib/components/VLabel/VLabel.mjs +2 -5
  320. package/lib/components/VLabel/VLabel.mjs.map +1 -1
  321. package/lib/components/VLabel/index.mjs.map +1 -1
  322. package/lib/components/VLayout/VLayout.mjs +2 -5
  323. package/lib/components/VLayout/VLayout.mjs.map +1 -1
  324. package/lib/components/VLayout/VLayoutItem.mjs +2 -6
  325. package/lib/components/VLayout/VLayoutItem.mjs.map +1 -1
  326. package/lib/components/VLayout/index.d.ts +5 -2
  327. package/lib/components/VLayout/index.mjs.map +1 -1
  328. package/lib/components/VLazy/VLazy.mjs +0 -8
  329. package/lib/components/VLazy/VLazy.mjs.map +1 -1
  330. package/lib/components/VLazy/index.d.ts +1 -0
  331. package/lib/components/VLazy/index.mjs.map +1 -1
  332. package/lib/components/VList/VList.mjs +2 -11
  333. package/lib/components/VList/VList.mjs.map +1 -1
  334. package/lib/components/VList/VListChildren.mjs +12 -21
  335. package/lib/components/VList/VListChildren.mjs.map +1 -1
  336. package/lib/components/VList/VListGroup.mjs +1 -12
  337. package/lib/components/VList/VListGroup.mjs.map +1 -1
  338. package/lib/components/VList/VListImg.mjs.map +1 -1
  339. package/lib/components/VList/VListItem.mjs +2 -12
  340. package/lib/components/VList/VListItem.mjs.map +1 -1
  341. package/lib/components/VList/VListItemAction.mjs +0 -3
  342. package/lib/components/VList/VListItemAction.mjs.map +1 -1
  343. package/lib/components/VList/VListItemMedia.mjs +0 -3
  344. package/lib/components/VList/VListItemMedia.mjs.map +1 -1
  345. package/lib/components/VList/VListItemSubtitle.mjs.map +1 -1
  346. package/lib/components/VList/VListItemTitle.mjs.map +1 -1
  347. package/lib/components/VList/VListSubheader.mjs +0 -4
  348. package/lib/components/VList/VListSubheader.mjs.map +1 -1
  349. package/lib/components/VList/index.d.ts +147 -170
  350. package/lib/components/VList/index.mjs.map +1 -1
  351. package/lib/components/VList/list.mjs +5 -2
  352. package/lib/components/VList/list.mjs.map +1 -1
  353. package/lib/components/VLocaleProvider/VLocaleProvider.mjs +4 -9
  354. package/lib/components/VLocaleProvider/VLocaleProvider.mjs.map +1 -1
  355. package/lib/components/VLocaleProvider/index.d.ts +1 -0
  356. package/lib/components/VLocaleProvider/index.mjs.map +1 -1
  357. package/lib/components/VMain/VMain.mjs +2 -5
  358. package/lib/components/VMain/VMain.mjs.map +1 -1
  359. package/lib/components/VMain/index.d.ts +1 -0
  360. package/lib/components/VMain/index.mjs.map +1 -1
  361. package/lib/components/VMenu/VMenu.mjs +3 -14
  362. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  363. package/lib/components/VMenu/index.d.ts +1203 -183
  364. package/lib/components/VMenu/index.mjs.map +1 -1
  365. package/lib/components/VMenu/shared.mjs.map +1 -1
  366. package/lib/components/VMessages/VMessages.mjs +2 -6
  367. package/lib/components/VMessages/VMessages.mjs.map +1 -1
  368. package/lib/components/VMessages/index.d.ts +1 -0
  369. package/lib/components/VMessages/index.mjs.map +1 -1
  370. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +6 -11
  371. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  372. package/lib/components/VNavigationDrawer/index.mjs.map +1 -1
  373. package/lib/components/VNavigationDrawer/sticky.mjs +0 -4
  374. package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
  375. package/lib/components/VNavigationDrawer/touch.mjs +2 -15
  376. package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
  377. package/lib/components/VNoSsr/VNoSsr.mjs +0 -4
  378. package/lib/components/VNoSsr/VNoSsr.mjs.map +1 -1
  379. package/lib/components/VNoSsr/index.d.ts +1 -0
  380. package/lib/components/VNoSsr/index.mjs.map +1 -1
  381. package/lib/components/VOtpInput/VOtpInput.mjs +7 -58
  382. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  383. package/lib/components/VOtpInput/index.mjs.map +1 -1
  384. package/lib/components/VOverflowBtn/VOverflowBtn.mjs +7 -19
  385. package/lib/components/VOverflowBtn/VOverflowBtn.mjs.map +1 -1
  386. package/lib/components/VOverflowBtn/index.mjs.map +1 -1
  387. package/lib/components/VOverlay/VOverlay.mjs +8 -17
  388. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  389. package/lib/components/VOverlay/index.d.ts +32 -60
  390. package/lib/components/VOverlay/index.mjs.map +1 -1
  391. package/lib/components/VOverlay/locationStrategies.mjs +23 -56
  392. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  393. package/lib/components/VOverlay/requestNewFrame.mjs +1 -2
  394. package/lib/components/VOverlay/requestNewFrame.mjs.map +1 -1
  395. package/lib/components/VOverlay/scrollStrategies.mjs +2 -18
  396. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  397. package/lib/components/VOverlay/useActivator.mjs +6 -32
  398. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  399. package/lib/components/VOverlay/util/point.mjs +3 -4
  400. package/lib/components/VOverlay/util/point.mjs.map +1 -1
  401. package/lib/components/VPagination/VPagination.mjs +11 -23
  402. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  403. package/lib/components/VPagination/index.d.ts +5 -3
  404. package/lib/components/VPagination/index.mjs.map +1 -1
  405. package/lib/components/VParallax/VParallax.mjs +6 -12
  406. package/lib/components/VParallax/VParallax.mjs.map +1 -1
  407. package/lib/components/VParallax/index.mjs.map +1 -1
  408. package/lib/components/VPicker/VPicker.mjs +3 -12
  409. package/lib/components/VPicker/VPicker.mjs.map +1 -1
  410. package/lib/components/VPicker/index.mjs.map +1 -1
  411. package/lib/components/VProgressCircular/VProgressCircular.mjs +2 -5
  412. package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
  413. package/lib/components/VProgressCircular/index.d.ts +1 -0
  414. package/lib/components/VProgressCircular/index.mjs.map +1 -1
  415. package/lib/components/VProgressLinear/VProgressLinear.mjs +5 -8
  416. package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
  417. package/lib/components/VProgressLinear/index.d.ts +1 -0
  418. package/lib/components/VProgressLinear/index.mjs.map +1 -1
  419. package/lib/components/VRadio/VRadio.mjs +2 -4
  420. package/lib/components/VRadio/VRadio.mjs.map +1 -1
  421. package/lib/components/VRadio/index.d.ts +13 -11
  422. package/lib/components/VRadio/index.mjs.map +1 -1
  423. package/lib/components/VRadioGroup/VRadioGroup.mjs +15 -20
  424. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  425. package/lib/components/VRadioGroup/index.d.ts +26 -38
  426. package/lib/components/VRadioGroup/index.mjs.map +1 -1
  427. package/lib/components/VRangeSlider/VRangeSlider.mjs +13 -26
  428. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  429. package/lib/components/VRangeSlider/index.d.ts +5 -3
  430. package/lib/components/VRangeSlider/index.mjs.map +1 -1
  431. package/lib/components/VRating/VRating.mjs +4 -22
  432. package/lib/components/VRating/VRating.mjs.map +1 -1
  433. package/lib/components/VRating/index.d.ts +32 -40
  434. package/lib/components/VRating/index.mjs.map +1 -1
  435. package/lib/components/VResponsive/VResponsive.mjs +2 -5
  436. package/lib/components/VResponsive/VResponsive.mjs.map +1 -1
  437. package/lib/components/VResponsive/index.d.ts +1 -0
  438. package/lib/components/VResponsive/index.mjs.map +1 -1
  439. package/lib/components/VSelect/VSelect.css +13 -0
  440. package/lib/components/VSelect/VSelect.mjs +9 -22
  441. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  442. package/lib/components/VSelect/VSelect.sass +6 -0
  443. package/lib/components/VSelect/_variables.scss +1 -0
  444. package/lib/components/VSelect/index.d.ts +4264 -776
  445. package/lib/components/VSelect/index.mjs.map +1 -1
  446. package/lib/components/VSelectionControl/VSelectionControl.mjs +14 -58
  447. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  448. package/lib/components/VSelectionControl/index.d.ts +62 -78
  449. package/lib/components/VSelectionControl/index.mjs.map +1 -1
  450. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +1 -0
  451. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +56 -28
  452. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  453. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.sass +1 -0
  454. package/lib/components/VSelectionControlGroup/index.d.ts +53 -4
  455. package/lib/components/VSelectionControlGroup/index.mjs.map +1 -1
  456. package/lib/components/VSheet/VSheet.mjs +2 -4
  457. package/lib/components/VSheet/VSheet.mjs.map +1 -1
  458. package/lib/components/VSheet/index.d.ts +1 -0
  459. package/lib/components/VSheet/index.mjs.map +1 -1
  460. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs +19 -32
  461. package/lib/components/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  462. package/lib/components/VSkeletonLoader/index.mjs.map +1 -1
  463. package/lib/components/VSlideGroup/VSlideGroup.mjs +16 -47
  464. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  465. package/lib/components/VSlideGroup/VSlideGroupItem.mjs +5 -9
  466. package/lib/components/VSlideGroup/VSlideGroupItem.mjs.map +1 -1
  467. package/lib/components/VSlideGroup/helpers.mjs +0 -2
  468. package/lib/components/VSlideGroup/helpers.mjs.map +1 -1
  469. package/lib/components/VSlideGroup/index.d.ts +342 -59
  470. package/lib/components/VSlideGroup/index.mjs.map +1 -1
  471. package/lib/components/VSlider/VSlider.mjs +6 -9
  472. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  473. package/lib/components/VSlider/VSliderThumb.mjs +4 -15
  474. package/lib/components/VSlider/VSliderThumb.mjs.map +1 -1
  475. package/lib/components/VSlider/VSliderTrack.mjs +6 -8
  476. package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
  477. package/lib/components/VSlider/index.d.ts +5 -3
  478. package/lib/components/VSlider/index.mjs.map +1 -1
  479. package/lib/components/VSlider/slider.mjs +6 -27
  480. package/lib/components/VSlider/slider.mjs.map +1 -1
  481. package/lib/components/VSnackbar/VSnackbar.mjs +3 -10
  482. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  483. package/lib/components/VSnackbar/index.d.ts +1215 -191
  484. package/lib/components/VSnackbar/index.mjs.map +1 -1
  485. package/lib/components/VSparkline/VSparkline.mjs +5 -40
  486. package/lib/components/VSparkline/VSparkline.mjs.map +1 -1
  487. package/lib/components/VSparkline/helpers/core.mjs +1 -1
  488. package/lib/components/VSparkline/helpers/core.mjs.map +1 -1
  489. package/lib/components/VSparkline/helpers/math.mjs +2 -3
  490. package/lib/components/VSparkline/helpers/math.mjs.map +1 -1
  491. package/lib/components/VSparkline/helpers/path.mjs +0 -4
  492. package/lib/components/VSparkline/helpers/path.mjs.map +1 -1
  493. package/lib/components/VSparkline/index.mjs.map +1 -1
  494. package/lib/components/VSpeedDial/VSpeedDial.mjs +3 -12
  495. package/lib/components/VSpeedDial/VSpeedDial.mjs.map +1 -1
  496. package/lib/components/VSpeedDial/index.mjs.map +1 -1
  497. package/lib/components/VStepper/VStepper.mjs +5 -24
  498. package/lib/components/VStepper/VStepper.mjs.map +1 -1
  499. package/lib/components/VStepper/VStepperContent.mjs +4 -25
  500. package/lib/components/VStepper/VStepperContent.mjs.map +1 -1
  501. package/lib/components/VStepper/VStepperStep.mjs +0 -24
  502. package/lib/components/VStepper/VStepperStep.mjs.map +1 -1
  503. package/lib/components/VStepper/index.mjs.map +1 -1
  504. package/lib/components/VSwitch/VSwitch.mjs +14 -15
  505. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  506. package/lib/components/VSwitch/index.d.ts +15 -11
  507. package/lib/components/VSwitch/index.mjs.map +1 -1
  508. package/lib/components/VSystemBar/VSystemBar.mjs +2 -4
  509. package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
  510. package/lib/components/VSystemBar/index.d.ts +1 -0
  511. package/lib/components/VSystemBar/index.mjs.map +1 -1
  512. package/lib/components/VTable/VTable.css +3 -3
  513. package/lib/components/VTable/VTable.mjs +5 -6
  514. package/lib/components/VTable/VTable.mjs.map +1 -1
  515. package/lib/components/VTable/VTable.sass +9 -3
  516. package/lib/components/VTable/index.d.ts +8 -3
  517. package/lib/components/VTable/index.mjs.map +1 -1
  518. package/lib/components/VTabs/VTab.mjs +2 -10
  519. package/lib/components/VTabs/VTab.mjs.map +1 -1
  520. package/lib/components/VTabs/VTabs.css +5 -5
  521. package/lib/components/VTabs/VTabs.mjs +12 -17
  522. package/lib/components/VTabs/VTabs.mjs.map +1 -1
  523. package/lib/components/VTabs/VTabs.sass +4 -4
  524. package/lib/components/VTabs/_variables.scss +1 -1
  525. package/lib/components/VTabs/index.d.ts +23 -15
  526. package/lib/components/VTabs/index.mjs.map +1 -1
  527. package/lib/components/VTabs/shared.mjs.map +1 -1
  528. package/lib/components/VTextField/VTextField.mjs +13 -24
  529. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  530. package/lib/components/VTextField/index.d.ts +1375 -191
  531. package/lib/components/VTextField/index.mjs.map +1 -1
  532. package/lib/components/VTextarea/VTextarea.mjs +6 -24
  533. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  534. package/lib/components/VTextarea/index.d.ts +233 -5
  535. package/lib/components/VTextarea/index.mjs.map +1 -1
  536. package/lib/components/VThemeProvider/VThemeProvider.mjs +2 -5
  537. package/lib/components/VThemeProvider/VThemeProvider.mjs.map +1 -1
  538. package/lib/components/VThemeProvider/index.d.ts +1 -0
  539. package/lib/components/VThemeProvider/index.mjs.map +1 -1
  540. package/lib/components/VTimePicker/SelectingTimes.mjs +0 -3
  541. package/lib/components/VTimePicker/SelectingTimes.mjs.map +1 -1
  542. package/lib/components/VTimePicker/VTimePicker.mjs +3 -53
  543. package/lib/components/VTimePicker/VTimePicker.mjs.map +1 -1
  544. package/lib/components/VTimePicker/VTimePickerClock.mjs +6 -42
  545. package/lib/components/VTimePicker/VTimePickerClock.mjs.map +1 -1
  546. package/lib/components/VTimePicker/VTimePickerTitle.mjs +4 -13
  547. package/lib/components/VTimePicker/VTimePickerTitle.mjs.map +1 -1
  548. package/lib/components/VTimePicker/index.mjs.map +1 -1
  549. package/lib/components/VTimeline/VTimeline.mjs +2 -9
  550. package/lib/components/VTimeline/VTimeline.mjs.map +1 -1
  551. package/lib/components/VTimeline/VTimelineDivider.mjs +0 -5
  552. package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
  553. package/lib/components/VTimeline/VTimelineItem.mjs +0 -6
  554. package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
  555. package/lib/components/VTimeline/index.d.ts +7 -3
  556. package/lib/components/VTimeline/index.mjs.map +1 -1
  557. package/lib/components/VToolbar/VToolbar.mjs +2 -8
  558. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  559. package/lib/components/VToolbar/VToolbarItems.mjs +0 -4
  560. package/lib/components/VToolbar/VToolbarItems.mjs.map +1 -1
  561. package/lib/components/VToolbar/VToolbarTitle.mjs +0 -5
  562. package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
  563. package/lib/components/VToolbar/index.d.ts +34 -71
  564. package/lib/components/VToolbar/index.mjs.map +1 -1
  565. package/lib/components/VTooltip/VTooltip.mjs +2 -8
  566. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  567. package/lib/components/VTooltip/index.d.ts +1196 -176
  568. package/lib/components/VTooltip/index.mjs.map +1 -1
  569. package/lib/components/VTreeview/VTreeview.mjs +17 -72
  570. package/lib/components/VTreeview/VTreeview.mjs.map +1 -1
  571. package/lib/components/VTreeview/VTreeviewNode.mjs +2 -32
  572. package/lib/components/VTreeview/VTreeviewNode.mjs.map +1 -1
  573. package/lib/components/VTreeview/index.mjs.map +1 -1
  574. package/lib/components/VTreeview/util/filterTreeItems.mjs +0 -6
  575. package/lib/components/VTreeview/util/filterTreeItems.mjs.map +1 -1
  576. package/lib/components/VValidation/VValidation.mjs +2 -5
  577. package/lib/components/VValidation/VValidation.mjs.map +1 -1
  578. package/lib/components/VValidation/index.d.ts +1 -0
  579. package/lib/components/VValidation/index.mjs.map +1 -1
  580. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +3 -18
  581. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  582. package/lib/components/VVirtualScroll/index.mjs.map +1 -1
  583. package/lib/components/VWindow/VWindow.mjs +5 -15
  584. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  585. package/lib/components/VWindow/VWindowItem.mjs +8 -21
  586. package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
  587. package/lib/components/VWindow/index.d.ts +37 -87
  588. package/lib/components/VWindow/index.mjs.map +1 -1
  589. package/lib/components/index.d.ts +16084 -6799
  590. package/lib/components/index.mjs +0 -11
  591. package/lib/components/index.mjs.map +1 -1
  592. package/lib/components/transitions/createTransition.mjs +0 -10
  593. package/lib/components/transitions/createTransition.mjs.map +1 -1
  594. package/lib/components/transitions/dialog-transition.mjs +3 -18
  595. package/lib/components/transitions/dialog-transition.mjs.map +1 -1
  596. package/lib/components/transitions/expand-transition.mjs +2 -11
  597. package/lib/components/transitions/expand-transition.mjs.map +1 -1
  598. package/lib/components/transitions/index.d.ts +16 -0
  599. package/lib/components/transitions/index.mjs +5 -4
  600. package/lib/components/transitions/index.mjs.map +1 -1
  601. package/lib/composables/border.mjs +0 -3
  602. package/lib/composables/border.mjs.map +1 -1
  603. package/lib/composables/color.mjs +0 -4
  604. package/lib/composables/color.mjs.map +1 -1
  605. package/lib/composables/defaults.mjs +0 -5
  606. package/lib/composables/defaults.mjs.map +1 -1
  607. package/lib/composables/delay.mjs +0 -3
  608. package/lib/composables/delay.mjs.map +1 -1
  609. package/lib/composables/density.mjs +4 -1
  610. package/lib/composables/density.mjs.map +1 -1
  611. package/lib/composables/dimensions.mjs +0 -1
  612. package/lib/composables/dimensions.mjs.map +1 -1
  613. package/lib/composables/display.mjs +7 -20
  614. package/lib/composables/display.mjs.map +1 -1
  615. package/lib/composables/elevation.mjs +2 -4
  616. package/lib/composables/elevation.mjs.map +1 -1
  617. package/lib/composables/filter.mjs +7 -14
  618. package/lib/composables/filter.mjs.map +1 -1
  619. package/lib/composables/focus.mjs +0 -5
  620. package/lib/composables/focus.mjs.map +1 -1
  621. package/lib/composables/form.mjs +1 -14
  622. package/lib/composables/form.mjs.map +1 -1
  623. package/lib/composables/forwardRefs.mjs +9 -16
  624. package/lib/composables/forwardRefs.mjs.map +1 -1
  625. package/lib/composables/group.mjs +10 -33
  626. package/lib/composables/group.mjs.map +1 -1
  627. package/lib/composables/hydration.mjs +0 -1
  628. package/lib/composables/hydration.mjs.map +1 -1
  629. package/lib/composables/icons.mjs +4 -17
  630. package/lib/composables/icons.mjs.map +1 -1
  631. package/lib/composables/index.mjs +1 -2
  632. package/lib/composables/index.mjs.map +1 -1
  633. package/lib/composables/intersectionObserver.mjs +0 -3
  634. package/lib/composables/intersectionObserver.mjs.map +1 -1
  635. package/lib/composables/items.mjs +3 -15
  636. package/lib/composables/items.mjs.map +1 -1
  637. package/lib/composables/layout.mjs +29 -31
  638. package/lib/composables/layout.mjs.map +1 -1
  639. package/lib/composables/lazy.mjs +2 -3
  640. package/lib/composables/lazy.mjs.map +1 -1
  641. package/lib/composables/loader.mjs +0 -3
  642. package/lib/composables/loader.mjs.map +1 -1
  643. package/lib/composables/locale.mjs +46 -118
  644. package/lib/composables/locale.mjs.map +1 -1
  645. package/lib/composables/location.mjs +1 -8
  646. package/lib/composables/location.mjs.map +1 -1
  647. package/lib/composables/mutationObserver.mjs +3 -1
  648. package/lib/composables/mutationObserver.mjs.map +1 -1
  649. package/lib/composables/nested/nested.mjs +4 -20
  650. package/lib/composables/nested/nested.mjs.map +1 -1
  651. package/lib/composables/nested/openStrategies.mjs +0 -9
  652. package/lib/composables/nested/openStrategies.mjs.map +1 -1
  653. package/lib/composables/nested/selectStrategies.mjs +6 -21
  654. package/lib/composables/nested/selectStrategies.mjs.map +1 -1
  655. package/lib/composables/position.mjs +1 -4
  656. package/lib/composables/position.mjs.map +1 -1
  657. package/lib/composables/proxiedModel.mjs +3 -9
  658. package/lib/composables/proxiedModel.mjs.map +1 -1
  659. package/lib/composables/refs.mjs +0 -2
  660. package/lib/composables/refs.mjs.map +1 -1
  661. package/lib/composables/resizeObserver.mjs +0 -3
  662. package/lib/composables/resizeObserver.mjs.map +1 -1
  663. package/lib/composables/rounded.mjs +0 -3
  664. package/lib/composables/rounded.mjs.map +1 -1
  665. package/lib/composables/router.mjs +3 -11
  666. package/lib/composables/router.mjs.map +1 -1
  667. package/lib/composables/scopeId.mjs.map +1 -1
  668. package/lib/composables/scroll.mjs +3 -9
  669. package/lib/composables/scroll.mjs.map +1 -1
  670. package/lib/composables/selectLink.mjs +3 -2
  671. package/lib/composables/selectLink.mjs.map +1 -1
  672. package/lib/composables/size.mjs +0 -3
  673. package/lib/composables/size.mjs.map +1 -1
  674. package/lib/composables/ssrBoot.mjs +2 -1
  675. package/lib/composables/ssrBoot.mjs.map +1 -1
  676. package/lib/composables/stack.mjs +0 -6
  677. package/lib/composables/stack.mjs.map +1 -1
  678. package/lib/composables/tag.mjs +0 -1
  679. package/lib/composables/tag.mjs.map +1 -1
  680. package/lib/composables/teleport.mjs +0 -4
  681. package/lib/composables/teleport.mjs.map +1 -1
  682. package/lib/composables/theme.mjs +18 -38
  683. package/lib/composables/theme.mjs.map +1 -1
  684. package/lib/composables/toggleScope.mjs +0 -1
  685. package/lib/composables/toggleScope.mjs.map +1 -1
  686. package/lib/composables/touch.mjs +5 -28
  687. package/lib/composables/touch.mjs.map +1 -1
  688. package/lib/composables/transition.mjs +0 -2
  689. package/lib/composables/transition.mjs.map +1 -1
  690. package/lib/composables/validation.mjs +3 -13
  691. package/lib/composables/validation.mjs.map +1 -1
  692. package/lib/composables/variant.mjs +0 -2
  693. package/lib/composables/variant.mjs.map +1 -1
  694. package/lib/directives/click-outside/index.mjs +10 -22
  695. package/lib/directives/click-outside/index.mjs.map +1 -1
  696. package/lib/directives/color/index.mjs +0 -11
  697. package/lib/directives/color/index.mjs.map +1 -1
  698. package/lib/directives/index.d.ts +104 -13
  699. package/lib/directives/index.mjs +0 -1
  700. package/lib/directives/index.mjs.map +1 -1
  701. package/lib/directives/intersect/index.mjs +3 -10
  702. package/lib/directives/intersect/index.mjs.map +1 -1
  703. package/lib/directives/mutate/index.mjs +1 -5
  704. package/lib/directives/mutate/index.mjs.map +1 -1
  705. package/lib/directives/resize/index.mjs +0 -5
  706. package/lib/directives/resize/index.mjs.map +1 -1
  707. package/lib/directives/ripple/index.mjs +11 -63
  708. package/lib/directives/ripple/index.mjs.map +1 -1
  709. package/lib/directives/scroll/index.mjs +0 -4
  710. package/lib/directives/scroll/index.mjs.map +1 -1
  711. package/lib/directives/touch/index.mjs +0 -15
  712. package/lib/directives/touch/index.mjs.map +1 -1
  713. package/lib/entry-bundler.mjs +1 -1
  714. package/lib/entry-bundler.mjs.map +1 -1
  715. package/lib/framework.mjs +24 -22
  716. package/lib/framework.mjs.map +1 -1
  717. package/lib/iconsets/fa-svg.mjs +0 -1
  718. package/lib/iconsets/fa-svg.mjs.map +1 -1
  719. package/lib/iconsets/fa.mjs +0 -1
  720. package/lib/iconsets/fa.mjs.map +1 -1
  721. package/lib/iconsets/fa4.mjs +4 -3
  722. package/lib/iconsets/fa4.mjs.map +1 -1
  723. package/lib/iconsets/md.mjs +4 -3
  724. package/lib/iconsets/md.mjs.map +1 -1
  725. package/lib/iconsets/mdi-svg.mjs +0 -1
  726. package/lib/iconsets/mdi-svg.mjs.map +1 -1
  727. package/lib/iconsets/mdi.mjs +4 -3
  728. package/lib/iconsets/mdi.mjs.map +1 -1
  729. package/lib/index.d.ts +92 -106
  730. package/lib/locale/adapters/vue-i18n.d.ts +10 -16
  731. package/lib/locale/adapters/vue-i18n.mjs +59 -52
  732. package/lib/locale/adapters/vue-i18n.mjs.map +1 -1
  733. package/lib/locale/adapters/vuetify.d.ts +24 -0
  734. package/lib/locale/adapters/vuetify.mjs +97 -0
  735. package/lib/locale/adapters/vuetify.mjs.map +1 -0
  736. package/lib/locale/af.mjs.map +1 -1
  737. package/lib/locale/ar.mjs.map +1 -1
  738. package/lib/locale/az.mjs.map +1 -1
  739. package/lib/locale/bg.mjs.map +1 -1
  740. package/lib/locale/ca.mjs.map +1 -1
  741. package/lib/locale/ckb.mjs.map +1 -1
  742. package/lib/locale/cs.mjs.map +1 -1
  743. package/lib/locale/da.mjs.map +1 -1
  744. package/lib/locale/de.mjs.map +1 -1
  745. package/lib/locale/el.mjs.map +1 -1
  746. package/lib/locale/en.mjs.map +1 -1
  747. package/lib/locale/es.mjs.map +1 -1
  748. package/lib/locale/et.mjs.map +1 -1
  749. package/lib/locale/fa.mjs.map +1 -1
  750. package/lib/locale/fi.mjs.map +1 -1
  751. package/lib/locale/fr.mjs.map +1 -1
  752. package/lib/locale/he.mjs.map +1 -1
  753. package/lib/locale/hr.mjs.map +1 -1
  754. package/lib/locale/hu.mjs.map +1 -1
  755. package/lib/locale/id.mjs.map +1 -1
  756. package/lib/locale/index.d.ts +2 -2
  757. package/lib/locale/index.mjs +1 -1
  758. package/lib/locale/index.mjs.map +1 -1
  759. package/lib/locale/it.mjs.map +1 -1
  760. package/lib/locale/ja.mjs.map +1 -1
  761. package/lib/locale/ko.mjs.map +1 -1
  762. package/lib/locale/lt.mjs.map +1 -1
  763. package/lib/locale/lv.mjs.map +1 -1
  764. package/lib/locale/nl.mjs.map +1 -1
  765. package/lib/locale/no.mjs.map +1 -1
  766. package/lib/locale/pl.mjs +7 -7
  767. package/lib/locale/pl.mjs.map +1 -1
  768. package/lib/locale/pt.mjs.map +1 -1
  769. package/lib/locale/ro.mjs.map +1 -1
  770. package/lib/locale/ru.mjs.map +1 -1
  771. package/lib/locale/sk.mjs.map +1 -1
  772. package/lib/locale/sl.mjs.map +1 -1
  773. package/lib/locale/sr-Cyrl.mjs.map +1 -1
  774. package/lib/locale/sr-Latn.mjs.map +1 -1
  775. package/lib/locale/sv.mjs.map +1 -1
  776. package/lib/locale/th.mjs.map +1 -1
  777. package/lib/locale/tr.mjs.map +1 -1
  778. package/lib/locale/uk.mjs.map +1 -1
  779. package/lib/locale/vi.mjs.map +1 -1
  780. package/lib/locale/zh-Hans.mjs.map +1 -1
  781. package/lib/locale/zh-Hant.mjs.map +1 -1
  782. package/lib/services/goto/easing-patterns.mjs +24 -24
  783. package/lib/services/goto/easing-patterns.mjs.map +1 -1
  784. package/lib/services/goto/index.mjs +11 -15
  785. package/lib/services/goto/index.mjs.map +1 -1
  786. package/lib/services/goto/util.mjs +1 -8
  787. package/lib/services/goto/util.mjs.map +1 -1
  788. package/lib/styles/main.css +4 -0
  789. package/lib/styles/settings/_utilities.scss +7 -0
  790. package/lib/util/anchor.mjs +0 -3
  791. package/lib/util/anchor.mjs.map +1 -1
  792. package/lib/util/animation.mjs +0 -6
  793. package/lib/util/animation.mjs.map +1 -1
  794. package/lib/util/box.mjs +0 -5
  795. package/lib/util/box.mjs.map +1 -1
  796. package/lib/util/color/APCA.mjs +23 -21
  797. package/lib/util/color/APCA.mjs.map +1 -1
  798. package/lib/util/color/transformCIELAB.mjs +0 -2
  799. package/lib/util/color/transformCIELAB.mjs.map +1 -1
  800. package/lib/util/color/transformSRGB.mjs +14 -12
  801. package/lib/util/color/transformSRGB.mjs.map +1 -1
  802. package/lib/util/colorUtils.mjs +8 -25
  803. package/lib/util/colorUtils.mjs.map +1 -1
  804. package/lib/util/colors.mjs.map +1 -1
  805. package/lib/util/console.mjs +5 -14
  806. package/lib/util/console.mjs.map +1 -1
  807. package/lib/util/createSimpleFunctional.mjs +0 -3
  808. package/lib/util/createSimpleFunctional.mjs.map +1 -1
  809. package/lib/util/dateTimeUtils.mjs +0 -10
  810. package/lib/util/dateTimeUtils.mjs.map +1 -1
  811. package/lib/util/defineComponent.mjs +6 -22
  812. package/lib/util/defineComponent.mjs.map +1 -1
  813. package/lib/util/dom.mjs +4 -4
  814. package/lib/util/dom.mjs.map +1 -1
  815. package/lib/util/easing.mjs +0 -1
  816. package/lib/util/easing.mjs.map +1 -1
  817. package/lib/util/getCurrentInstance.mjs +1 -7
  818. package/lib/util/getCurrentInstance.mjs.map +1 -1
  819. package/lib/util/getScrollParent.mjs +0 -3
  820. package/lib/util/getScrollParent.mjs.map +1 -1
  821. package/lib/util/globals.mjs.map +1 -1
  822. package/lib/util/helpers.mjs +18 -75
  823. package/lib/util/helpers.mjs.map +1 -1
  824. package/lib/util/injectSelf.mjs +0 -1
  825. package/lib/util/injectSelf.mjs.map +1 -1
  826. package/lib/util/isFixedPosition.mjs +0 -2
  827. package/lib/util/isFixedPosition.mjs.map +1 -1
  828. package/lib/util/propsFactory.mjs +11 -5
  829. package/lib/util/propsFactory.mjs.map +1 -1
  830. package/lib/util/useRender.mjs +0 -1
  831. package/lib/util/useRender.mjs.map +1 -1
  832. package/package.json +6 -10
  833. package/dist/json/attributes.json +0 -5602
  834. package/dist/json/tags.json +0 -1945
  835. package/dist/json/web-types.json +0 -19006
  836. package/lib/composables/rtl.mjs +0 -42
  837. package/lib/composables/rtl.mjs.map +0 -1
  838. package/lib/locale/adapters/vue-intl.d.ts +0 -42
  839. package/lib/locale/adapters/vue-intl.mjs +0 -65
  840. package/lib/locale/adapters/vue-intl.mjs.map +0 -1
@@ -1,25 +1,20 @@
1
1
  // @ts-nocheck
2
-
3
2
  /* eslint-disable */
3
+
4
4
  // Return target's cumulative offset from the top
5
5
  export function getOffset(target) {
6
6
  if (typeof target === 'number') {
7
7
  return target;
8
8
  }
9
-
10
9
  let el = $(target);
11
-
12
10
  if (!el) {
13
11
  throw typeof target === 'string' ? new Error(`Target element "${target}" not found.`) : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`);
14
12
  }
15
-
16
13
  let totalOffset = 0;
17
-
18
14
  while (el) {
19
15
  totalOffset += el.offsetTop;
20
16
  el = el.offsetParent;
21
17
  }
22
-
23
18
  return totalOffset;
24
19
  }
25
20
  export function getContainer(container) {
@@ -27,11 +22,9 @@ export function getContainer(container) {
27
22
  if (el) return el;
28
23
  throw typeof container === 'string' ? new Error(`Container element "${container}" not found.`) : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`);
29
24
  }
30
-
31
25
  function type(el) {
32
26
  return el == null ? el : el.constructor.name;
33
27
  }
34
-
35
28
  function $(el) {
36
29
  if (typeof el === 'string') {
37
30
  return document.querySelector(el);
@@ -1 +1 @@
1
- {"version":3,"file":"util.mjs","names":["getOffset","target","el","$","Error","TypeError","type","totalOffset","offsetTop","offsetParent","getContainer","container","constructor","name","document","querySelector","_isVue","$el","HTMLElement"],"sources":["../../../src/services/goto/util.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el._isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"mappings":"AAAA;;AACA;AAIA;AACA,OAAO,SAASA,SAAT,CAAoBC,MAApB,EAAyC;EAC9C,IAAI,OAAOA,MAAP,KAAkB,QAAtB,EAAgC;IAC9B,OAAOA,MAAP;EACD;;EAED,IAAIC,EAAE,GAAGC,CAAC,CAACF,MAAD,CAAV;;EACA,IAAI,CAACC,EAAL,EAAS;IACP,MAAM,OAAOD,MAAP,KAAkB,QAAlB,GACF,IAAIG,KAAJ,CAAW,mBAAkBH,MAAO,cAApC,CADE,GAEF,IAAII,SAAJ,CAAe,uEAAsEC,IAAI,CAACL,MAAD,CAAS,WAAlG,CAFJ;EAGD;;EAED,IAAIM,WAAW,GAAG,CAAlB;;EACA,OAAOL,EAAP,EAAW;IACTK,WAAW,IAAIL,EAAE,CAACM,SAAlB;IACAN,EAAE,GAAGA,EAAE,CAACO,YAAR;EACD;;EAED,OAAOF,WAAP;AACD;AAED,OAAO,SAASG,YAAT,CAAuBC,SAAvB,EAAoD;EACzD,MAAMT,EAAE,GAAGC,CAAC,CAACQ,SAAD,CAAZ;EAEA,IAAIT,EAAJ,EAAQ,OAAOA,EAAP;EAER,MAAM,OAAOS,SAAP,KAAqB,QAArB,GACF,IAAIP,KAAJ,CAAW,sBAAqBO,SAAU,cAA1C,CADE,GAEF,IAAIN,SAAJ,CAAe,mEAAkEC,IAAI,CAACK,SAAD,CAAY,WAAjG,CAFJ;AAGD;;AAED,SAASL,IAAT,CAAeJ,EAAf,EAAwB;EACtB,OAAOA,EAAE,IAAI,IAAN,GAAaA,EAAb,GAAkBA,EAAE,CAACU,WAAH,CAAeC,IAAxC;AACD;;AAED,SAASV,CAAT,CAAYD,EAAZ,EAAyC;EACvC,IAAI,OAAOA,EAAP,KAAc,QAAlB,EAA4B;IAC1B,OAAOY,QAAQ,CAACC,aAAT,CAAoCb,EAApC,CAAP;EACD,CAFD,MAEO,IAAIA,EAAE,IAAIA,EAAE,CAACc,MAAb,EAAqB;IAC1B,OAAQd,EAAD,CAAYe,GAAnB;EACD,CAFM,MAEA,IAAIf,EAAE,YAAYgB,WAAlB,EAA+B;IACpC,OAAOhB,EAAP;EACD,CAFM,MAEA;IACL,OAAO,IAAP;EACD;AACF"}
1
+ {"version":3,"file":"util.mjs","names":["getOffset","target","el","$","Error","TypeError","type","totalOffset","offsetTop","offsetParent","getContainer","container","constructor","name","document","querySelector","_isVue","$el","HTMLElement"],"sources":["../../../src/services/goto/util.ts"],"sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\nimport Vue from 'vue'\n\n// Return target's cumulative offset from the top\nexport function getOffset (target: any): number {\n if (typeof target === 'number') {\n return target\n }\n\n let el = $(target)\n if (!el) {\n throw typeof target === 'string'\n ? new Error(`Target element \"${target}\" not found.`)\n : new TypeError(`Target must be a Number/Selector/HTMLElement/VueComponent, received ${type(target)} instead.`)\n }\n\n let totalOffset = 0\n while (el) {\n totalOffset += el.offsetTop\n el = el.offsetParent as HTMLElement\n }\n\n return totalOffset\n}\n\nexport function getContainer (container: any): HTMLElement {\n const el = $(container)\n\n if (el) return el\n\n throw typeof container === 'string'\n ? new Error(`Container element \"${container}\" not found.`)\n : new TypeError(`Container must be a Selector/HTMLElement/VueComponent, received ${type(container)} instead.`)\n}\n\nfunction type (el: any) {\n return el == null ? el : el.constructor.name\n}\n\nfunction $ (el: any): HTMLElement | null {\n if (typeof el === 'string') {\n return document.querySelector<HTMLElement>(el)\n } else if (el && el._isVue) {\n return (el as Vue).$el as HTMLElement\n } else if (el instanceof HTMLElement) {\n return el\n } else {\n return null\n }\n}\n"],"mappings":"AAAA;AACA;;AAIA;AACA,OAAO,SAASA,SAAS,CAAEC,MAAW,EAAU;EAC9C,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC9B,OAAOA,MAAM;EACf;EAEA,IAAIC,EAAE,GAAGC,CAAC,CAACF,MAAM,CAAC;EAClB,IAAI,CAACC,EAAE,EAAE;IACP,MAAM,OAAOD,MAAM,KAAK,QAAQ,GAC5B,IAAIG,KAAK,CAAE,mBAAkBH,MAAO,cAAa,CAAC,GAClD,IAAII,SAAS,CAAE,uEAAsEC,IAAI,CAACL,MAAM,CAAE,WAAU,CAAC;EACnH;EAEA,IAAIM,WAAW,GAAG,CAAC;EACnB,OAAOL,EAAE,EAAE;IACTK,WAAW,IAAIL,EAAE,CAACM,SAAS;IAC3BN,EAAE,GAAGA,EAAE,CAACO,YAA2B;EACrC;EAEA,OAAOF,WAAW;AACpB;AAEA,OAAO,SAASG,YAAY,CAAEC,SAAc,EAAe;EACzD,MAAMT,EAAE,GAAGC,CAAC,CAACQ,SAAS,CAAC;EAEvB,IAAIT,EAAE,EAAE,OAAOA,EAAE;EAEjB,MAAM,OAAOS,SAAS,KAAK,QAAQ,GAC/B,IAAIP,KAAK,CAAE,sBAAqBO,SAAU,cAAa,CAAC,GACxD,IAAIN,SAAS,CAAE,mEAAkEC,IAAI,CAACK,SAAS,CAAE,WAAU,CAAC;AAClH;AAEA,SAASL,IAAI,CAAEJ,EAAO,EAAE;EACtB,OAAOA,EAAE,IAAI,IAAI,GAAGA,EAAE,GAAGA,EAAE,CAACU,WAAW,CAACC,IAAI;AAC9C;AAEA,SAASV,CAAC,CAAED,EAAO,EAAsB;EACvC,IAAI,OAAOA,EAAE,KAAK,QAAQ,EAAE;IAC1B,OAAOY,QAAQ,CAACC,aAAa,CAAcb,EAAE,CAAC;EAChD,CAAC,MAAM,IAAIA,EAAE,IAAIA,EAAE,CAACc,MAAM,EAAE;IAC1B,OAAQd,EAAE,CAASe,GAAG;EACxB,CAAC,MAAM,IAAIf,EAAE,YAAYgB,WAAW,EAAE;IACpC,OAAOhB,EAAE;EACX,CAAC,MAAM;IACL,OAAO,IAAI;EACb;AACF"}
@@ -6479,6 +6479,10 @@ html.overflow-y-hidden {
6479
6479
  font-style: italic !important;
6480
6480
  }
6481
6481
 
6482
+ .text-mono {
6483
+ font-family: monospace !important;
6484
+ }
6485
+
6482
6486
  .position-static {
6483
6487
  position: static !important;
6484
6488
  }
@@ -488,6 +488,13 @@ $utilities: () !default;
488
488
  class: font,
489
489
  values: italic
490
490
  ),
491
+ "text-mono": (
492
+ property: font-family,
493
+ class: text,
494
+ values: (
495
+ mono: monospace
496
+ )
497
+ ),
491
498
  // Position
492
499
  "position": (
493
500
  property: position,
@@ -1,15 +1,12 @@
1
1
  import { includes } from "./helpers.mjs";
2
2
  const block = ['top', 'bottom'];
3
3
  const inline = ['start', 'end', 'left', 'right'];
4
-
5
4
  /** Parse a raw anchor string into an object */
6
5
  export function parseAnchor(anchor, isRtl) {
7
6
  let [side, align] = anchor.split(' ');
8
-
9
7
  if (!align) {
10
8
  align = includes(block, side) ? 'start' : includes(inline, side) ? 'top' : 'center';
11
9
  }
12
-
13
10
  return {
14
11
  side: toPhysical(side, isRtl),
15
12
  align: toPhysical(align, isRtl)
@@ -1 +1 @@
1
- {"version":3,"file":"anchor.mjs","names":["includes","block","inline","parseAnchor","anchor","isRtl","side","align","split","toPhysical","str","flipSide","center","top","bottom","left","right","flipAlign","flipCorner","getAxis"],"sources":["../../src/util/anchor.ts"],"sourcesContent":["import { includes } from '@/util/helpers'\n\nconst block = ['top', 'bottom'] as const\nconst inline = ['start', 'end', 'left', 'right'] as const\ntype Tblock = typeof block[number]\ntype Tinline = typeof inline[number]\nexport type Anchor =\n | Tblock\n | Tinline\n | 'center'\n | 'center center'\n | `${Tblock} ${Tinline | 'center'}`\n | `${Tinline} ${Tblock | 'center'}`\nexport type ParsedAnchor =\n | { side: 'center', align: 'center' }\n | { side: Tblock, align: 'left' | 'right' | 'center' }\n | { side: 'left' | 'right', align: Tblock | 'center' }\n\n/** Parse a raw anchor string into an object */\nexport function parseAnchor (anchor: Anchor, isRtl: boolean) {\n let [side, align] = anchor.split(' ') as [Tblock | Tinline | 'center', Tblock | Tinline | 'center' | undefined]\n if (!align) {\n align =\n includes(block, side) ? 'start'\n : includes(inline, side) ? 'top'\n : 'center'\n }\n\n return {\n side: toPhysical(side, isRtl),\n align: toPhysical(align, isRtl),\n } as ParsedAnchor\n}\n\nexport function toPhysical (str: 'center' | Tblock | Tinline, isRtl: boolean) {\n if (str === 'start') return isRtl ? 'right' : 'left'\n if (str === 'end') return isRtl ? 'left' : 'right'\n return str\n}\n\nexport function flipSide (anchor: ParsedAnchor) {\n return {\n side: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.side],\n align: anchor.align,\n } as ParsedAnchor\n}\n\nexport function flipAlign (anchor: ParsedAnchor) {\n return {\n side: anchor.side,\n align: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.align],\n } as ParsedAnchor\n}\n\nexport function flipCorner (anchor: ParsedAnchor) {\n return {\n side: anchor.align,\n align: anchor.side,\n } as ParsedAnchor\n}\n\nexport function getAxis (anchor: ParsedAnchor) {\n return includes(block, anchor.side) ? 'y' : 'x'\n}\n"],"mappings":"SAASA,Q;AAET,MAAMC,KAAK,GAAG,CAAC,KAAD,EAAQ,QAAR,CAAd;AACA,MAAMC,MAAM,GAAG,CAAC,OAAD,EAAU,KAAV,EAAiB,MAAjB,EAAyB,OAAzB,CAAf;;AAeA;AACA,OAAO,SAASC,WAAT,CAAsBC,MAAtB,EAAsCC,KAAtC,EAAsD;EAC3D,IAAI,CAACC,IAAD,EAAOC,KAAP,IAAgBH,MAAM,CAACI,KAAP,CAAa,GAAb,CAApB;;EACA,IAAI,CAACD,KAAL,EAAY;IACVA,KAAK,GACHP,QAAQ,CAACC,KAAD,EAAQK,IAAR,CAAR,GAAwB,OAAxB,GACEN,QAAQ,CAACE,MAAD,EAASI,IAAT,CAAR,GAAyB,KAAzB,GACA,QAHJ;EAID;;EAED,OAAO;IACLA,IAAI,EAAEG,UAAU,CAACH,IAAD,EAAOD,KAAP,CADX;IAELE,KAAK,EAAEE,UAAU,CAACF,KAAD,EAAQF,KAAR;EAFZ,CAAP;AAID;AAED,OAAO,SAASI,UAAT,CAAqBC,GAArB,EAAuDL,KAAvD,EAAuE;EAC5E,IAAIK,GAAG,KAAK,OAAZ,EAAqB,OAAOL,KAAK,GAAG,OAAH,GAAa,MAAzB;EACrB,IAAIK,GAAG,KAAK,KAAZ,EAAmB,OAAOL,KAAK,GAAG,MAAH,GAAY,OAAxB;EACnB,OAAOK,GAAP;AACD;AAED,OAAO,SAASC,QAAT,CAAmBP,MAAnB,EAAyC;EAC9C,OAAO;IACLE,IAAI,EAAE;MACJM,MAAM,EAAE,QADJ;MAEJC,GAAG,EAAE,QAFD;MAGJC,MAAM,EAAE,KAHJ;MAIJC,IAAI,EAAE,OAJF;MAKJC,KAAK,EAAE;IALH,EAMJZ,MAAM,CAACE,IANH,CADD;IAQLC,KAAK,EAAEH,MAAM,CAACG;EART,CAAP;AAUD;AAED,OAAO,SAASU,SAAT,CAAoBb,MAApB,EAA0C;EAC/C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACE,IADR;IAELC,KAAK,EAAE;MACLK,MAAM,EAAE,QADH;MAELC,GAAG,EAAE,QAFA;MAGLC,MAAM,EAAE,KAHH;MAILC,IAAI,EAAE,OAJD;MAKLC,KAAK,EAAE;IALF,EAMLZ,MAAM,CAACG,KANF;EAFF,CAAP;AAUD;AAED,OAAO,SAASW,UAAT,CAAqBd,MAArB,EAA2C;EAChD,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACG,KADR;IAELA,KAAK,EAAEH,MAAM,CAACE;EAFT,CAAP;AAID;AAED,OAAO,SAASa,OAAT,CAAkBf,MAAlB,EAAwC;EAC7C,OAAOJ,QAAQ,CAACC,KAAD,EAAQG,MAAM,CAACE,IAAf,CAAR,GAA+B,GAA/B,GAAqC,GAA5C;AACD"}
1
+ {"version":3,"file":"anchor.mjs","names":["includes","block","inline","parseAnchor","anchor","isRtl","side","align","split","toPhysical","str","flipSide","center","top","bottom","left","right","flipAlign","flipCorner","getAxis"],"sources":["../../src/util/anchor.ts"],"sourcesContent":["import { includes } from '@/util/helpers'\n\nconst block = ['top', 'bottom'] as const\nconst inline = ['start', 'end', 'left', 'right'] as const\ntype Tblock = typeof block[number]\ntype Tinline = typeof inline[number]\nexport type Anchor =\n | Tblock\n | Tinline\n | 'center'\n | 'center center'\n | `${Tblock} ${Tinline | 'center'}`\n | `${Tinline} ${Tblock | 'center'}`\nexport type ParsedAnchor =\n | { side: 'center', align: 'center' }\n | { side: Tblock, align: 'left' | 'right' | 'center' }\n | { side: 'left' | 'right', align: Tblock | 'center' }\n\n/** Parse a raw anchor string into an object */\nexport function parseAnchor (anchor: Anchor, isRtl: boolean) {\n let [side, align] = anchor.split(' ') as [Tblock | Tinline | 'center', Tblock | Tinline | 'center' | undefined]\n if (!align) {\n align =\n includes(block, side) ? 'start'\n : includes(inline, side) ? 'top'\n : 'center'\n }\n\n return {\n side: toPhysical(side, isRtl),\n align: toPhysical(align, isRtl),\n } as ParsedAnchor\n}\n\nexport function toPhysical (str: 'center' | Tblock | Tinline, isRtl: boolean) {\n if (str === 'start') return isRtl ? 'right' : 'left'\n if (str === 'end') return isRtl ? 'left' : 'right'\n return str\n}\n\nexport function flipSide (anchor: ParsedAnchor) {\n return {\n side: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.side],\n align: anchor.align,\n } as ParsedAnchor\n}\n\nexport function flipAlign (anchor: ParsedAnchor) {\n return {\n side: anchor.side,\n align: {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n }[anchor.align],\n } as ParsedAnchor\n}\n\nexport function flipCorner (anchor: ParsedAnchor) {\n return {\n side: anchor.align,\n align: anchor.side,\n } as ParsedAnchor\n}\n\nexport function getAxis (anchor: ParsedAnchor) {\n return includes(block, anchor.side) ? 'y' : 'x'\n}\n"],"mappings":"SAASA,QAAQ;AAEjB,MAAMC,KAAK,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU;AACxC,MAAMC,MAAM,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAU;AAezD;AACA,OAAO,SAASC,WAAW,CAAEC,MAAc,EAAEC,KAAc,EAAE;EAC3D,IAAI,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAGH,MAAM,CAACI,KAAK,CAAC,GAAG,CAA2E;EAC/G,IAAI,CAACD,KAAK,EAAE;IACVA,KAAK,GACHP,QAAQ,CAACC,KAAK,EAAEK,IAAI,CAAC,GAAG,OAAO,GAC7BN,QAAQ,CAACE,MAAM,EAAEI,IAAI,CAAC,GAAG,KAAK,GAC9B,QAAQ;EACd;EAEA,OAAO;IACLA,IAAI,EAAEG,UAAU,CAACH,IAAI,EAAED,KAAK,CAAC;IAC7BE,KAAK,EAAEE,UAAU,CAACF,KAAK,EAAEF,KAAK;EAChC,CAAC;AACH;AAEA,OAAO,SAASI,UAAU,CAAEC,GAAgC,EAAEL,KAAc,EAAE;EAC5E,IAAIK,GAAG,KAAK,OAAO,EAAE,OAAOL,KAAK,GAAG,OAAO,GAAG,MAAM;EACpD,IAAIK,GAAG,KAAK,KAAK,EAAE,OAAOL,KAAK,GAAG,MAAM,GAAG,OAAO;EAClD,OAAOK,GAAG;AACZ;AAEA,OAAO,SAASC,QAAQ,CAAEP,MAAoB,EAAE;EAC9C,OAAO;IACLE,IAAI,EAAE;MACJM,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACE,IAAI,CAAC;IACdC,KAAK,EAAEH,MAAM,CAACG;EAChB,CAAC;AACH;AAEA,OAAO,SAASU,SAAS,CAAEb,MAAoB,EAAE;EAC/C,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACE,IAAI;IACjBC,KAAK,EAAE;MACLK,MAAM,EAAE,QAAQ;MAChBC,GAAG,EAAE,QAAQ;MACbC,MAAM,EAAE,KAAK;MACbC,IAAI,EAAE,OAAO;MACbC,KAAK,EAAE;IACT,CAAC,CAACZ,MAAM,CAACG,KAAK;EAChB,CAAC;AACH;AAEA,OAAO,SAASW,UAAU,CAAEd,MAAoB,EAAE;EAChD,OAAO;IACLE,IAAI,EAAEF,MAAM,CAACG,KAAK;IAClBA,KAAK,EAAEH,MAAM,CAACE;EAChB,CAAC;AACH;AAEA,OAAO,SAASa,OAAO,CAAEf,MAAoB,EAAE;EAC7C,OAAOJ,QAAQ,CAACC,KAAK,EAAEG,MAAM,CAACE,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG;AACjD"}
@@ -1,14 +1,11 @@
1
1
  import { Box } from "./box.mjs";
2
2
  /** @see https://stackoverflow.com/a/57876601/2074736 */
3
-
4
3
  export function nullifyTransforms(el) {
5
4
  const rect = el.getBoundingClientRect();
6
5
  const style = getComputedStyle(el);
7
6
  const tx = style.transform;
8
-
9
7
  if (tx) {
10
8
  let ta, sx, sy, dx, dy;
11
-
12
9
  if (tx.startsWith('matrix3d(')) {
13
10
  ta = tx.slice(9, -1).split(/, /);
14
11
  sx = +ta[0];
@@ -24,7 +21,6 @@ export function nullifyTransforms(el) {
24
21
  } else {
25
22
  return new Box(rect);
26
23
  }
27
-
28
24
  const to = style.transformOrigin;
29
25
  const x = rect.x - dx - (1 - sx) * parseFloat(to);
30
26
  const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1));
@@ -45,7 +41,6 @@ export function animate(el, keyframes, options) {
45
41
  finished: Promise.resolve()
46
42
  };
47
43
  const animation = el.animate(keyframes, options);
48
-
49
44
  if (typeof animation.finished === 'undefined') {
50
45
  animation.finished = new Promise(resolve => {
51
46
  animation.onfinish = () => {
@@ -53,7 +48,6 @@ export function animate(el, keyframes, options) {
53
48
  };
54
49
  });
55
50
  }
56
-
57
51
  return animation;
58
52
  }
59
53
  //# sourceMappingURL=animation.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"animation.mjs","names":["Box","nullifyTransforms","el","rect","getBoundingClientRect","style","getComputedStyle","tx","transform","ta","sx","sy","dx","dy","startsWith","slice","split","to","transformOrigin","x","parseFloat","y","indexOf","w","width","offsetWidth","h","height","offsetHeight","animate","keyframes","options","finished","Promise","resolve","animation","onfinish"],"sources":["../../src/util/animation.ts"],"sourcesContent":["import { Box } from '@/util/box'\n\n/** @see https://stackoverflow.com/a/57876601/2074736 */\nexport function nullifyTransforms (el: HTMLElement): Box {\n const rect = el.getBoundingClientRect()\n const style = getComputedStyle(el)\n const tx = style.transform\n\n if (tx) {\n let ta, sx, sy, dx, dy\n if (tx.startsWith('matrix3d(')) {\n ta = tx.slice(9, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[5]\n dx = +ta[12]\n dy = +ta[13]\n } else if (tx.startsWith('matrix(')) {\n ta = tx.slice(7, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[3]\n dx = +ta[4]\n dy = +ta[5]\n } else {\n return new Box(rect)\n }\n\n const to = style.transformOrigin\n const x = rect.x - dx - (1 - sx) * parseFloat(to)\n const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1))\n const w = sx ? rect.width / sx : el.offsetWidth + 1\n const h = sy ? rect.height / sy : el.offsetHeight + 1\n\n return new Box({ x, y, width: w, height: h })\n } else {\n return new Box(rect)\n }\n}\n\nexport function animate (\n el: Element,\n keyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n options?: number | KeyframeAnimationOptions\n) {\n if (typeof el.animate === 'undefined') return { finished: Promise.resolve() }\n\n const animation = el.animate(keyframes, options)\n if (typeof animation.finished === 'undefined') {\n (animation as any).finished = new Promise(resolve => {\n animation.onfinish = () => {\n resolve(animation)\n }\n })\n }\n\n return animation\n}\n"],"mappings":"SAASA,G;AAET;;AACA,OAAO,SAASC,iBAAT,CAA4BC,EAA5B,EAAkD;EACvD,MAAMC,IAAI,GAAGD,EAAE,CAACE,qBAAH,EAAb;EACA,MAAMC,KAAK,GAAGC,gBAAgB,CAACJ,EAAD,CAA9B;EACA,MAAMK,EAAE,GAAGF,KAAK,CAACG,SAAjB;;EAEA,IAAID,EAAJ,EAAQ;IACN,IAAIE,EAAJ,EAAQC,EAAR,EAAYC,EAAZ,EAAgBC,EAAhB,EAAoBC,EAApB;;IACA,IAAIN,EAAE,CAACO,UAAH,CAAc,WAAd,CAAJ,EAAgC;MAC9BL,EAAE,GAAGF,EAAE,CAACQ,KAAH,CAAS,CAAT,EAAY,CAAC,CAAb,EAAgBC,KAAhB,CAAsB,IAAtB,CAAL;MACAN,EAAE,GAAG,CAACD,EAAE,CAAC,CAAD,CAAR;MACAE,EAAE,GAAG,CAACF,EAAE,CAAC,CAAD,CAAR;MACAG,EAAE,GAAG,CAACH,EAAE,CAAC,EAAD,CAAR;MACAI,EAAE,GAA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EACD;AACF;AAED,OAAO,SAAS0B,OAAT,CACL3B,EADK,EAEL4B,SAFK,EAGLC,OAHK,EAIL;EACA,IAAI,OAAO7B,EAAE,CAAC2B,OAAV,KAAsB,WAA1B,EAAuC,OAAO;IAAEG,QAAQ,EAAEC,OAAO,CAACC,OAAR;EAAZ,CAAP;EAEvC,MAAMC,SAAS,GAAGjC,EAAE,CAAC2B,OAAH,CAAWC,SAAX,EAAsBC,OAAtB,CAAlB;;EACA,IAAI,OAAOI,SAAS,CAACH,QAAjB,KAA8B,WAAlC,EAA+C;IAC5CG,SAAD,CAAmBH,QAAnB,GAA8B,IAAIC,OAAJ,CAAYC,OAAO,IAAI;MACnDC,SAAS,CAACC,QAAV,GAAqB,MAAM;QACzBF,OAAO,CAACC,SAAD,CAAP;MACD,CAFD;IAGD,CAJ6B,CAA9B;EAKD;;EAED,OAAOA,SAAP;AACD"}
1
+ {"version":3,"file":"animation.mjs","names":["Box","nullifyTransforms","el","rect","getBoundingClientRect","style","getComputedStyle","tx","transform","ta","sx","sy","dx","dy","startsWith","slice","split","to","transformOrigin","x","parseFloat","y","indexOf","w","width","offsetWidth","h","height","offsetHeight","animate","keyframes","options","finished","Promise","resolve","animation","onfinish"],"sources":["../../src/util/animation.ts"],"sourcesContent":["import { Box } from '@/util/box'\n\n/** @see https://stackoverflow.com/a/57876601/2074736 */\nexport function nullifyTransforms (el: HTMLElement): Box {\n const rect = el.getBoundingClientRect()\n const style = getComputedStyle(el)\n const tx = style.transform\n\n if (tx) {\n let ta, sx, sy, dx, dy\n if (tx.startsWith('matrix3d(')) {\n ta = tx.slice(9, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[5]\n dx = +ta[12]\n dy = +ta[13]\n } else if (tx.startsWith('matrix(')) {\n ta = tx.slice(7, -1).split(/, /)\n sx = +ta[0]\n sy = +ta[3]\n dx = +ta[4]\n dy = +ta[5]\n } else {\n return new Box(rect)\n }\n\n const to = style.transformOrigin\n const x = rect.x - dx - (1 - sx) * parseFloat(to)\n const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1))\n const w = sx ? rect.width / sx : el.offsetWidth + 1\n const h = sy ? rect.height / sy : el.offsetHeight + 1\n\n return new Box({ x, y, width: w, height: h })\n } else {\n return new Box(rect)\n }\n}\n\nexport function animate (\n el: Element,\n keyframes: Keyframe[] | PropertyIndexedKeyframes | null,\n options?: number | KeyframeAnimationOptions\n) {\n if (typeof el.animate === 'undefined') return { finished: Promise.resolve() }\n\n const animation = el.animate(keyframes, options)\n if (typeof animation.finished === 'undefined') {\n (animation as any).finished = new Promise(resolve => {\n animation.onfinish = () => {\n resolve(animation)\n }\n })\n }\n\n return animation\n}\n"],"mappings":"SAASA,GAAG;AAEZ;AACA,OAAO,SAASC,iBAAiB,CAAEC,EAAe,EAAO;EACvD,MAAMC,IAAI,GAAGD,EAAE,CAACE,qBAAqB,EAAE;EACvC,MAAMC,KAAK,GAAGC,gBAAgB,CAACJ,EAAE,CAAC;EAClC,MAAMK,EAAE,GAAGF,KAAK,CAACG,SAAS;EAE1B,IAAID,EAAE,EAAE;IACN,IAAIE,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,EAAE;IACtB,IAAIN,EAAE,CAACO,UAAU,CAAC,WAAW,CAAC,EAAE;MAC9BL,EAAE,GAAGF,EAAE,CAACQ,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAACC,KAAK,CAAC,IAAI,CAAC;MAChCN,EAAE,GAAG,CAACD,EAAE,CAAC,CAAC,CAAC;MACXE,EAAE,GAAG,CAACF,EAAE,CAAC,CAAC,CAAC;MACXG,EAAE,GAAG,CAACH,EAAE,CAAC,EAAE,CAAC;MACZI,EAAE,GAAG,CAACJ,EAAE,CAAC,EAAE,CAAC;IACd,CAAC,MAAM,IAAIF,EAAE,CAACO,UAAU,CAAC,SAAS,CAAC,EAAE;MACnCL,EAAE,GAAGF,EAAE,CAACQ,KAAK,CAAC,CAAC,EAAE,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;IAAEG,QAAQ,EAAEC,OAAO,CAACC,OAAO;EAAG,CAAC;EAE7E,MAAMC,SAAS,GAAGjC,EAAE,CAAC2B,OAAO,CAACC,SAAS,EAAEC,OAAO,CAAC;EAChD,IAAI,OAAOI,SAAS,CAACH,QAAQ,KAAK,WAAW,EAAE;IAC5CG,SAAS,CAASH,QAAQ,GAAG,IAAIC,OAAO,CAACC,OAAO,IAAI;MACnDC,SAAS,CAACC,QAAQ,GAAG,MAAM;QACzBF,OAAO,CAACC,SAAS,CAAC;MACpB,CAAC;IACH,CAAC,CAAC;EACJ;EAEA,OAAOA,SAAS;AAClB"}
package/lib/util/box.mjs CHANGED
@@ -11,23 +11,18 @@ export class Box {
11
11
  this.width = width;
12
12
  this.height = height;
13
13
  }
14
-
15
14
  get top() {
16
15
  return this.y;
17
16
  }
18
-
19
17
  get bottom() {
20
18
  return this.y + this.height;
21
19
  }
22
-
23
20
  get left() {
24
21
  return this.x;
25
22
  }
26
-
27
23
  get right() {
28
24
  return this.x + this.width;
29
25
  }
30
-
31
26
  }
32
27
  export function getOverflow(a, b) {
33
28
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"box.mjs","names":["Box","constructor","x","y","width","height","top","bottom","left","right","getOverflow","a","b","before","Math","max","after"],"sources":["../../src/util/box.ts"],"sourcesContent":["export class Box {\n x: number\n y: number\n width: number\n height: number\n\n constructor ({ x, y, width, height }: {\n x: number\n y: number\n width: number\n height: number\n }) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n }\n\n get top () { return this.y }\n get bottom () { return this.y + this.height }\n get left () { return this.x }\n get right () { return this.x + this.width }\n}\n\nexport function getOverflow (a: Box, b: Box) {\n return {\n x: {\n before: Math.max(0, b.left - a.left),\n after: Math.max(0, a.right - b.right),\n },\n y: {\n before: Math.max(0, b.top - a.top),\n after: Math.max(0, a.bottom - b.bottom),\n },\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,GAAN,CAAU;EAMfC,WAAW,OAKR;IAAA,IALU;MAAEC,CAAF;MAAKC,CAAL;MAAQC,KAAR;MAAeC;IAAf,CAKV;IACD,KAAKH,CAAL,GAASA,CAAT;IACA,KAAKC,CAAL,GAASA,CAAT;IACA,KAAKC,KAAL,GAAaA,KAAb;IACA,KAAKC,MAAL,GAAcA,MAAd;EACD;;EAEM,IAAHC,GAAG,GAAI;IAAE,OAAO,KAAKH,CAAZ;EAAe;;EAClB,IAANI,MAAM,GAAI;IAAE,OAAO,KAAKJ,CAAL,GAAS,KAAKE,MAArB;EAA6B;;EACrC,IAAJG,IAAI,GAAI;IAAE,OAAO,KAAKN,CAAZ;EAAe;;EACpB,IAALO,KAAK,GAAI;IAAE,OAAO,KAAKP,CAAL,GAAS,KAAKE,KAArB;EAA4B;;AArB5B;AAwBjB,OAAO,SAASM,WAAT,CAAsBC,CAAtB,EAA8BC,CAA9B,EAAsC;EAC3C,OAAO;IACLV,CAAC,EAAE;MACDW,MAAM,EAAEC,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYH,CAAC,CAACJ,IAAF,GAASG,CAAC,CAACH,IAAvB,CADP;MAEDQ,KAAK,EAAEF,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYJ,CAAC,CAACF,KAAF,GAAUG,CAAC,CAACH,KAAxB;IAFN,CADE;IAKLN,CAAC,EAAE;MACDU,MAAM,EAAEC,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYH,CAAC,CAACN,GAAF,GAAQK,CAAC,CAACL,GAAtB,CADP;MAEDU,KAAK,EAAEF,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYJ,CAAC,CAACJ,MAAF,GAAWK,CAAC,CAACL,MAAzB;IAFN;EALE,CAAP;AAUD"}
1
+ {"version":3,"file":"box.mjs","names":["Box","constructor","x","y","width","height","top","bottom","left","right","getOverflow","a","b","before","Math","max","after"],"sources":["../../src/util/box.ts"],"sourcesContent":["export class Box {\n x: number\n y: number\n width: number\n height: number\n\n constructor ({ x, y, width, height }: {\n x: number\n y: number\n width: number\n height: number\n }) {\n this.x = x\n this.y = y\n this.width = width\n this.height = height\n }\n\n get top () { return this.y }\n get bottom () { return this.y + this.height }\n get left () { return this.x }\n get right () { return this.x + this.width }\n}\n\nexport function getOverflow (a: Box, b: Box) {\n return {\n x: {\n before: Math.max(0, b.left - a.left),\n after: Math.max(0, a.right - b.right),\n },\n y: {\n before: Math.max(0, b.top - a.top),\n after: Math.max(0, a.bottom - b.bottom),\n },\n }\n}\n"],"mappings":"AAAA,OAAO,MAAMA,GAAG,CAAC;EAMfC,WAAW,OAKR;IAAA,IALU;MAAEC,CAAC;MAAEC,CAAC;MAAEC,KAAK;MAAEC;IAK5B,CAAC;IACC,IAAI,CAACH,CAAC,GAAGA,CAAC;IACV,IAAI,CAACC,CAAC,GAAGA,CAAC;IACV,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,MAAM,GAAGA,MAAM;EACtB;EAEA,IAAIC,GAAG,GAAI;IAAE,OAAO,IAAI,CAACH,CAAC;EAAC;EAC3B,IAAII,MAAM,GAAI;IAAE,OAAO,IAAI,CAACJ,CAAC,GAAG,IAAI,CAACE,MAAM;EAAC;EAC5C,IAAIG,IAAI,GAAI;IAAE,OAAO,IAAI,CAACN,CAAC;EAAC;EAC5B,IAAIO,KAAK,GAAI;IAAE,OAAO,IAAI,CAACP,CAAC,GAAG,IAAI,CAACE,KAAK;EAAC;AAC5C;AAEA,OAAO,SAASM,WAAW,CAAEC,CAAM,EAAEC,CAAM,EAAE;EAC3C,OAAO;IACLV,CAAC,EAAE;MACDW,MAAM,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,CAAC,CAACJ,IAAI,GAAGG,CAAC,CAACH,IAAI,CAAC;MACpCQ,KAAK,EAAEF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEJ,CAAC,CAACF,KAAK,GAAGG,CAAC,CAACH,KAAK;IACtC,CAAC;IACDN,CAAC,EAAE;MACDU,MAAM,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,CAAC,CAACN,GAAG,GAAGK,CAAC,CAACL,GAAG,CAAC;MAClCU,KAAK,EAAEF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEJ,CAAC,CAACJ,MAAM,GAAGK,CAAC,CAACL,MAAM;IACxC;EACF,CAAC;AACH"}
@@ -3,44 +3,40 @@
3
3
  * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
4
4
  * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup
5
5
  */
6
+
6
7
  // MAGICAL NUMBERS
8
+
7
9
  // sRGB Conversion to Relative Luminance (Y)
10
+
8
11
  // Transfer Curve (aka "Gamma") for sRGB linearization
9
12
  // Simple power curve vs piecewise described in docs
10
13
  // Essentially, 2.4 best models actual display
11
14
  // characteristics in combination with the total method
12
15
  const mainTRC = 2.4;
13
16
  const Rco = 0.2126729; // sRGB Red Coefficient (from matrix)
14
-
15
17
  const Gco = 0.7151522; // sRGB Green Coefficient (from matrix)
16
-
17
18
  const Bco = 0.0721750; // sRGB Blue Coefficient (from matrix)
19
+
18
20
  // For Finding Raw SAPC Contrast from Relative Luminance (Y)
21
+
19
22
  // Constants for SAPC Power Curve Exponents
20
23
  // One pair for normal text, and one for reverse
21
24
  // These are the "beating heart" of SAPC
22
-
23
25
  const normBG = 0.55;
24
26
  const normTXT = 0.58;
25
27
  const revTXT = 0.57;
26
- const revBG = 0.62; // For Clamping and Scaling Values
28
+ const revBG = 0.62;
27
29
 
28
- const blkThrs = 0.03; // Level that triggers the soft black clamp
30
+ // For Clamping and Scaling Values
29
31
 
32
+ const blkThrs = 0.03; // Level that triggers the soft black clamp
30
33
  const blkClmp = 1.45; // Exponent for the soft black clamp curve
31
-
32
34
  const deltaYmin = 0.0005; // Lint trap
33
-
34
35
  const scaleBoW = 1.25; // Scaling for dark text on light
35
-
36
36
  const scaleWoB = 1.25; // Scaling for light text on dark
37
-
38
37
  const loConThresh = 0.078; // Threshold for new simple offset scale
39
-
40
38
  const loConFactor = 12.82051282051282; // = 1/0.078,
41
-
42
39
  const loConOffset = 0.06; // The simple offset
43
-
44
40
  const loClip = 0.001; // Output clip (lint trap #2)
45
41
 
46
42
  export function APCAcontrast(text, background) {
@@ -50,36 +46,42 @@ export function APCAcontrast(text, background) {
50
46
  const Btxt = ((text >> 0 & 0xff) / 255) ** mainTRC;
51
47
  const Rbg = ((background >> 16 & 0xff) / 255) ** mainTRC;
52
48
  const Gbg = ((background >> 8 & 0xff) / 255) ** mainTRC;
53
- const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC; // Apply the standard coefficients and sum to Y
49
+ const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC;
54
50
 
51
+ // Apply the standard coefficients and sum to Y
55
52
  let Ytxt = Rtxt * Rco + Gtxt * Gco + Btxt * Bco;
56
- let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco; // Soft clamp Y when near black.
57
- // Now clamping all colors to prevent crossover errors
53
+ let Ybg = Rbg * Rco + Gbg * Gco + Bbg * Bco;
58
54
 
55
+ // Soft clamp Y when near black.
56
+ // Now clamping all colors to prevent crossover errors
59
57
  if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp;
60
- if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp; // Return 0 Early for extremely low ∆Y (lint trap #1)
58
+ if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp;
61
59
 
62
- if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0; // SAPC CONTRAST
60
+ // Return 0 Early for extremely low ∆Y (lint trap #1)
61
+ if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0;
63
62
 
64
- let outputContrast; // For weighted final values
63
+ // SAPC CONTRAST
65
64
 
65
+ let outputContrast; // For weighted final values
66
66
  if (Ybg > Ytxt) {
67
67
  // For normal polarity, black text on white
68
68
  // Calculate the SAPC contrast value and scale
69
- const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW; // NEW! SAPC SmoothScale™
69
+
70
+ const SAPC = (Ybg ** normBG - Ytxt ** normTXT) * scaleBoW;
71
+
72
+ // NEW! SAPC SmoothScale™
70
73
  // Low Contrast Smooth Scale Rollout to prevent polarity reversal
71
74
  // and also a low clip for very low contrasts (lint trap #2)
72
75
  // much of this is for very low contrasts, less than 10
73
76
  // therefore for most reversing needs, only loConOffset is important
74
-
75
77
  outputContrast = SAPC < loClip ? 0.0 : SAPC < loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC - loConOffset;
76
78
  } else {
77
79
  // For reverse polarity, light text on dark
78
80
  // WoB should always return negative value.
81
+
79
82
  const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
80
83
  outputContrast = SAPC > -loClip ? 0.0 : SAPC > -loConThresh ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
81
84
  }
82
-
83
85
  return outputContrast * 100;
84
86
  }
85
87
  //# sourceMappingURL=APCA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"APCA.mjs","names":["mainTRC","Rco","Gco","Bco","normBG","normTXT","revTXT","revBG","blkThrs","blkClmp","deltaYmin","scaleBoW","scaleWoB","loConThresh","loConFactor","loConOffset","loClip","APCAcontrast","text","background","Rtxt","Gtxt","Btxt","Rbg","Gbg","Bbg","Ytxt","Ybg","Math","abs","outputContrast","SAPC"],"sources":["../../../src/util/color/APCA.ts"],"sourcesContent":["/**\n * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA\n * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup\n */\n\n// MAGICAL NUMBERS\n\n// sRGB Conversion to Relative Luminance (Y)\n\n// Transfer Curve (aka \"Gamma\") for sRGB linearization\n// Simple power curve vs piecewise described in docs\n// Essentially, 2.4 best models actual display\n// characteristics in combination with the total method\nconst mainTRC = 2.4\n\nconst Rco = 0.2126729 // sRGB Red Coefficient (from matrix)\nconst Gco = 0.7151522 // sRGB Green Coefficient (from matrix)\nconst Bco = 0.0721750 // sRGB Blue Coefficient (from matrix)\n\n// For Finding Raw SAPC Contrast from Relative Luminance (Y)\n\n// Constants for SAPC Power Curve Exponents\n// One pair for normal text, and one for reverse\n// These are the \"beating heart\" of SAPC\nconst normBG = 0.55\nconst normTXT = 0.58\nconst revTXT = 0.57\nconst revBG = 0.62\n\n// For Clamping and Scaling Values\n\nconst blkThrs = 0.03 // Level that triggers the soft black clamp\nconst blkClmp = 1.45 // Exponent for the soft black clamp curve\nconst deltaYmin = 0.0005 // Lint trap\nconst scaleBoW = 1.25 // Scaling for dark text on light\nconst scaleWoB = 1.25 // Scaling for light text on dark\nconst loConThresh = 0.078 // Threshold for new simple offset scale\nconst loConFactor = 12.82051282051282 // = 1/0.078,\nconst loConOffset = 0.06 // The simple offset\nconst loClip = 0.001 // Output clip (lint trap #2)\n\nexport function APCAcontrast (text: number, background: number) {\n // Linearize sRGB\n const Rtxt = ((text >> 16 & 0xff) / 255) ** mainTRC\n const Gtxt = ((text >> 8 & 0xff) / 255) ** mainTRC\n const Btxt = ((text >> 0 & 0xff) / 255) ** mainTRC\n\n const Rbg = ((background >> 16 & 0xff) / 255) ** mainTRC\n const Gbg = ((background >> 8 & 0xff) / 255) ** mainTRC\n const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC\n\n // Apply the standard coefficients and sum to Y\n let Ytxt = (Rtxt * Rco) + (Gtxt * Gco) + (Btxt * Bco)\n let Ybg = (Rbg * Rco) + (Gbg * Gco) + (Bbg * Bco)\n\n // Soft clamp Y when near black.\n // Now clamping all colors to prevent crossover errors\n if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp\n if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp\n\n // Return 0 Early for extremely low ∆Y (lint trap #1)\n if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0\n\n // SAPC CONTRAST\n\n let outputContrast: number // For weighted final values\n if (Ybg > Ytxt) {\n // For normal polarity, black text on white\n // Calculate the SAPC contrast value and scale\n\n const SAPC = ((Ybg ** normBG) - (Ytxt ** normTXT)) * scaleBoW\n\n // NEW! SAPC SmoothScale™\n // Low Contrast Smooth Scale Rollout to prevent polarity reversal\n // and also a low clip for very low contrasts (lint trap #2)\n // much of this is for very low contrasts, less than 10\n // therefore for most reversing needs, only loConOffset is important\n outputContrast =\n (SAPC < loClip) ? 0.0\n : (SAPC < loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC - loConOffset\n } else {\n // For reverse polarity, light text on dark\n // WoB should always return negative value.\n\n const SAPC = ((Ybg ** revBG) - (Ytxt ** revTXT)) * scaleWoB\n\n outputContrast =\n (SAPC > -loClip) ? 0.0\n : (SAPC > -loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC + loConOffset\n }\n\n return outputContrast * 100\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AACA;AACA,MAAMA,OAAO,GAAG,GAAhB;AAEA,MAAMC,GAAG,GAAG,SAAZ,C,CAAsB;;AACtB,MAAMC,GAAG,GAAG,SAAZ,C,CAAsB;;AACtB,MAAMC,GAAG,GAAG,SAAZ,C,CAAsB;AAEtB;AAEA;AACA;AACA;;AACA,MAAMC,MAAM,GAAG,IAAf;AACA,MAAMC,OAAO,GAAG,IAAhB;AACA,MAAMC,MAAM,GAAG,IAAf;AACA,MAAMC,KAAK,GAAG,IAAd,C,CAEA;;AAEA,MAAMC,OAAO,GAAG,IAAhB,C,CAAqB;;AACrB,MAAMC,OAAO,GAAG,IAAhB,C,CAAqB;;AACrB,MAAMC,SAAS,GAAG,MAAlB,C,CAAyB;;AACzB,MAAMC,QAAQ,GAAG,IAAjB,C,CAAsB;;AACtB,MAAMC,QAAQ,GAAG,IAAjB,C,CAAsB;;AACtB,MAAMC,WAAW,GAAG,K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OAAO,GAAGmB,GAAX,KAAmBlB,OAA1B,CAjB0C,CAmB9D;;EACA,IAAImB,IAAI,CAACC,GAAL,CAASF,GAAG,GAAGD,IAAf,IAAuBhB,SAA3B,EAAsC,OAAO,GAAP,CApBwB,CAsB9D;;EAEA,IAAIoB,cAAJ,CAxB8D,CAwBnC;;EAC3B,IAAIH,GAAG,GAAGD,IAAV,EAAgB;IACd;IACA;IAEA,MAAMK,IAAI,GAAG,CAAEJ,GAAG,IAAIvB,MAAR,GAAmBsB,IAAI,IAAIrB,OAA5B,IAAwCM,QAArD,CAJc,CAMd;IACA;IACA;IACA;IACA;;IACAmB,cAAc,GACXC,IAAI,GAAGf,MAAR,GAAkB,GAAlB,GACGe,IAAI,GAAGlB,WAAR,GAAuBkB,IAAI,GAAGA,IAAI,GAAGjB,WAAP,GAAqBC,WAAnD,GACAgB,IAAI,GAAGhB,WAHX;EAID,CAfD,MAeO;IACL;IACA;IAEA,MAAMgB,IAAI,GAAG,CAAEJ,GAAG,IAAIpB,KAAR,GAAkBmB,IAAI,IAAIpB,MAA3B,IAAsCM,QAAnD;IAEAkB,cAAc,GACXC,IAAI,GAAG,CAACf,MAAT,GAAmB,GAAnB,GACGe,IAAI,GAAG,CAAClB,WAAT,GAAwBkB,IAAI,GAAGA,IAAI,GAAGjB,WAAP,GAAqBC,WAApD,GACAgB,IAAI,GAAGhB,WAHX;EAID;;EAED,OAAOe,cAAc,GAAG,GAAxB;AACD"}
1
+ {"version":3,"file":"APCA.mjs","names":["mainTRC","Rco","Gco","Bco","normBG","normTXT","revTXT","revBG","blkThrs","blkClmp","deltaYmin","scaleBoW","scaleWoB","loConThresh","loConFactor","loConOffset","loClip","APCAcontrast","text","background","Rtxt","Gtxt","Btxt","Rbg","Gbg","Bbg","Ytxt","Ybg","Math","abs","outputContrast","SAPC"],"sources":["../../../src/util/color/APCA.ts"],"sourcesContent":["/**\n * WCAG 3.0 APCA perceptual contrast algorithm from https://github.com/Myndex/SAPC-APCA\n * @licence https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n * @see https://www.w3.org/WAI/GL/task-forces/silver/wiki/Visual_Contrast_of_Text_Subgroup\n */\n\n// MAGICAL NUMBERS\n\n// sRGB Conversion to Relative Luminance (Y)\n\n// Transfer Curve (aka \"Gamma\") for sRGB linearization\n// Simple power curve vs piecewise described in docs\n// Essentially, 2.4 best models actual display\n// characteristics in combination with the total method\nconst mainTRC = 2.4\n\nconst Rco = 0.2126729 // sRGB Red Coefficient (from matrix)\nconst Gco = 0.7151522 // sRGB Green Coefficient (from matrix)\nconst Bco = 0.0721750 // sRGB Blue Coefficient (from matrix)\n\n// For Finding Raw SAPC Contrast from Relative Luminance (Y)\n\n// Constants for SAPC Power Curve Exponents\n// One pair for normal text, and one for reverse\n// These are the \"beating heart\" of SAPC\nconst normBG = 0.55\nconst normTXT = 0.58\nconst revTXT = 0.57\nconst revBG = 0.62\n\n// For Clamping and Scaling Values\n\nconst blkThrs = 0.03 // Level that triggers the soft black clamp\nconst blkClmp = 1.45 // Exponent for the soft black clamp curve\nconst deltaYmin = 0.0005 // Lint trap\nconst scaleBoW = 1.25 // Scaling for dark text on light\nconst scaleWoB = 1.25 // Scaling for light text on dark\nconst loConThresh = 0.078 // Threshold for new simple offset scale\nconst loConFactor = 12.82051282051282 // = 1/0.078,\nconst loConOffset = 0.06 // The simple offset\nconst loClip = 0.001 // Output clip (lint trap #2)\n\nexport function APCAcontrast (text: number, background: number) {\n // Linearize sRGB\n const Rtxt = ((text >> 16 & 0xff) / 255) ** mainTRC\n const Gtxt = ((text >> 8 & 0xff) / 255) ** mainTRC\n const Btxt = ((text >> 0 & 0xff) / 255) ** mainTRC\n\n const Rbg = ((background >> 16 & 0xff) / 255) ** mainTRC\n const Gbg = ((background >> 8 & 0xff) / 255) ** mainTRC\n const Bbg = ((background >> 0 & 0xff) / 255) ** mainTRC\n\n // Apply the standard coefficients and sum to Y\n let Ytxt = (Rtxt * Rco) + (Gtxt * Gco) + (Btxt * Bco)\n let Ybg = (Rbg * Rco) + (Gbg * Gco) + (Bbg * Bco)\n\n // Soft clamp Y when near black.\n // Now clamping all colors to prevent crossover errors\n if (Ytxt <= blkThrs) Ytxt += (blkThrs - Ytxt) ** blkClmp\n if (Ybg <= blkThrs) Ybg += (blkThrs - Ybg) ** blkClmp\n\n // Return 0 Early for extremely low ∆Y (lint trap #1)\n if (Math.abs(Ybg - Ytxt) < deltaYmin) return 0.0\n\n // SAPC CONTRAST\n\n let outputContrast: number // For weighted final values\n if (Ybg > Ytxt) {\n // For normal polarity, black text on white\n // Calculate the SAPC contrast value and scale\n\n const SAPC = ((Ybg ** normBG) - (Ytxt ** normTXT)) * scaleBoW\n\n // NEW! SAPC SmoothScale™\n // Low Contrast Smooth Scale Rollout to prevent polarity reversal\n // and also a low clip for very low contrasts (lint trap #2)\n // much of this is for very low contrasts, less than 10\n // therefore for most reversing needs, only loConOffset is important\n outputContrast =\n (SAPC < loClip) ? 0.0\n : (SAPC < loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC - loConOffset\n } else {\n // For reverse polarity, light text on dark\n // WoB should always return negative value.\n\n const SAPC = ((Ybg ** revBG) - (Ytxt ** revTXT)) * scaleWoB\n\n outputContrast =\n (SAPC > -loClip) ? 0.0\n : (SAPC > -loConThresh) ? SAPC - SAPC * loConFactor * loConOffset\n : SAPC + loConOffset\n }\n\n return outputContrast * 100\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAMA,OAAO,GAAG,GAAG;AAEnB,MAAMC,GAAG,GAAG,SAAS,EAAC;AACtB,MAAMC,GAAG,GAAG,SAAS,EAAC;AACtB,MAAMC,GAAG,GAAG,SAAS,EAAC;;AAEtB;;AAEA;AACA;AACA;AACA,MAAMC,MAAM,GAAG,IAAI;AACnB,MAAMC,OAAO,GAAG,IAAI;AACpB,MAAMC,MAAM,GAAG,IAAI;AACnB,MAAMC,KAAK,GAAG,IAAI;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,IAAI,IAAIlB,OAAO,EAAEkB,IAAI,IAAI,CAAClB,OAAO,GAAGkB,IAAI,KAAKjB,OAAO;EACxD,IAAIkB,GAAG,IAAInB,OAAO,EAAEmB,GAAG,IAAI,CAACnB,OAAO,GAAGmB,GAAG,KAAKlB,OAAO;;EAErD;EACA,IAAImB,IAAI,CAACC,GAAG,CAACF,GAAG,GAAGD,IAAI,CAAC,GAAGhB,SAAS,EAAE,OAAO,GAAG;;EAEhD;;EAEA,IAAIoB,cAAsB,EAAC;EAC3B,IAAIH,GAAG,GAAGD,IAAI,EAAE;IACd;IACA;;IAEA,MAAMK,IAAI,GAAG,CAAEJ,GAAG,IAAIvB,MAAM,GAAKsB,IAAI,IAAIrB,OAAQ,IAAIM,QAAQ;;IAE7D;IACA;IACA;IACA;IACA;IACAmB,cAAc,GACXC,IAAI,GAAGf,MAAM,GAAI,GAAG,GAClBe,IAAI,GAAGlB,WAAW,GAAIkB,IAAI,GAAGA,IAAI,GAAGjB,WAAW,GAAGC,WAAW,GAC9DgB,IAAI,GAAGhB,WAAW;EACxB,CAAC,MAAM;IACL;IACA;;IAEA,MAAMgB,IAAI,GAAG,CAAEJ,GAAG,IAAIpB,KAAK,GAAKmB,IAAI,IAAIpB,MAAO,IAAIM,QAAQ;IAE3DkB,cAAc,GACXC,IAAI,GAAG,CAACf,MAAM,GAAI,GAAG,GACnBe,IAAI,GAAG,CAAClB,WAAW,GAAIkB,IAAI,GAAGA,IAAI,GAAGjB,WAAW,GAAGC,WAAW,GAC/DgB,IAAI,GAAGhB,WAAW;EACxB;EAEA,OAAOe,cAAc,GAAG,GAAG;AAC7B"}
@@ -1,9 +1,7 @@
1
1
  const delta = 0.20689655172413793; // 6÷29
2
2
 
3
3
  const cielabForwardTransform = t => t > delta ** 3 ? Math.cbrt(t) : t / (3 * delta ** 2) + 4 / 29;
4
-
5
4
  const cielabReverseTransform = t => t > delta ? t ** 3 : 3 * delta ** 2 * (t - 4 / 29);
6
-
7
5
  export function fromXYZ(xyz) {
8
6
  const transform = cielabForwardTransform;
9
7
  const transformedY = transform(xyz[1]);
@@ -1 +1 @@
1
- {"version":3,"file":"transformCIELAB.mjs","names":["delta","cielabForwardTransform","t","Math","cbrt","cielabReverseTransform","fromXYZ","xyz","transform","transformedY","toXYZ","lab","Ln"],"sources":["../../../src/util/color/transformCIELAB.ts"],"sourcesContent":["import type { LAB, XYZ } from '../colorUtils'\n\nconst delta = 0.20689655172413793 // 6÷29\n\nconst cielabForwardTransform = (t: number): number => (\n t > delta ** 3\n ? Math.cbrt(t)\n : (t / (3 * delta ** 2)) + 4 / 29\n)\n\nconst cielabReverseTransform = (t: number): number => (\n t > delta\n ? t ** 3\n : (3 * delta ** 2) * (t - 4 / 29)\n)\n\nexport function fromXYZ (xyz: XYZ): LAB {\n const transform = cielabForwardTransform\n const transformedY = transform(xyz[1])\n\n return [\n 116 * transformedY - 16,\n 500 * (transform(xyz[0] / 0.95047) - transformedY),\n 200 * (transformedY - transform(xyz[2] / 1.08883)),\n ]\n}\n\nexport function toXYZ (lab: LAB): XYZ {\n const transform = cielabReverseTransform\n const Ln = (lab[0] + 16) / 116\n return [\n transform(Ln + lab[1] / 500) * 0.95047,\n transform(Ln),\n transform(Ln - lab[2] / 200) * 1.08883,\n ]\n}\n"],"mappings":"AAEA,MAAMA,KAAK,GAAG,mBAAd,C,CAAkC;;AAElC,MAAMC,sBAAsB,GAAIC,CAAD,IAC7BA,CAAC,GAAGF,KAAK,IAAI,CAAb,GACIG,IAAI,CAACC,IAAL,CAAUF,CAAV,CADJ,GAEKA,CAAC,IAAI,IAAIF,KAAK,IAAI,CAAjB,CAAF,GAAyB,IAAI,EAHnC;;AAMA,MAAMK,sBAAsB,GAAIH,CAAD,IAC7BA,CAAC,GAAGF,KAAJ,GACIE,CAAC,IAAI,CADT,GAEK,IAAIF,KAAK,IAAI,CAAd,IAAoBE,CAAC,GAAG,IAAI,EAA5B,CAHN;;AAMA,OAAO,SAASI,OAAT,CAAkBC,GAAlB,EAAiC;EACtC,MAAMC,SAAS,GAAGP,sBAAlB;EACA,MAAMQ,YAAY,GAAGD,SAAS,CAACD,GAAG,CAAC,CAAD,CAAJ,CAA9B;EAEA,OAAO,CACL,MAAME,YAAN,GAAqB,EADhB,EAEL,OAAOD,SAAS,CAACD,GAAG,CAAC,CAAD,CAAH,GAAS,OAAV,CAAT,GAA8BE,YAArC,CAFK,EAGL,OAAOA,YAAY,GAAGD,SAAS,CAACD,GAAG,CAAC,CAAD,CAAH,GAAS,OAAV,CAA/B,CAHK,CAAP;AAKD;AAED,OAAO,SAASG,KAAT,CAAgBC,GAAhB,EAA+B;EACpC,MAAMH,SAAS,GAAGH,sBAAlB;EACA,MAAMO,EAAE,GAAG,CAACD,GAAG,CAAC,CAAD,CAAH,GAAS,EAAV,IAAgB,GAA3B;EACA,OAAO,CACLH,SAAS,CAACI,EAAE,GAAGD,GAAG,CAAC,CAAD,CAAH,GAAS,GAAf,CAAT,GAA+B,OAD1B,EAELH,SAAS,CAACI,EAAD,CAFJ,EAGLJ,SAAS,CAACI,EAAE,GAAGD,GAAG,CAAC,CAAD,CAAH,GAAS,GAAf,CAAT,GAA+B,OAH1B,CAAP;AAKD"}
1
+ {"version":3,"file":"transformCIELAB.mjs","names":["delta","cielabForwardTransform","t","Math","cbrt","cielabReverseTransform","fromXYZ","xyz","transform","transformedY","toXYZ","lab","Ln"],"sources":["../../../src/util/color/transformCIELAB.ts"],"sourcesContent":["import type { LAB, XYZ } from '../colorUtils'\n\nconst delta = 0.20689655172413793 // 6÷29\n\nconst cielabForwardTransform = (t: number): number => (\n t > delta ** 3\n ? Math.cbrt(t)\n : (t / (3 * delta ** 2)) + 4 / 29\n)\n\nconst cielabReverseTransform = (t: number): number => (\n t > delta\n ? t ** 3\n : (3 * delta ** 2) * (t - 4 / 29)\n)\n\nexport function fromXYZ (xyz: XYZ): LAB {\n const transform = cielabForwardTransform\n const transformedY = transform(xyz[1])\n\n return [\n 116 * transformedY - 16,\n 500 * (transform(xyz[0] / 0.95047) - transformedY),\n 200 * (transformedY - transform(xyz[2] / 1.08883)),\n ]\n}\n\nexport function toXYZ (lab: LAB): XYZ {\n const transform = cielabReverseTransform\n const Ln = (lab[0] + 16) / 116\n return [\n transform(Ln + lab[1] / 500) * 0.95047,\n transform(Ln),\n transform(Ln - lab[2] / 200) * 1.08883,\n ]\n}\n"],"mappings":"AAEA,MAAMA,KAAK,GAAG,mBAAmB,EAAC;;AAElC,MAAMC,sBAAsB,GAAIC,CAAS,IACvCA,CAAC,GAAGF,KAAK,IAAI,CAAC,GACVG,IAAI,CAACC,IAAI,CAACF,CAAC,CAAC,GACXA,CAAC,IAAI,CAAC,GAAGF,KAAK,IAAI,CAAC,CAAC,GAAI,CAAC,GAAG,EAClC;AAED,MAAMK,sBAAsB,GAAIH,CAAS,IACvCA,CAAC,GAAGF,KAAK,GACLE,CAAC,IAAI,CAAC,GACL,CAAC,GAAGF,KAAK,IAAI,CAAC,IAAKE,CAAC,GAAG,CAAC,GAAG,EAAE,CACnC;AAED,OAAO,SAASI,OAAO,CAAEC,GAAQ,EAAO;EACtC,MAAMC,SAAS,GAAGP,sBAAsB;EACxC,MAAMQ,YAAY,GAAGD,SAAS,CAACD,GAAG,CAAC,CAAC,CAAC,CAAC;EAEtC,OAAO,CACL,GAAG,GAAGE,YAAY,GAAG,EAAE,EACvB,GAAG,IAAID,SAAS,CAACD,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAGE,YAAY,CAAC,EAClD,GAAG,IAAIA,YAAY,GAAGD,SAAS,CAACD,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CACnD;AACH;AAEA,OAAO,SAASG,KAAK,CAAEC,GAAQ,EAAO;EACpC,MAAMH,SAAS,GAAGH,sBAAsB;EACxC,MAAMO,EAAE,GAAG,CAACD,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG;EAC9B,OAAO,CACLH,SAAS,CAACI,EAAE,GAAGD,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,EACtCH,SAAS,CAACI,EAAE,CAAC,EACbJ,SAAS,CAACI,EAAE,GAAGD,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,OAAO,CACvC;AACH"}
@@ -1,39 +1,41 @@
1
1
  import { clamp } from "../../util/helpers.mjs"; // For converting XYZ to sRGB
2
+ const srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.2040, 1.0570]];
2
3
 
3
- const srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.2040, 1.0570]]; // Forward gamma adjust
4
+ // Forward gamma adjust
5
+ const srgbForwardTransform = C => C <= 0.0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - 0.055;
4
6
 
5
- const srgbForwardTransform = C => C <= 0.0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - 0.055; // For converting sRGB to XYZ
6
-
7
-
8
- const srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]]; // Reverse gamma adjust
7
+ // For converting sRGB to XYZ
8
+ const srgbReverseMatrix = [[0.4124, 0.3576, 0.1805], [0.2126, 0.7152, 0.0722], [0.0193, 0.1192, 0.9505]];
9
9
 
10
+ // Reverse gamma adjust
10
11
  const srgbReverseTransform = C => C <= 0.04045 ? C / 12.92 : ((C + 0.055) / 1.055) ** 2.4;
11
-
12
12
  export function fromXYZ(xyz) {
13
13
  const rgb = Array(3);
14
14
  const transform = srgbForwardTransform;
15
- const matrix = srgbForwardMatrix; // Matrix transform, then gamma adjustment
15
+ const matrix = srgbForwardMatrix;
16
16
 
17
+ // Matrix transform, then gamma adjustment
17
18
  for (let i = 0; i < 3; ++i) {
18
19
  rgb[i] = Math.round(clamp(transform(matrix[i][0] * xyz[0] + matrix[i][1] * xyz[1] + matrix[i][2] * xyz[2])) * 255);
19
- } // Rescale back to [0, 255]
20
-
20
+ }
21
21
 
22
+ // Rescale back to [0, 255]
22
23
  return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0);
23
24
  }
24
25
  export function toXYZ(rgb) {
25
26
  const xyz = [0, 0, 0];
26
27
  const transform = srgbReverseTransform;
27
- const matrix = srgbReverseMatrix; // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB
28
+ const matrix = srgbReverseMatrix;
28
29
 
30
+ // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB
29
31
  const r = transform((rgb >> 16 & 0xff) / 255);
30
32
  const g = transform((rgb >> 8 & 0xff) / 255);
31
- const b = transform((rgb >> 0 & 0xff) / 255); // Matrix color space transform
33
+ const b = transform((rgb >> 0 & 0xff) / 255);
32
34
 
35
+ // Matrix color space transform
33
36
  for (let i = 0; i < 3; ++i) {
34
37
  xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b;
35
38
  }
36
-
37
39
  return xyz;
38
40
  }
39
41
  //# sourceMappingURL=transformSRGB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformSRGB.mjs","names":["clamp","srgbForwardMatrix","srgbForwardTransform","C","srgbReverseMatrix","srgbReverseTransform","fromXYZ","xyz","rgb","Array","transform","matrix","i","Math","round","toXYZ","r","g","b"],"sources":["../../../src/util/color/transformSRGB.ts"],"sourcesContent":["import type { ColorInt, XYZ } from '../colorUtils'\nimport { clamp } from '../../util/helpers'\n\n// For converting XYZ to sRGB\nconst srgbForwardMatrix = [\n [3.2406, -1.5372, -0.4986],\n [-0.9689, 1.8758, 0.0415],\n [0.0557, -0.2040, 1.0570],\n]\n\n// Forward gamma adjust\nconst srgbForwardTransform = (C: number): number => (\n C <= 0.0031308\n ? C * 12.92\n : 1.055 * C ** (1 / 2.4) - 0.055\n)\n\n// For converting sRGB to XYZ\nconst srgbReverseMatrix = [\n [0.4124, 0.3576, 0.1805],\n [0.2126, 0.7152, 0.0722],\n [0.0193, 0.1192, 0.9505],\n]\n\n// Reverse gamma adjust\nconst srgbReverseTransform = (C: number): number => (\n C <= 0.04045\n ? C / 12.92\n : ((C + 0.055) / 1.055) ** 2.4\n)\n\nexport function fromXYZ (xyz: XYZ): ColorInt {\n const rgb = Array(3)\n const transform = srgbForwardTransform\n const matrix = srgbForwardMatrix\n\n // Matrix transform, then gamma adjustment\n for (let i = 0; i < 3; ++i) {\n rgb[i] = Math.round(clamp(transform(\n matrix[i][0] * xyz[0] +\n matrix[i][1] * xyz[1] +\n matrix[i][2] * xyz[2]\n )) * 255)\n }\n\n // Rescale back to [0, 255]\n return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0)\n}\n\nexport function toXYZ (rgb: ColorInt): XYZ {\n const xyz: XYZ = [0, 0, 0]\n const transform = srgbReverseTransform\n const matrix = srgbReverseMatrix\n\n // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB\n const r = transform((rgb >> 16 & 0xff) / 255)\n const g = transform((rgb >> 8 & 0xff) / 255)\n const b = transform((rgb >> 0 & 0xff) / 255)\n\n // Matrix color space transform\n for (let i = 0; i < 3; ++i) {\n xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b\n }\n\n return xyz\n}\n"],"mappings":"SACSA,K,kCAET;;AACA,MAAMC,iBAAiB,GAAG,CACxB,CAAC,MAAD,EAAS,CAAC,MAAV,EAAkB,CAAC,MAAnB,CADwB,EAExB,CAAC,CAAC,MAAF,EAAU,MAAV,EAAkB,MAAlB,CAFwB,EAGxB,CAAC,MAAD,EAAS,CAAC,MAAV,EAAkB,MAAlB,CAHwB,CAA1B,C,CAMA;;AACA,MAAMC,oBAAoB,GAAIC,CAAD,IAC3BA,CAAC,IAAI,SAAL,GACIA,CAAC,GAAG,KADR,GAEI,QAAQA,CAAC,KAAK,IAAI,GAAT,CAAT,GAAyB,KAH/B,C,CAMA;;;AACA,MAAMC,iBAAiB,GAAG,CACxB,CAA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,GAAGL,oBAAlB;EACA,MAAMM,MAAM,GAAGP,iBAAf,CAHyC,CAKzC;;EACA,MAAMY,CAAC,GAAGN,SAAS,CAAC,CAACF,GAAG,IAAI,EAAP,GAAY,IAAb,IAAqB,GAAtB,CAAnB;EACA,MAAMS,CAAC,GAAGP,SAAS,CAAC,CAACF,GAAG,IAAI,CAAP,GAAW,IAAZ,IAAoB,GAArB,CAAnB;EACA,MAAMU,CAAC,GAAGR,SAAS,CAAC,CAACF,GAAG,IAAI,CAAP,GAAW,IAAZ,IAAoB,GAArB,CAAnB,CARyC,CAUzC;;EACA,KAAK,IAAII,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAG,CAApB,EAAuB,EAAEA,CAAzB,EAA4B;IAC1BL,GAAG,CAACK,CAAD,CAAH,GAASD,MAAM,CAACC,CAAD,CAAN,CAAU,CAAV,IAAeI,CAAf,GAAmBL,MAAM,CAACC,CAAD,CAAN,CAAU,CAAV,IAAeK,CAAlC,GAAsCN,MAAM,CAACC,CAAD,CAAN,CAAU,CAAV,IAAeM,CAA9D;EACD;;EAED,OAAOX,GAAP;AACD"}
1
+ {"version":3,"file":"transformSRGB.mjs","names":["clamp","srgbForwardMatrix","srgbForwardTransform","C","srgbReverseMatrix","srgbReverseTransform","fromXYZ","xyz","rgb","Array","transform","matrix","i","Math","round","toXYZ","r","g","b"],"sources":["../../../src/util/color/transformSRGB.ts"],"sourcesContent":["import type { ColorInt, XYZ } from '../colorUtils'\nimport { clamp } from '../../util/helpers'\n\n// For converting XYZ to sRGB\nconst srgbForwardMatrix = [\n [3.2406, -1.5372, -0.4986],\n [-0.9689, 1.8758, 0.0415],\n [0.0557, -0.2040, 1.0570],\n]\n\n// Forward gamma adjust\nconst srgbForwardTransform = (C: number): number => (\n C <= 0.0031308\n ? C * 12.92\n : 1.055 * C ** (1 / 2.4) - 0.055\n)\n\n// For converting sRGB to XYZ\nconst srgbReverseMatrix = [\n [0.4124, 0.3576, 0.1805],\n [0.2126, 0.7152, 0.0722],\n [0.0193, 0.1192, 0.9505],\n]\n\n// Reverse gamma adjust\nconst srgbReverseTransform = (C: number): number => (\n C <= 0.04045\n ? C / 12.92\n : ((C + 0.055) / 1.055) ** 2.4\n)\n\nexport function fromXYZ (xyz: XYZ): ColorInt {\n const rgb = Array(3)\n const transform = srgbForwardTransform\n const matrix = srgbForwardMatrix\n\n // Matrix transform, then gamma adjustment\n for (let i = 0; i < 3; ++i) {\n rgb[i] = Math.round(clamp(transform(\n matrix[i][0] * xyz[0] +\n matrix[i][1] * xyz[1] +\n matrix[i][2] * xyz[2]\n )) * 255)\n }\n\n // Rescale back to [0, 255]\n return (rgb[0] << 16) + (rgb[1] << 8) + (rgb[2] << 0)\n}\n\nexport function toXYZ (rgb: ColorInt): XYZ {\n const xyz: XYZ = [0, 0, 0]\n const transform = srgbReverseTransform\n const matrix = srgbReverseMatrix\n\n // Rescale from [0, 255] to [0, 1] then adjust sRGB gamma to linear RGB\n const r = transform((rgb >> 16 & 0xff) / 255)\n const g = transform((rgb >> 8 & 0xff) / 255)\n const b = transform((rgb >> 0 & 0xff) / 255)\n\n // Matrix color space transform\n for (let i = 0; i < 3; ++i) {\n xyz[i] = matrix[i][0] * r + matrix[i][1] * g + matrix[i][2] * b\n }\n\n return xyz\n}\n"],"mappings":"SACSA,KAAK,kCAEd;AACA,MAAMC,iBAAiB,GAAG,CACxB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAC1B,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACzB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAC1B;;AAED;AACA,MAAMC,oBAAoB,GAAIC,CAAS,IACrCA,CAAC,IAAI,SAAS,GACVA,CAAC,GAAG,KAAK,GACT,KAAK,GAAGA,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,KAC9B;;AAED;AACA,MAAMC,iBAAiB,GAAG,CACxB,CAAC,MAAM,EAA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