yuyeon 0.3.4-rc.3 → 0.3.5

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 (448) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/yuyeon.js +4170 -3973
  3. package/dist/yuyeon.umd.cjs +3 -3
  4. package/lib/abstract/items.js.map +1 -1
  5. package/lib/components/alert/YAlert.js +3 -4
  6. package/lib/components/alert/YAlert.js.map +1 -1
  7. package/lib/components/alert/index.js.map +1 -1
  8. package/lib/components/app/YApp.js +2 -2
  9. package/lib/components/app/YApp.js.map +1 -1
  10. package/lib/components/app/index.js.map +1 -1
  11. package/lib/components/badge/YBadge.js +7 -5
  12. package/lib/components/badge/YBadge.js.map +1 -1
  13. package/lib/components/badge/YBadge.scss +3 -2
  14. package/lib/components/badge/index.js.map +1 -1
  15. package/lib/components/bench/YBench.js +3 -4
  16. package/lib/components/bench/YBench.js.map +1 -1
  17. package/lib/components/bench/index.js.map +1 -1
  18. package/lib/components/button/YButton.js +1 -2
  19. package/lib/components/button/YButton.js.map +1 -1
  20. package/lib/components/button/index.js.map +1 -1
  21. package/lib/components/card/YCard.js.map +1 -1
  22. package/lib/components/card/YCard.scss +2 -2
  23. package/lib/components/card/YCardBody.js.map +1 -1
  24. package/lib/components/card/YCardFooter.js.map +1 -1
  25. package/lib/components/card/YCardHeader.js.map +1 -1
  26. package/lib/components/card/index.js.map +1 -1
  27. package/lib/components/checkbox/YCheckbox.js +1 -2
  28. package/lib/components/checkbox/YCheckbox.js.map +1 -1
  29. package/lib/components/checkbox/YInputCheckbox.js +1 -2
  30. package/lib/components/checkbox/YInputCheckbox.js.map +1 -1
  31. package/lib/components/checkbox/index.js.map +1 -1
  32. package/lib/components/chip/YChip.js +1 -2
  33. package/lib/components/chip/YChip.js.map +1 -1
  34. package/lib/components/chip/index.js.map +1 -1
  35. package/lib/components/date-picker/YDateCalendar.js +59 -54
  36. package/lib/components/date-picker/YDateCalendar.js.map +1 -1
  37. package/lib/components/date-picker/YDatePicker.js +24 -25
  38. package/lib/components/date-picker/YDatePicker.js.map +1 -1
  39. package/lib/components/date-picker/YDatePickerControl.js +19 -20
  40. package/lib/components/date-picker/YDatePickerControl.js.map +1 -1
  41. package/lib/components/date-picker/YMonthPicker.js +10 -11
  42. package/lib/components/date-picker/YMonthPicker.js.map +1 -1
  43. package/lib/components/date-picker/YYearPicker.js +11 -13
  44. package/lib/components/date-picker/YYearPicker.js.map +1 -1
  45. package/lib/components/date-picker/index.js.map +1 -1
  46. package/lib/components/default-provider/YDefaultProvider.js.map +1 -1
  47. package/lib/components/default-provider/index.js.map +1 -1
  48. package/lib/components/dialog/YDialog.js +32 -32
  49. package/lib/components/dialog/YDialog.js.map +1 -1
  50. package/lib/components/dialog/index.js.map +1 -1
  51. package/lib/components/divider/YDivider.js +5 -5
  52. package/lib/components/divider/YDivider.js.map +1 -1
  53. package/lib/components/divider/index.js.map +1 -1
  54. package/lib/components/draggable/YDraggable.js +10 -11
  55. package/lib/components/draggable/YDraggable.js.map +1 -1
  56. package/lib/components/draggable/index.js.map +1 -1
  57. package/lib/components/dropdown/YDropdown.js +16 -17
  58. package/lib/components/dropdown/YDropdown.js.map +1 -1
  59. package/lib/components/dropdown/index.js.map +1 -1
  60. package/lib/components/field-input/YFieldInput.js +39 -39
  61. package/lib/components/field-input/YFieldInput.js.map +1 -1
  62. package/lib/components/field-input/index.js.map +1 -1
  63. package/lib/components/form/YForm.js +12 -14
  64. package/lib/components/form/YForm.js.map +1 -1
  65. package/lib/components/form/index.js.map +1 -1
  66. package/lib/components/hover/YHover.js +9 -8
  67. package/lib/components/hover/YHover.js.map +1 -1
  68. package/lib/components/hover/index.js.map +1 -1
  69. package/lib/components/icon/YIcon.js +2 -4
  70. package/lib/components/icon/YIcon.js.map +1 -1
  71. package/lib/components/icon/index.js.map +1 -1
  72. package/lib/components/icons/YIconCheckbox.js +7 -6
  73. package/lib/components/icons/YIconCheckbox.js.map +1 -1
  74. package/lib/components/icons/YIconClear.js +2 -1
  75. package/lib/components/icons/YIconClear.js.map +1 -1
  76. package/lib/components/icons/YIconDropdown.js +2 -1
  77. package/lib/components/icons/YIconDropdown.js.map +1 -1
  78. package/lib/components/icons/YIconExpand.js +1 -0
  79. package/lib/components/icons/YIconExpand.js.map +1 -1
  80. package/lib/components/icons/YIconPageControl.js +7 -6
  81. package/lib/components/icons/YIconPageControl.js.map +1 -1
  82. package/lib/components/icons/YIconSort.js +6 -5
  83. package/lib/components/icons/YIconSort.js.map +1 -1
  84. package/lib/components/icons/YIconSort.scss +2 -0
  85. package/lib/components/icons/index.js.map +1 -1
  86. package/lib/components/img/YImg.js +42 -37
  87. package/lib/components/img/YImg.js.map +1 -1
  88. package/lib/components/img/index.js +1 -1
  89. package/lib/components/img/index.js.map +1 -1
  90. package/lib/components/index.js +1 -0
  91. package/lib/components/index.js.map +1 -1
  92. package/lib/components/input/YInput.js +1 -2
  93. package/lib/components/input/YInput.js.map +1 -1
  94. package/lib/components/input/YInput.scss +10 -9
  95. package/lib/components/input/index.js.map +1 -1
  96. package/lib/components/ip-field/YIpv4Field.js +1 -2
  97. package/lib/components/ip-field/YIpv4Field.js.map +1 -1
  98. package/lib/components/ip-field/index.js.map +1 -1
  99. package/lib/components/layer/YLayer.js +38 -25
  100. package/lib/components/layer/YLayer.js.map +1 -1
  101. package/lib/components/layer/active-delay.js.map +1 -1
  102. package/lib/components/layer/active-stack.js.map +1 -1
  103. package/lib/components/layer/base.js +11 -1
  104. package/lib/components/layer/base.js.map +1 -1
  105. package/lib/components/layer/content.js.map +1 -1
  106. package/lib/components/layer/index.js.map +1 -1
  107. package/lib/components/layer/scroll-strategies.js.map +1 -1
  108. package/lib/components/list/YList.js +1 -2
  109. package/lib/components/list/YList.js.map +1 -1
  110. package/lib/components/list/YListItem.js +1 -2
  111. package/lib/components/list/YListItem.js.map +1 -1
  112. package/lib/components/list/index.js.map +1 -1
  113. package/lib/components/loading/YSpinnerRing.js.map +1 -1
  114. package/lib/components/loading/index.js.map +1 -1
  115. package/lib/components/menu/YMenu.js +24 -27
  116. package/lib/components/menu/YMenu.js.map +1 -1
  117. package/lib/components/menu/YMenu.scss +3 -4
  118. package/lib/components/menu/index.js.map +1 -1
  119. package/lib/components/navigation/YNavigation.js +1 -2
  120. package/lib/components/navigation/YNavigation.js.map +1 -1
  121. package/lib/components/navigation/index.js.map +1 -1
  122. package/lib/components/pagination/YPagination.js +1 -2
  123. package/lib/components/pagination/YPagination.js.map +1 -1
  124. package/lib/components/pagination/index.js.map +1 -1
  125. package/lib/components/panel/YDividePanel.js +1 -2
  126. package/lib/components/panel/YDividePanel.js.map +1 -1
  127. package/lib/components/panel/YDividePanel.scss +1 -0
  128. package/lib/components/panel/index.js.map +1 -1
  129. package/lib/components/plate/YPlate.js +3 -4
  130. package/lib/components/plate/YPlate.js.map +1 -1
  131. package/lib/components/plate/index.js.map +1 -1
  132. package/lib/components/progress-bar/YProgressBar.js +1 -2
  133. package/lib/components/progress-bar/YProgressBar.js.map +1 -1
  134. package/lib/components/progress-bar/index.js.map +1 -1
  135. package/lib/components/progress-ring/YProgressRing.js +3 -4
  136. package/lib/components/progress-ring/YProgressRing.js.map +1 -1
  137. package/lib/components/progress-ring/index.js.map +1 -1
  138. package/lib/components/radio/YRadio.js +1 -1
  139. package/lib/components/radio/YRadio.js.map +1 -1
  140. package/lib/components/radio/YRadioIcon.js.map +1 -1
  141. package/lib/components/radio/YRadioIcon.scss +2 -3
  142. package/lib/components/radio/index.js.map +1 -1
  143. package/lib/components/select/YSelect.js +41 -42
  144. package/lib/components/select/YSelect.js.map +1 -1
  145. package/lib/components/select/index.js.map +1 -1
  146. package/lib/components/slider/YSlider.js.map +1 -1
  147. package/lib/components/slider/index.js.map +1 -1
  148. package/lib/components/slider/slider.js.map +1 -1
  149. package/lib/components/snackbar/YSnackbar.js +6 -6
  150. package/lib/components/snackbar/YSnackbar.js.map +1 -1
  151. package/lib/components/snackbar/index.js.map +1 -1
  152. package/lib/components/switch/YSwitch.js +1 -2
  153. package/lib/components/switch/YSwitch.js.map +1 -1
  154. package/lib/components/switch/index.js.map +1 -1
  155. package/lib/components/tab/YTab.js +2 -3
  156. package/lib/components/tab/YTab.js.map +1 -1
  157. package/lib/components/tab/YTab.scss +1 -1
  158. package/lib/components/tab/YTabs.js +1 -2
  159. package/lib/components/tab/YTabs.js.map +1 -1
  160. package/lib/components/tab/index.js.map +1 -1
  161. package/lib/components/tab/shared.js.map +1 -1
  162. package/lib/components/tab/types.js.map +1 -1
  163. package/lib/components/table/YDataTable.js +1 -2
  164. package/lib/components/table/YDataTable.js.map +1 -1
  165. package/lib/components/table/YDataTableBody.js +2 -3
  166. package/lib/components/table/YDataTableBody.js.map +1 -1
  167. package/lib/components/table/YDataTableCell.js +1 -2
  168. package/lib/components/table/YDataTableCell.js.map +1 -1
  169. package/lib/components/table/YDataTableControl.js +1 -1
  170. package/lib/components/table/YDataTableControl.js.map +1 -1
  171. package/lib/components/table/YDataTableHead.js +1 -1
  172. package/lib/components/table/YDataTableHead.js.map +1 -1
  173. package/lib/components/table/YDataTableLayer.js +1 -2
  174. package/lib/components/table/YDataTableLayer.js.map +1 -1
  175. package/lib/components/table/YDataTableLayerRow.js +1 -2
  176. package/lib/components/table/YDataTableLayerRow.js.map +1 -1
  177. package/lib/components/table/YDataTableLayerRows.js +3 -4
  178. package/lib/components/table/YDataTableLayerRows.js.map +1 -1
  179. package/lib/components/table/YDataTableRow.js +1 -2
  180. package/lib/components/table/YDataTableRow.js.map +1 -1
  181. package/lib/components/table/YDataTableServer.js +1 -2
  182. package/lib/components/table/YDataTableServer.js.map +1 -1
  183. package/lib/components/table/YTable.js +1 -2
  184. package/lib/components/table/YTable.js.map +1 -1
  185. package/lib/components/table/composables/expand.js.map +1 -1
  186. package/lib/components/table/composables/header.js.map +1 -1
  187. package/lib/components/table/composables/items.js.map +1 -1
  188. package/lib/components/table/composables/measure.js +1 -1
  189. package/lib/components/table/composables/measure.js.map +1 -1
  190. package/lib/components/table/composables/options.js.map +1 -1
  191. package/lib/components/table/composables/pagination.js.map +1 -1
  192. package/lib/components/table/composables/provides.js.map +1 -1
  193. package/lib/components/table/composables/selection.js.map +1 -1
  194. package/lib/components/table/composables/sorted-items.js.map +1 -1
  195. package/lib/components/table/composables/sorting.js.map +1 -1
  196. package/lib/components/table/index.js.map +1 -1
  197. package/lib/components/table/types/common.js.map +1 -1
  198. package/lib/components/table/types/header.js.map +1 -1
  199. package/lib/components/table/types/index.js.map +1 -1
  200. package/lib/components/table/types/item.js.map +1 -1
  201. package/lib/components/table/types/row.js.map +1 -1
  202. package/lib/components/text-ellipsis/YTextEllipsis.js +1 -2
  203. package/lib/components/text-ellipsis/YTextEllipsis.js.map +1 -1
  204. package/lib/components/text-ellipsis/index.js.map +1 -1
  205. package/lib/components/text-highlighter/YTextHighlighter.js.map +1 -1
  206. package/lib/components/text-highlighter/index.js.map +1 -1
  207. package/lib/components/text-interpolation/YTi.js +2 -2
  208. package/lib/components/text-interpolation/YTi.js.map +1 -1
  209. package/lib/components/text-interpolation/index.js.map +1 -1
  210. package/lib/components/textarea/YTextarea.js +1 -2
  211. package/lib/components/textarea/YTextarea.js.map +1 -1
  212. package/lib/components/textarea/index.js.map +1 -1
  213. package/lib/components/toggle-button/YToggleButton.js.map +1 -1
  214. package/lib/components/toggle-button/index.js.map +1 -1
  215. package/lib/components/tooltip/YTooltip.js +18 -19
  216. package/lib/components/tooltip/YTooltip.js.map +1 -1
  217. package/lib/components/tooltip/index.js.map +1 -1
  218. package/lib/components/transitions/expand-transition.js.map +1 -1
  219. package/lib/components/transitions/index.js.map +1 -1
  220. package/lib/components/tree-view/YTreeView.js +1 -2
  221. package/lib/components/tree-view/YTreeView.js.map +1 -1
  222. package/lib/components/tree-view/YTreeViewNode.js +1 -2
  223. package/lib/components/tree-view/YTreeViewNode.js.map +1 -1
  224. package/lib/components/tree-view/index.js.map +1 -1
  225. package/lib/components/tree-view/tree-view.js.map +1 -1
  226. package/lib/components/tree-view/types.js.map +1 -1
  227. package/lib/components/tree-view/util.js.map +1 -1
  228. package/lib/composables/choice-link.js.map +1 -1
  229. package/lib/composables/choice.js.map +1 -1
  230. package/lib/composables/communication.js.map +1 -1
  231. package/lib/composables/component.js.map +1 -1
  232. package/lib/composables/coordinate/arrangement.js.map +1 -1
  233. package/lib/composables/coordinate/index.js +23 -13
  234. package/lib/composables/coordinate/index.js.map +1 -1
  235. package/lib/composables/coordinate/levitation.js +81 -52
  236. package/lib/composables/coordinate/levitation.js.map +1 -1
  237. package/lib/composables/coordinate/types.js.map +1 -1
  238. package/lib/composables/coordinate/utils/point.js.map +1 -1
  239. package/lib/composables/date/factory.js.map +1 -1
  240. package/lib/composables/date/index.js.map +1 -1
  241. package/lib/composables/date/setting.js.map +1 -1
  242. package/lib/composables/date/types.js.map +1 -1
  243. package/lib/composables/defaults/index.js.map +1 -1
  244. package/lib/composables/defaults/share.js.map +1 -1
  245. package/lib/composables/defaults/types.js.map +1 -1
  246. package/lib/composables/dimension.js.map +1 -1
  247. package/lib/composables/focus.js.map +1 -1
  248. package/lib/composables/form.js +5 -5
  249. package/lib/composables/form.js.map +1 -1
  250. package/lib/composables/i18n/index.js.map +1 -1
  251. package/lib/composables/i18n/locale.js.map +1 -1
  252. package/lib/composables/i18n/rtl.js.map +1 -1
  253. package/lib/composables/i18n/share.js.map +1 -1
  254. package/lib/composables/icon.js +1 -2
  255. package/lib/composables/icon.js.map +1 -1
  256. package/lib/composables/index.js.map +1 -1
  257. package/lib/composables/layer-group.js.map +1 -1
  258. package/lib/composables/layout.js.map +1 -1
  259. package/lib/composables/list-items.js.map +1 -1
  260. package/lib/composables/progress.js.map +1 -1
  261. package/lib/composables/ref.js.map +1 -1
  262. package/lib/composables/resize-observer.js.map +1 -1
  263. package/lib/composables/scope.js.map +1 -1
  264. package/lib/composables/style-color.js +6 -5
  265. package/lib/composables/style-color.js.map +1 -1
  266. package/lib/composables/theme/factory.js.map +1 -1
  267. package/lib/composables/theme/helper.js.map +1 -1
  268. package/lib/composables/theme/index.js +8 -1
  269. package/lib/composables/theme/index.js.map +1 -1
  270. package/lib/composables/theme/setting.js.map +1 -1
  271. package/lib/composables/theme/types.js.map +1 -1
  272. package/lib/composables/timing.js +13 -5
  273. package/lib/composables/timing.js.map +1 -1
  274. package/lib/composables/transition.js.map +1 -1
  275. package/lib/composables/validation.js +4 -1
  276. package/lib/composables/validation.js.map +1 -1
  277. package/lib/composables/vue-router.js.map +1 -1
  278. package/lib/directives/complement-click/index.js.map +1 -1
  279. package/lib/directives/index.js +3 -0
  280. package/lib/directives/index.js.map +1 -0
  281. package/lib/directives/plate-wave/index.js +2 -2
  282. package/lib/directives/plate-wave/index.js.map +1 -1
  283. package/lib/directives/plate-wave/plate-wave.scss +17 -6
  284. package/lib/directives/theme-class/index.js +24 -0
  285. package/lib/directives/theme-class/index.js.map +1 -0
  286. package/lib/etc/index.js.map +1 -1
  287. package/lib/i18n/built-in.js.map +1 -1
  288. package/lib/i18n/config.js.map +1 -1
  289. package/lib/i18n/types.js.map +1 -1
  290. package/lib/index.js +3 -3
  291. package/lib/index.js.map +1 -1
  292. package/lib/locales/en.js.map +1 -1
  293. package/lib/locales/index.js.map +1 -1
  294. package/lib/locales/ko.js.map +1 -1
  295. package/lib/mixins/di.js.map +1 -1
  296. package/lib/mixins/rebind-attrs.js +0 -2
  297. package/lib/mixins/rebind-attrs.js.map +1 -1
  298. package/lib/styles/_elevation.scss +0 -1
  299. package/lib/styles/base.scss +3 -1
  300. package/lib/styles/settings/_elevation.scss +12 -12
  301. package/lib/styles/settings/_provided.scss +23 -23
  302. package/lib/styles/theme/dark.scss +3 -3
  303. package/lib/styles/theme/index.scss +0 -1
  304. package/lib/styles/theme/light.scss +3 -3
  305. package/lib/styles/util/_mixin.scss +16 -16
  306. package/lib/types/index.js.map +1 -1
  307. package/lib/util/anchor.js.map +1 -1
  308. package/lib/util/array.js.map +1 -1
  309. package/lib/util/collection.js.map +1 -1
  310. package/lib/util/color/apca.js +1 -0
  311. package/lib/util/color/apca.js.map +1 -1
  312. package/lib/util/color/const.js.map +1 -1
  313. package/lib/util/color/contrast/contrast.js.map +1 -1
  314. package/lib/util/color/conversion.js.map +1 -1
  315. package/lib/util/color/hct/cam16.js.map +1 -1
  316. package/lib/util/color/hct/hct-solver.js +6 -6
  317. package/lib/util/color/hct/hct-solver.js.map +1 -1
  318. package/lib/util/color/hct/hct.js.map +1 -1
  319. package/lib/util/color/hct/viewing-conditions.js +6 -4
  320. package/lib/util/color/hct/viewing-conditions.js.map +1 -1
  321. package/lib/util/color/index.js +13 -13
  322. package/lib/util/color/index.js.map +1 -1
  323. package/lib/util/color/palettes/core-palette.js.map +1 -1
  324. package/lib/util/color/palettes/tonal-palette.js +3 -3
  325. package/lib/util/color/palettes/tonal-palette.js.map +1 -1
  326. package/lib/util/color/types.js.map +1 -1
  327. package/lib/util/color/utils/math-utils.js +62 -62
  328. package/lib/util/color/utils/math-utils.js.map +1 -1
  329. package/lib/util/common.js +28 -13
  330. package/lib/util/common.js.map +1 -1
  331. package/lib/util/component/component.js.map +1 -1
  332. package/lib/util/component/index.js.map +1 -1
  333. package/lib/util/component/inject-self.js.map +1 -1
  334. package/lib/util/component/props.js.map +1 -1
  335. package/lib/util/component/types.js.map +1 -1
  336. package/lib/util/date/adapters/yuyeon-date-adapter.js +3 -3
  337. package/lib/util/date/adapters/yuyeon-date-adapter.js.map +1 -1
  338. package/lib/util/date/built-in.js +2 -0
  339. package/lib/util/date/built-in.js.map +1 -1
  340. package/lib/util/date/index.js +1 -1
  341. package/lib/util/date/index.js.map +1 -1
  342. package/lib/util/date/types.js.map +1 -1
  343. package/lib/util/debounce.js +1 -1
  344. package/lib/util/debounce.js.map +1 -1
  345. package/lib/util/dom.js +10 -1
  346. package/lib/util/dom.js.map +1 -1
  347. package/lib/util/environments.js.map +1 -1
  348. package/lib/util/frame-scheduler.js +3 -3
  349. package/lib/util/frame-scheduler.js.map +1 -1
  350. package/lib/util/index.js +11 -11
  351. package/lib/util/index.js.map +1 -1
  352. package/lib/util/reactivity.js +3 -3
  353. package/lib/util/reactivity.js.map +1 -1
  354. package/lib/util/rect.js.map +1 -1
  355. package/lib/util/scroll.js.map +1 -1
  356. package/lib/util/string.js +3 -1
  357. package/lib/util/string.js.map +1 -1
  358. package/lib/util/ui.js +8 -7
  359. package/lib/util/ui.js.map +1 -1
  360. package/lib/util/validation.js.map +1 -1
  361. package/package.json +132 -123
  362. package/types/abstract/items.d.ts +4 -4
  363. package/types/components/alert/YAlert.d.ts +2 -2
  364. package/types/components/badge/YBadge.d.ts +9 -3
  365. package/types/components/button/YButton.d.ts +3 -3
  366. package/types/components/checkbox/YCheckbox.d.ts +4 -4
  367. package/types/components/chip/YChip.d.ts +0 -3
  368. package/types/components/date-picker/YDateCalendar.d.ts +4 -3
  369. package/types/components/date-picker/YDatePickerControl.d.ts +7 -7
  370. package/types/components/dialog/YDialog.d.ts +116 -6484
  371. package/types/components/draggable/YDraggable.d.ts +6 -6
  372. package/types/components/dropdown/YDropdown.d.ts +87 -87
  373. package/types/components/field-input/YFieldInput.d.ts +14 -14
  374. package/types/components/form/YForm.d.ts +3 -3
  375. package/types/components/icon/YIcon.d.ts +4 -4
  376. package/types/components/icons/YIconPageControl.d.ts +1 -1
  377. package/types/components/icons/YIconSort.d.ts +1 -1
  378. package/types/components/icons/index.d.ts +4 -4
  379. package/types/components/img/YImg.d.ts +30 -27
  380. package/types/components/img/index.d.ts +1 -0
  381. package/types/components/index.d.ts +1 -0
  382. package/types/components/input/YInput.d.ts +13 -13
  383. package/types/components/ip-field/YIpv4Field.d.ts +5 -5
  384. package/types/components/layer/YLayer.d.ts +59 -3242
  385. package/types/components/layer/base.d.ts +4 -0
  386. package/types/components/layer/scroll-strategies.d.ts +4 -4
  387. package/types/components/menu/YMenu.d.ts +83 -6451
  388. package/types/components/pagination/YPagination.d.ts +3 -3
  389. package/types/components/select/YSelect.d.ts +172 -496
  390. package/types/components/slider/YSlider.d.ts +1 -1
  391. package/types/components/snackbar/YSnackbar.d.ts +55 -55
  392. package/types/components/tab/YTab.d.ts +3 -3
  393. package/types/components/tab/YTabs.d.ts +1 -1
  394. package/types/components/table/YDataTable.d.ts +30 -87
  395. package/types/components/table/YDataTableBody.d.ts +3 -3
  396. package/types/components/table/YDataTableCell.d.ts +2 -2
  397. package/types/components/table/YDataTableControl.d.ts +6 -6
  398. package/types/components/table/YDataTableLayer.d.ts +2 -2
  399. package/types/components/table/YDataTableRow.d.ts +1 -1
  400. package/types/components/table/YDataTableServer.d.ts +37 -94
  401. package/types/components/table/YTable.d.ts +3 -3
  402. package/types/components/table/composables/expand.d.ts +4 -4
  403. package/types/components/table/composables/header.d.ts +16 -48
  404. package/types/components/table/composables/items.d.ts +2 -2
  405. package/types/components/table/composables/pagination.d.ts +10 -10
  406. package/types/components/table/composables/selection.d.ts +6 -6
  407. package/types/components/table/composables/sorting.d.ts +8 -14
  408. package/types/components/table/types/item.d.ts +1 -1
  409. package/types/components/textarea/YTextarea.d.ts +30 -30
  410. package/types/components/tooltip/YTooltip.d.ts +67 -67
  411. package/types/components/tree-view/YTreeView.d.ts +7 -7
  412. package/types/components/tree-view/YTreeViewNode.d.ts +5 -5
  413. package/types/components/tree-view/tree-view.d.ts +2 -2
  414. package/types/composables/choice.d.ts +2 -2
  415. package/types/composables/coordinate/index.d.ts +28 -3207
  416. package/types/composables/coordinate/levitation.d.ts +4 -2
  417. package/types/composables/coordinate/types.d.ts +1 -0
  418. package/types/composables/dimension.d.ts +6 -6
  419. package/types/composables/form.d.ts +17 -27
  420. package/types/composables/list-items.d.ts +3 -3
  421. package/types/composables/style-color.d.ts +22 -1
  422. package/types/composables/theme/index.d.ts +1 -0
  423. package/types/composables/transition.d.ts +10 -10
  424. package/types/composables/validation.d.ts +6 -6
  425. package/types/composables/vue-router.d.ts +3 -3
  426. package/types/declares.d.ts +1 -0
  427. package/types/directives/index.d.ts +2 -0
  428. package/types/directives/plate-wave/index.d.ts +7 -1
  429. package/types/globals.d.ts +19 -20
  430. package/types/shims.d.ts +9 -3
  431. package/types/types/index.d.ts +3 -0
  432. package/types/util/anchor.d.ts +1 -1
  433. package/types/util/common.d.ts +3 -0
  434. package/types/util/component/component.d.ts +1 -2
  435. package/types/util/component/props.d.ts +1 -1
  436. package/types/util/component/types.d.ts +1 -1
  437. package/types/util/date/index.d.ts +1 -1
  438. package/types/util/dom.d.ts +2 -0
  439. package/types/util/index.d.ts +11 -11
  440. package/types/components/table/composibles/header.d.ts +0 -207
  441. package/types/components/table/composibles/items.d.ts +0 -55
  442. package/types/components/table/composibles/measure.d.ts +0 -8
  443. package/types/components/table/composibles/options.d.ts +0 -11
  444. package/types/components/table/composibles/pagination.d.ts +0 -81
  445. package/types/components/table/composibles/selection.d.ts +0 -82
  446. package/types/components/table/composibles/sorted-items.d.ts +0 -7
  447. package/types/components/table/composibles/sorting.d.ts +0 -62
  448. /package/types/directives/{theme-class.d.ts → theme-class/index.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { onScopeDispose, ref, watch } from 'vue';
1
+ import { onScopeDispose, ref, watch } from "vue";
2
2
  import { propsFactory } from "../../util/component/index.js";
3
3
  import { useToggleScope } from "../scope.js";
4
4
  import { applyArrangement } from "./arrangement.js";
@@ -10,19 +10,19 @@ const coordinateStrategies = {
10
10
  export const pressCoordinateProps = propsFactory({
11
11
  coordinateStrategy: {
12
12
  type: [String, Function],
13
- default: 'arrangement'
13
+ default: "arrangement"
14
14
  },
15
15
  position: {
16
16
  type: String,
17
- default: 'default'
17
+ default: "default"
18
18
  },
19
19
  align: {
20
20
  type: String,
21
- default: 'start'
21
+ default: "start"
22
22
  },
23
23
  origin: {
24
24
  type: String,
25
- default: 'auto'
25
+ default: "auto"
26
26
  },
27
27
  offset: {
28
28
  type: [Number, String, Array]
@@ -31,35 +31,45 @@ export const pressCoordinateProps = propsFactory({
31
31
  type: [Number, String, Array],
32
32
  default: 16
33
33
  }
34
- }, 'Coordinate');
34
+ }, "Coordinate");
35
35
  export function useCoordinate(props, state) {
36
36
  const updateCoordinate = ref();
37
- const coordinate = ref();
37
+ const coordination = ref({
38
+ side: '',
39
+ align: '',
40
+ offset: [0, 0],
41
+ rect: {
42
+ x: 0,
43
+ y: 0,
44
+ width: 0,
45
+ height: 0
46
+ }
47
+ });
38
48
  const coordinateStyles = ref({});
39
49
  useToggleScope(() => !!(state.active.value && props.coordinateStrategy), reset => {
40
50
  watch(() => props.coordinateStrategy, reset);
41
51
  onScopeDispose(() => {
42
52
  updateCoordinate.value = undefined;
43
53
  });
44
- if (typeof props.coordinateStrategy === 'function') {
45
- updateCoordinate.value = props.coordinateStrategy(props, state, coordinate, coordinateStyles)?.updateCoordinate;
54
+ if (typeof props.coordinateStrategy === "function") {
55
+ updateCoordinate.value = props.coordinateStrategy(props, state, coordination, coordinateStyles)?.updateCoordinate;
46
56
  } else {
47
57
  const strategy = coordinateStrategies[props.coordinateStrategy];
48
- updateCoordinate.value = strategy?.(props, state, coordinate, coordinateStyles)?.updateCoordinate;
58
+ updateCoordinate.value = strategy?.(props, state, coordination, coordinateStyles)?.updateCoordinate;
49
59
  }
50
60
  });
51
- window.addEventListener('resize', onResize, {
61
+ window.addEventListener("resize", onResize, {
52
62
  passive: true
53
63
  });
54
64
  onScopeDispose(() => {
55
- window.removeEventListener('resize', onResize);
65
+ window.removeEventListener("resize", onResize);
56
66
  updateCoordinate.value = undefined;
57
67
  });
58
68
  function onResize(e) {
59
69
  updateCoordinate.value?.(e);
60
70
  }
61
71
  return {
62
- coordinate,
72
+ coordination,
63
73
  coordinateStyles,
64
74
  updateCoordinate
65
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["onScopeDispose","ref","watch","propsFactory","useToggleScope","applyArrangement","applyLevitation","coordinateStrategies","levitation","arrangement","pressCoordinateProps","coordinateStrategy","type","String","Function","default","position","align","origin","offset","Number","Array","viewportMargin","useCoordinate","props","state","updateCoordinate","coordinate","coordinateStyles","active","value","reset","undefined","strategy","window","addEventListener","onResize","passive","removeEventListener","e"],"sources":["../../../src/composables/coordinate/index.ts"],"sourcesContent":["import type { CSSProperties, PropType, Ref } from 'vue';\r\nimport { onScopeDispose, ref, watch } from 'vue';\r\n\r\nimport { Rect } from '../../util/rect';\r\nimport { propsFactory } from '../../util/component';\r\nimport { useToggleScope } from '../scope';\r\nimport { applyArrangement } from './arrangement';\r\nimport { applyLevitation } from './levitation';\r\n\r\nimport { CoordinateState } from './types';\r\n\r\nconst coordinateStrategies = {\r\n levitation: applyLevitation,\r\n arrangement: applyArrangement,\r\n};\r\n\r\nexport type CoordinateStrategyFn = (\r\n props: any,\r\n state: CoordinateState,\r\n coordinate: Ref<Rect | undefined>,\r\n coordinateStyles: Ref<CSSProperties>,\r\n) => undefined | { updateCoordinate: (e: Event) => void };\r\n\r\nexport const pressCoordinateProps = propsFactory(\r\n {\r\n coordinateStrategy: {\r\n type: [String, Function] as PropType<keyof typeof coordinateStrategies | CoordinateStrategyFn>,\r\n default: 'arrangement',\r\n },\r\n position: {\r\n type: String as PropType<\r\n 'default' | 'top' | 'end' | 'right' | 'bottom' | 'left' | 'start'\r\n >,\r\n default: 'default',\r\n },\r\n align: {\r\n type: String as PropType<'start' | 'center' | 'end' | 'top' | 'bottom'>,\r\n default: 'start',\r\n },\r\n origin: {\r\n type: String,\r\n default: 'auto'\r\n },\r\n offset: {\r\n type: [Number, String, Array] as PropType<number | string | number[]>,\r\n },\r\n viewportMargin: {\r\n type: [Number, String, Array],\r\n default: 16,\r\n }\r\n },\r\n 'Coordinate',\r\n);\r\n\r\nexport function useCoordinate(props: any, state: CoordinateState) {\r\n const updateCoordinate = ref<(e: Event) => void>();\r\n const coordinate = ref<Rect | undefined>();\r\n const coordinateStyles = ref<CSSProperties>({});\r\n\r\n useToggleScope(\r\n () => !!(state.active.value && props.coordinateStrategy),\r\n (reset) => {\r\n watch(() => props.coordinateStrategy, reset);\r\n onScopeDispose(() => {\r\n updateCoordinate.value = undefined;\r\n });\r\n\r\n if (typeof props.coordinateStrategy === 'function') {\r\n updateCoordinate.value = props.coordinateStrategy(\r\n props,\r\n state,\r\n coordinate,\r\n coordinateStyles,\r\n )?.updateCoordinate;\r\n } else {\r\n const strategy =\r\n coordinateStrategies[\r\n props.coordinateStrategy as keyof typeof coordinateStrategies\r\n ];\r\n updateCoordinate.value = strategy?.(\r\n props,\r\n state,\r\n coordinate,\r\n coordinateStyles,\r\n )?.updateCoordinate;\r\n }\r\n },\r\n );\r\n\r\n window.addEventListener('resize', onResize, { passive: true });\r\n\r\n onScopeDispose(() => {\r\n window.removeEventListener('resize', onResize);\r\n updateCoordinate.value = undefined;\r\n });\r\n\r\n function onResize(e: Event) {\r\n updateCoordinate.value?.(e);\r\n }\r\n\r\n return {\r\n coordinate,\r\n coordinateStyles,\r\n updateCoordinate,\r\n };\r\n}\r\n"],"mappings":"AACA,SAASA,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAC,SAGxCC,YAAY;AAAA,SACZC,cAAc;AAAA,SACdC,gBAAgB;AAAA,SAChBC,eAAe;AAIxB,MAAMC,oBAAoB,GAAG;EAC3BC,UAAU,EAAEF,eAAe;EAC3BG,WAAW,EAAEJ;AACf,CAAC;AASD,OAAO,MAAMK,oBAAoB,GAAGP,YAAY,CAC9C;EACEQ,kBAAkB,EAAE;IAClBC,IAAI,EAAE,CAACC,MAAM,EAAEC,QAAQ,CAAuE;IAC9FC,OAAO,EAAE;EACX,CAAC;EACDC,QAAQ,EAAE;IACRJ,IAAI,EAAEC,MAEL;IACDE,OAAO,EAAE;EACX,CAAC;EACDE,KAAK,EAAE;IACLL,IAAI,EAAEC,MAAiE;IACvEE,OAAO,EAAE;EACX,CAAC;EACDG,MAAM,EAAE;IACNN,IAAI,EAAEC,MAAM;IACZE,OAAO,EAAE;EACX,CAAC;EACDI,MAAM,EAAE;IACNP,IAAI,EAAE,CAACQ,MAAM,EAAEP,MAAM,EAAEQ,KAAK;EAC9B,CAAC;EACDC,cAAc,EAAE;IACdV,IAAI,EA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GAAGE,SAAS;EACpC,CAAC,CAAC;EAEF,SAASI,QAAQA,CAACG,CAAQ,EAAE;IAC1Bb,gBAAgB,CAACI,KAAK,GAAGS,CAAC,CAAC;EAC7B;EAEA,OAAO;IACLZ,UAAU;IACVC,gBAAgB;IAChBF;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"index.js","names":["onScopeDispose","ref","watch","propsFactory","useToggleScope","applyArrangement","applyLevitation","coordinateStrategies","levitation","arrangement","pressCoordinateProps","coordinateStrategy","type","String","Function","default","position","align","origin","offset","Number","Array","viewportMargin","useCoordinate","props","state","updateCoordinate","coordination","side","rect","x","y","width","height","coordinateStyles","active","value","reset","undefined","strategy","window","addEventListener","onResize","passive","removeEventListener","e"],"sources":["../../../src/composables/coordinate/index.ts"],"sourcesContent":["import type { PropType, Ref } from \"vue\";\nimport { onScopeDispose, ref, watch } from \"vue\";\n\nimport type { CssProperties } from \"@/types\";\n\nimport { propsFactory } from \"../../util/component\";\nimport type { Rect } from \"../../util/rect\";\nimport { useToggleScope } from \"../scope\";\nimport { applyArrangement } from \"./arrangement\";\nimport { applyLevitation } from \"./levitation\";\nimport type { CoordinateState } from \"./types\";\n\nconst coordinateStrategies = {\n\tlevitation: applyLevitation,\n\tarrangement: applyArrangement,\n};\n\nexport type CoordinateStrategyFn = (\n\tprops: any,\n\tstate: CoordinateState,\n\tcoordination: Ref<any>,\n\tcoordinateStyles: Ref<CssProperties>,\n) => undefined | { updateCoordinate: (e: Event) => void };\n\nexport const pressCoordinateProps = propsFactory(\n\t{\n\t\tcoordinateStrategy: {\n\t\t\ttype: [String, Function] as PropType<\n\t\t\t\tkeyof typeof coordinateStrategies | CoordinateStrategyFn\n\t\t\t>,\n\t\t\tdefault: \"arrangement\",\n\t\t},\n\t\tposition: {\n\t\t\ttype: String as PropType<\n\t\t\t\t\"default\" | \"top\" | \"end\" | \"right\" | \"bottom\" | \"left\" | \"start\"\n\t\t\t>,\n\t\t\tdefault: \"default\",\n\t\t},\n\t\talign: {\n\t\t\ttype: String as PropType<\"start\" | \"center\" | \"end\" | \"top\" | \"bottom\">,\n\t\t\tdefault: \"start\",\n\t\t},\n\t\torigin: {\n\t\t\ttype: String,\n\t\t\tdefault: \"auto\",\n\t\t},\n\t\toffset: {\n\t\t\ttype: [Number, String, Array] as PropType<number | string | number[]>,\n\t\t},\n\t\tviewportMargin: {\n\t\t\ttype: [Number, String, Array],\n\t\t\tdefault: 16,\n\t\t},\n\t},\n\t\"Coordinate\",\n);\n\nexport function useCoordinate(props: any, state: CoordinateState) {\n\tconst updateCoordinate = ref<(e: Event) => void>();\n\tconst coordination = ref<any>({\n\t\tside: '',\n\t\talign: '',\n\t\toffset: [0, 0],\n\t\trect: {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\twidth: 0,\n\t\t\theight: 0\n\t\t}\n\t});\n\tconst coordinateStyles = ref<CssProperties>({});\n\n\tuseToggleScope(\n\t\t() => !!(state.active.value && props.coordinateStrategy),\n\t\t(reset) => {\n\t\t\twatch(() => props.coordinateStrategy, reset);\n\t\t\tonScopeDispose(() => {\n\t\t\t\tupdateCoordinate.value = undefined;\n\t\t\t});\n\n\t\t\tif (typeof props.coordinateStrategy === \"function\") {\n\t\t\t\tupdateCoordinate.value = props.coordinateStrategy(\n\t\t\t\t\tprops,\n\t\t\t\t\tstate,\n\t\t\t\t\tcoordination,\n\t\t\t\t\tcoordinateStyles,\n\t\t\t\t)?.updateCoordinate;\n\t\t\t} else {\n\t\t\t\tconst strategy =\n\t\t\t\t\tcoordinateStrategies[\n\t\t\t\t\t\tprops.coordinateStrategy as keyof typeof coordinateStrategies\n\t\t\t\t\t];\n\t\t\t\tupdateCoordinate.value = strategy?.(\n\t\t\t\t\tprops,\n\t\t\t\t\tstate,\n\t\t\t\t\tcoordination,\n\t\t\t\t\tcoordinateStyles,\n\t\t\t\t)?.updateCoordinate;\n\t\t\t}\n\t\t},\n\t);\n\n\twindow.addEventListener(\"resize\", onResize, { passive: true });\n\n\tonScopeDispose(() => {\n\t\twindow.removeEventListener(\"resize\", onResize);\n\t\tupdateCoordinate.value = undefined;\n\t});\n\n\tfunction onResize(e: Event) {\n\t\tupdateCoordinate.value?.(e);\n\t}\n\n\treturn {\n\t\tcoordination,\n\t\tcoordinateStyles,\n\t\tupdateCoordinate,\n\t};\n}\n"],"mappings":"AACA,SAASA,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAC,SAIxCC,YAAY;AAAA,SAEZC,cAAc;AAAA,SACdC,gBAAgB;AAAA,SAChBC,eAAe;AAGxB,MAAMC,oBAAoB,GAAG;EAC5BC,UAAU,EAAEF,eAAe;EAC3BG,WAAW,EAAEJ;AACd,CAAC;AASD,OAAO,MAAMK,oBAAoB,GAAGP,YAAY,CAC/C;EACCQ,kBAAkB,EAAE;IACnBC,IAAI,EAAE,CAACC,MAAM,EAAEC,QAAQ,CAEtB;IACDC,OAAO,EAAE;EACV,CAAC;EACDC,QAAQ,EAAE;IACTJ,IAAI,EAAEC,MAEL;IACDE,OAAO,EAAE;EACV,CAAC;EACDE,KAAK,EAAE;IACNL,IAAI,EAAEC,MAAiE;IACvEE,OAAO,EAAE;EACV,CAAC;EACDG,MAAM,EAAE;IACPN,IAAI,EAAEC,MAAM;IACZE,OAAO,EAAE;EACV,CAAC;EACDI,MAAM,EAAE;IACPP,IAAI,EAAE,CAACQ,MAAM,EAAEP,MAAM,EAAEQ,KAAK;EAC7B,CAAC;EACDC,cAAc,EAAE;IACfV,IAAI,EAAE,CAACQ,MAAM,EAAEP,MAAM,EAAEQ,KAAK,CAAC;IAC7BN,OAAO,EAAE;EACV;AACD,CAAC,EACD,YACD,CAAC;AAED,OAAO,SAASQ,aAAaA,CAACC,KAAU,EAAEC,KAAsB,EAAE;EACjE,MAAMC,gBAAgB,GAAGzB,GAAG,CAAqB,CAAC;EAClD,MAAM0B,YAAY,GAAG1B,GAAG,CAAM;IAC7B2B,IAAI,EAAE,EAAE;IACRX,KAAK,EAAE,EAAE;IACTE,M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AK,GAAGS,CAAC,CAAC;EAC5B;EAEA,OAAO;IACNlB,YAAY;IACZO,gBAAgB;IAChBR;EACD,CAAC;AACF","ignoreList":[]}
@@ -1,38 +1,60 @@
1
- import { computed, nextTick, onScopeDispose, ref, watch } from 'vue';
1
+ import { computed, nextTick, onScopeDispose, ref, watch } from "vue";
2
2
  import { flipAlign, flipCorner, flipSide, getAxis, parseAnchor } from "../../util/anchor.js";
3
3
  import { clamp } from "../../util/common.js";
4
4
  import { $computed } from "../../util/reactivity.js";
5
- import { MutableRect, getOverflow } from "../../util/rect.js";
5
+ import { getOverflow, MutableRect } from "../../util/rect.js";
6
6
  import { getScrollParents } from "../../util/scroll.js";
7
7
  import { getBoundingPureRect, pixelCeil, pixelRound, toStyleSizeValue } from "../../util/ui.js";
8
8
  import { anchorToPoint, getOffset } from "./utils/point.js";
9
- export function applyLevitation(props, state, coordinate, coordinateStyles) {
9
+ export function applyLevitation(props, state, coordination, coordinateStyles) {
10
10
  const {
11
11
  contentEl,
12
12
  base,
13
13
  active
14
14
  } = state;
15
15
  const isRtl = ref(false);
16
+ const isFlipped = ref([false, false]);
16
17
 
17
18
  /* Content Limitations */
18
- const [minWidth, minHeight, maxWidth, maxHeight] = ['minWidth', 'minHeight', 'maxWidth', 'maxHeight'].map(key => {
19
+ const [minWidth, minHeight, maxWidth, maxHeight] = ["minWidth", "minHeight", "maxWidth", "maxHeight"].map(key => {
19
20
  return computed(() => {
20
21
  const val = parseFloat(props[key]);
21
22
  return isNaN(val) ? Infinity : val;
22
23
  });
23
24
  });
25
+ const {
26
+ preferredAnchor,
27
+ preferredOrigin
28
+ } = $computed(() => {
29
+ const location = `${props.position} ${props.align}`;
30
+ const parsedAnchor = parseAnchor(location, false);
31
+ const parsedOrigin = props.origin === "overlap" ? parsedAnchor : props.origin === "auto" ? flipSide(parsedAnchor) : parseAnchor(props.origin, false);
32
+
33
+ // Some combinations of props may produce an invalid origin
34
+ if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {
35
+ return {
36
+ preferredAnchor: flipCorner(parsedAnchor),
37
+ preferredOrigin: flipCorner(parsedOrigin)
38
+ };
39
+ } else {
40
+ return {
41
+ preferredAnchor: parsedAnchor,
42
+ preferredOrigin: parsedOrigin
43
+ };
44
+ }
45
+ });
24
46
 
25
47
  /* Offset */
26
48
  const offset = computed(() => {
27
49
  if (Array.isArray(props.offset)) {
28
50
  return props.offset;
29
51
  }
30
- if (typeof props.offset === 'string') {
31
- const offset = props.offset.split(' ').map(parseFloat);
52
+ if (typeof props.offset === "string") {
53
+ const offset = props.offset.split(" ").map(parseFloat);
32
54
  if (offset.length < 2) offset.push(0);
33
55
  return offset;
34
56
  }
35
- return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0];
57
+ return typeof props.offset === "number" ? [props.offset, 0] : [0, 0];
36
58
  });
37
59
 
38
60
  /* Viewport Margin */
@@ -40,12 +62,12 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
40
62
  if (Array.isArray(props.viewportMargin)) {
41
63
  return props.viewportMargin;
42
64
  }
43
- if (typeof props.viewportMargin === 'string') {
44
- const offset = props.viewportMargin.split(' ').map(parseFloat);
65
+ if (typeof props.viewportMargin === "string") {
66
+ const offset = props.viewportMargin.split(" ").map(parseFloat);
45
67
  if (offset.length < 2) offset.push(0);
46
68
  return offset;
47
69
  }
48
- return typeof props.viewportMargin === 'number' ? [props.viewportMargin, 0] : [0, 0];
70
+ return typeof props.viewportMargin === "number" ? [props.viewportMargin, 0] : [0, 0];
49
71
  });
50
72
 
51
73
  /* Observing Update */
@@ -68,8 +90,8 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
68
90
  });
69
91
  function getIgnoreInsetRect(el) {
70
92
  const rect = getBoundingPureRect(el);
71
- rect.x -= parseFloat(el.style.left || '0');
72
- rect.y -= parseFloat(el.style.top || '0');
93
+ rect.x -= parseFloat(el.style.left || "0");
94
+ rect.y -= parseFloat(el.style.top || "0");
73
95
  return rect;
74
96
  }
75
97
  function updateCoordinate() {
@@ -77,7 +99,9 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
77
99
  const $base = base.value;
78
100
  const $content = contentEl.value;
79
101
  requestAnimationFrame(() => {
80
- requestAnimationFrame(() => observe = true);
102
+ requestAnimationFrame(() => {
103
+ observe = true;
104
+ });
81
105
  });
82
106
  if (!$base || !$content) return;
83
107
  const baseRect = Array.isArray($base) ? new MutableRect({
@@ -92,8 +116,8 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
92
116
  scrollParents.push(document.documentElement);
93
117
  }
94
118
 
95
- /**
96
- * Viewport area
119
+ /**
120
+ * Viewport area
97
121
  */
98
122
  const viewport = scrollParents.reduce((box, el) => {
99
123
  const rect = el.getBoundingClientRect();
@@ -117,27 +141,6 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
117
141
  viewport.y += viewportMargin.value[1];
118
142
  viewport.width -= viewportMargin.value[0] * 2;
119
143
  viewport.height -= viewportMargin.value[1] * 2;
120
- const {
121
- preferredAnchor,
122
- preferredOrigin
123
- } = $computed(() => {
124
- const location = `${props.position} ${props.align}`;
125
- const parsedAnchor = parseAnchor(location, false);
126
- const parsedOrigin = props.origin === 'overlap' ? parsedAnchor : props.origin === 'auto' ? flipSide(parsedAnchor) : parseAnchor(props.origin, false);
127
-
128
- // Some combinations of props may produce an invalid origin
129
- if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === flipAlign(parsedOrigin).align) {
130
- return {
131
- preferredAnchor: flipCorner(parsedAnchor),
132
- preferredOrigin: flipCorner(parsedOrigin)
133
- };
134
- } else {
135
- return {
136
- preferredAnchor: parsedAnchor,
137
- preferredOrigin: parsedOrigin
138
- };
139
- }
140
- });
141
144
  let placement = {
142
145
  anchor: preferredAnchor.value,
143
146
  origin: preferredOrigin.value
@@ -151,32 +154,41 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
151
154
  y
152
155
  } = getOffset(targetPoint, contentPoint);
153
156
  switch (_placement.anchor.side) {
154
- case 'top':
157
+ case "top":
155
158
  y -= offset.value[0];
156
159
  break;
157
- case 'bottom':
160
+ case "bottom":
158
161
  y += offset.value[0];
159
162
  break;
160
- case 'left':
163
+ case "left":
161
164
  x -= offset.value[0];
162
165
  break;
163
- case 'right':
166
+ case "right":
164
167
  x += offset.value[0];
165
168
  break;
166
169
  }
167
170
  switch (_placement.anchor.align) {
168
- case 'top':
171
+ case "top":
169
172
  y -= offset.value[1];
170
173
  break;
171
- case 'bottom':
174
+ case "bottom":
172
175
  y += offset.value[1];
173
176
  break;
174
- case 'left':
177
+ case "left":
175
178
  x -= offset.value[1];
176
179
  break;
177
- case 'right':
180
+ case "right":
178
181
  x += offset.value[1];
179
182
  break;
183
+ case "center":
184
+ {
185
+ if (_placement.anchor.side === "top" || _placement.anchor.side === "bottom") {
186
+ x += offset.value[1];
187
+ } else {
188
+ y += offset.value[1];
189
+ }
190
+ break;
191
+ }
180
192
  }
181
193
  box.x += x;
182
194
  box.y += y;
@@ -220,8 +232,8 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
220
232
  const hasOverflowX = overflows.x.before || overflows.x.after;
221
233
  const hasOverflowY = overflows.y.before || overflows.y.after;
222
234
  let reset = false;
223
- ['x', 'y'].forEach(key => {
224
- if (key === 'x' && hasOverflowX && !flipped.x || key === 'y' && hasOverflowY && !flipped.y) {
235
+ ["x", "y"].forEach(key => {
236
+ if (key === "x" && hasOverflowX && !flipped.x || key === "y" && hasOverflowY && !flipped.y) {
225
237
  const newPlacement = {
226
238
  anchor: {
227
239
  ...placement.anchor
@@ -230,7 +242,7 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
230
242
  ...placement.origin
231
243
  }
232
244
  };
233
- const flip = key === 'x' ? axis === 'y' ? flipAlign : flipSide : axis === 'y' ? flipSide : flipAlign;
245
+ const flip = key === "x" ? axis === "y" ? flipAlign : flipSide : axis === "y" ? flipSide : flipAlign;
234
246
  newPlacement.anchor = flip(newPlacement.anchor);
235
247
  newPlacement.origin = flip(newPlacement.origin);
236
248
  const {
@@ -276,22 +288,36 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
276
288
  break;
277
289
  }
278
290
  const axis = getAxis(placement.anchor);
291
+ coordination.value = {
292
+ side: placement.anchor.side,
293
+ align: placement.anchor.align,
294
+ rect: new MutableRect({
295
+ x,
296
+ y,
297
+ width: contentRect.width,
298
+ height: contentRect.height
299
+ }),
300
+ offset: [0, 0]
301
+ };
279
302
  Object.assign(coordinateStyles.value, {
280
- '--y-levitation-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,
303
+ "--y-levitation-anchor-origin": `${placement.anchor.side} ${placement.anchor.align}`,
281
304
  transformOrigin: `${placement.origin.side} ${placement.origin.align}`,
282
305
  top: toStyleSizeValue(pixelRound(y)),
283
306
  left: isRtl.value ? undefined : toStyleSizeValue(pixelRound(x)),
284
307
  right: isRtl.value ? toStyleSizeValue(pixelRound(-x)) : undefined,
285
- minWidth: toStyleSizeValue(axis === 'y' ? Math.min(minWidth.value, baseRect.width) : minWidth.value),
308
+ minWidth: toStyleSizeValue(axis === "y" ? Math.min(minWidth.value, baseRect.width) : minWidth.value),
286
309
  maxWidth: toStyleSizeValue(pixelCeil(clamp(available.x, minWidth.value === Infinity ? 0 : minWidth.value, maxWidth.value))),
287
310
  maxHeight: toStyleSizeValue(pixelCeil(clamp(available.y, minHeight.value === Infinity ? 0 : minHeight.value, maxHeight.value)))
288
311
  });
312
+ isFlipped.value = [flipped.x, flipped.y];
289
313
  return {
290
314
  available,
291
- contentRect
315
+ contentRect,
316
+ flipped,
317
+ placement
292
318
  };
293
319
  }
294
- watch(() => [props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight], () => updateCoordinate());
320
+ watch(() => [props.offset, props.minWidth, props.minHeight, props.maxWidth, props.maxHeight, preferredAnchor.value, preferredOrigin.value], () => updateCoordinate());
295
321
  nextTick(() => {
296
322
  const result = updateCoordinate();
297
323
  if (!result) return;
@@ -309,7 +335,10 @@ export function applyLevitation(props, state, coordinate, coordinateStyles) {
309
335
  }
310
336
  });
311
337
  return {
312
- updateCoordinate
338
+ updateCoordinate,
339
+ isFlipped,
340
+ preferredAnchor,
341
+ preferredOrigin
313
342
  };
314
343
  }
315
344
  //# sourceMappingURL=levitation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"levitation.js","names":["computed","nextTick","onScopeDispose","ref","watch","flipAlign","flipCorner","flipSide","getAxis","parseAnchor","clamp","$computed","MutableRect","getOverflow","getScrollParents","getBoundingPureRect","pixelCeil","pixelRound","toStyleSizeValue","anchorToPoint","getOffset","applyLevitation","props","state","coordinate","coordinateStyles","contentEl","base","active","isRtl","minWidth","minHeight","maxWidth","maxHeight","map","key","val","parseFloat","isNaN","Infinity","offset","Array","isArray","split","length","push","viewportMargin","observe","resizeObserver","ResizeObserver","updateCoordinate","_ref","_ref2","neoBaseEl","neoContentEl","oldBaseEl","oldContentEl","nodeType","unobserve","immediate","disconnect","getIgnoreInsetRect","el","rect","x","style","left","y","top","$base","value","$content","requestAnimationFrame","baseRect","width","height","getBoundingClientRect","contentRect","scrollParents","document","documentElement","viewport","reduce","box","scrollBox","clientWidth","clientHeight","Math","max","min","right","bottom","undefined","preferredAnchor","preferredOrigin","location","position","align","parsedAnchor","parsedOrigin","origin","side","placement","anchor","checkOverflow","_placement","targetPoint","contentPoint","overflows","available","flipped","resets","_x","_y","axis","hasOverflowX","before","after","hasOverflowY","reset","forEach","newPlacement","flip","newOverflows","Object","assign","transformOrigin","result"],"sources":["../../../src/composables/coordinate/levitation.ts"],"sourcesContent":["import type { CSSProperties, Ref } from 'vue';\r\nimport { computed, nextTick, onScopeDispose, ref, watch } from 'vue';\r\n\r\nimport {\r\n type Anchor,\r\n flipAlign,\r\n flipCorner,\r\n flipSide,\r\n getAxis,\r\n parseAnchor,\r\n} from '@/util/anchor';\r\nimport { clamp } from '@/util/common';\r\nimport { $computed } from '@/util/reactivity';\r\nimport { MutableRect, Rect, getOverflow } from '@/util/rect';\r\nimport { getScrollParents } from '@/util/scroll';\r\nimport {\r\n getBoundingPureRect,\r\n pixelCeil,\r\n pixelRound,\r\n toStyleSizeValue,\r\n} from '@/util/ui';\r\n\r\nimport { CoordinateState } from './types';\r\nimport { anchorToPoint, getOffset } from './utils/point';\r\n\r\nexport function applyLevitation(\r\n props: any,\r\n state: CoordinateState,\r\n coordinate: Ref<Rect | undefined>,\r\n coordinateStyles: Ref<CSSProperties>,\r\n) {\r\n const { contentEl, base, active } = state;\r\n\r\n const isRtl = ref(false);\r\n\r\n /* Content Limitations */\r\n const [minWidth, minHeight, maxWidth, maxHeight] = (\r\n ['minWidth', 'minHeight', 'maxWidth', 'maxHeight'] as const\r\n ).map((key) => {\r\n return computed(() => {\r\n const val = parseFloat(props[key]!);\r\n return isNaN(val) ? Infinity : val;\r\n });\r\n });\r\n\r\n /* Offset */\r\n const offset = computed(() => {\r\n if (Array.isArray(props.offset)) {\r\n return props.offset;\r\n }\r\n if (typeof props.offset === 'string') {\r\n const offset = props.offset.split(' ').map(parseFloat);\r\n if (offset.length < 2) offset.push(0);\r\n return offset;\r\n }\r\n return typeof props.offset === 'number' ? [props.offset, 0] : [0, 0];\r\n });\r\n\r\n /* Viewport Margin */\r\n const viewportMargin = computed(() => {\r\n if (Array.isArray(props.viewportMargin)) {\r\n return props.viewportMargin;\r\n }\r\n if (typeof props.viewportMargin === 'string') {\r\n const offset = props.viewportMargin.split(' ').map(parseFloat);\r\n if (offset.length < 2) offset.push(0);\r\n return offset;\r\n }\r\n return typeof props.viewportMargin === 'number'\r\n ? [props.viewportMargin, 0]\r\n : [0, 0];\r\n });\r\n\r\n /* Observing Update */\r\n let observe = false;\r\n const resizeObserver = new ResizeObserver(() => {\r\n if (observe) updateCoordinate();\r\n });\r\n\r\n watch(\r\n [state.base, state.contentEl],\r\n ([neoBaseEl, neoContentEl], [oldBaseEl, oldContentEl]) => {\r\n if (oldBaseEl && !Array.isArray(oldBaseEl) && oldBaseEl.nodeType === 1)\r\n resizeObserver.unobserve(oldBaseEl);\r\n if (neoBaseEl && !Array.isArray(neoBaseEl) && neoBaseEl.nodeType === 1)\r\n resizeObserver.observe(neoBaseEl);\r\n\r\n if (oldContentEl) resizeObserver.unobserve(oldContentEl);\r\n if (neoContentEl) resizeObserver.observe(neoContentEl);\r\n },\r\n { immediate: true },\r\n );\r\n\r\n onScopeDispose(() => {\r\n resizeObserver.disconnect();\r\n });\r\n\r\n function getIgnoreInsetRect(el: HTMLElement) {\r\n const rect = getBoundingPureRect(el);\r\n rect.x -= parseFloat(el.style.left || '0');\r\n rect.y -= parseFloat(el.style.top || '0');\r\n return rect;\r\n }\r\n\r\n function updateCoordinate(): any {\r\n observe = false;\r\n const $base = base.value;\r\n const $content = contentEl.value;\r\n requestAnimationFrame(() => {\r\n requestAnimationFrame(() => (observe = true));\r\n });\r\n\r\n if (!$base || !$content) return;\r\n\r\n const baseRect = Array.isArray($base)\r\n ? new MutableRect({\r\n x: $base?.[0] ?? 0,\r\n y: $base?.[1] ?? 0,\r\n width: 0,\r\n height: 0,\r\n })\r\n : $base.getBoundingClientRect();\r\n const contentRect = getIgnoreInsetRect($content);\r\n const scrollParents = getScrollParents($content);\r\n\r\n if (scrollParents.length < 1) {\r\n scrollParents.push(document.documentElement);\r\n }\r\n\r\n /**\r\n * Viewport area\r\n */\r\n const viewport = scrollParents.reduce<MutableRect>(\r\n (box: MutableRect | undefined, el) => {\r\n const rect = el.getBoundingClientRect();\r\n const scrollBox = new MutableRect({\r\n x: el === document.documentElement ? 0 : rect.x,\r\n y: el === document.documentElement ? 0 : rect.y,\r\n width: el.clientWidth,\r\n height: el.clientHeight,\r\n });\r\n\r\n if (box) {\r\n return new MutableRect({\r\n x: Math.max(box.left, scrollBox.left),\r\n y: Math.max(box.top, scrollBox.top),\r\n width:\r\n Math.min(box.right, scrollBox.right) -\r\n Math.max(box.left, scrollBox.left),\r\n height:\r\n Math.min(box.bottom, scrollBox.bottom) -\r\n Math.max(box.top, scrollBox.top),\r\n });\r\n }\r\n return scrollBox;\r\n },\r\n undefined!,\r\n );\r\n viewport.x += viewportMargin.value[0];\r\n viewport.y += viewportMargin.value[1];\r\n viewport.width -= viewportMargin.value[0] * 2;\r\n viewport.height -= viewportMargin.value[1] * 2;\r\n\r\n const { preferredAnchor, preferredOrigin } = $computed(() => {\r\n const location = `${props.position} ${props.align}` as Anchor;\r\n const parsedAnchor = parseAnchor(location, false);\r\n const parsedOrigin =\r\n props.origin === 'overlap'\r\n ? parsedAnchor\r\n : props.origin === 'auto'\r\n ? flipSide(parsedAnchor)\r\n : parseAnchor(props.origin, false);\r\n\r\n // Some combinations of props may produce an invalid origin\r\n if (\r\n parsedAnchor.side === parsedOrigin.side &&\r\n parsedAnchor.align === flipAlign(parsedOrigin).align\r\n ) {\r\n return {\r\n preferredAnchor: flipCorner(parsedAnchor),\r\n preferredOrigin: flipCorner(parsedOrigin),\r\n };\r\n } else {\r\n return {\r\n preferredAnchor: parsedAnchor,\r\n preferredOrigin: parsedOrigin,\r\n };\r\n }\r\n });\r\n\r\n let placement = {\r\n anchor: preferredAnchor.value,\r\n origin: preferredOrigin.value,\r\n };\r\n\r\n function checkOverflow(_placement: typeof placement) {\r\n const box = new MutableRect(contentRect);\r\n const targetPoint = anchorToPoint(_placement.anchor, baseRect);\r\n const contentPoint = anchorToPoint(_placement.origin, box);\r\n\r\n let { x, y } = getOffset(targetPoint, contentPoint);\r\n\r\n switch (_placement.anchor.side) {\r\n case 'top':\r\n y -= offset.value[0];\r\n break;\r\n case 'bottom':\r\n y += offset.value[0];\r\n break;\r\n case 'left':\r\n x -= offset.value[0];\r\n break;\r\n case 'right':\r\n x += offset.value[0];\r\n break;\r\n }\r\n\r\n switch (_placement.anchor.align) {\r\n case 'top':\r\n y -= offset.value[1];\r\n break;\r\n case 'bottom':\r\n y += offset.value[1];\r\n break;\r\n case 'left':\r\n x -= offset.value[1];\r\n break;\r\n case 'right':\r\n x += offset.value[1];\r\n break;\r\n }\r\n\r\n box.x += x;\r\n box.y += y;\r\n\r\n box.width = Math.min(box.width, maxWidth.value);\r\n box.height = Math.min(box.height, maxHeight.value);\r\n\r\n const overflows = getOverflow(box, viewport);\r\n\r\n return { overflows, x, y };\r\n }\r\n\r\n let x = 0;\r\n let y = 0;\r\n const available = { x: 0, y: 0 };\r\n const flipped = { x: false, y: false };\r\n let resets = -1;\r\n while (true) {\r\n if (resets++ > 10) {\r\n break;\r\n }\r\n\r\n const { x: _x, y: _y, overflows } = checkOverflow(placement);\r\n\r\n x += _x;\r\n y += _y;\r\n\r\n contentRect.x += _x;\r\n contentRect.y += _y;\r\n\r\n // flip\r\n {\r\n const axis = getAxis(placement.anchor);\r\n const hasOverflowX = overflows.x.before || overflows.x.after;\r\n const hasOverflowY = overflows.y.before || overflows.y.after;\r\n\r\n let reset = false;\r\n ['x', 'y'].forEach((key) => {\r\n if (\r\n (key === 'x' && hasOverflowX && !flipped.x) ||\r\n (key === 'y' && hasOverflowY && !flipped.y)\r\n ) {\r\n const newPlacement = {\r\n anchor: { ...placement.anchor },\r\n origin: { ...placement.origin },\r\n };\r\n const flip =\r\n key === 'x'\r\n ? axis === 'y'\r\n ? flipAlign\r\n : flipSide\r\n : axis === 'y'\r\n ? flipSide\r\n : flipAlign;\r\n newPlacement.anchor = flip(newPlacement.anchor);\r\n newPlacement.origin = flip(newPlacement.origin);\r\n const { overflows: newOverflows } = checkOverflow(newPlacement);\r\n if (\r\n (newOverflows[key].before <= overflows[key].before &&\r\n newOverflows[key].after <= overflows[key].after) ||\r\n newOverflows[key].before + newOverflows[key].after <\r\n (overflows[key].before + overflows[key].after) / 2\r\n ) {\r\n placement = newPlacement;\r\n reset = flipped[key] = true;\r\n }\r\n }\r\n });\r\n if (reset) continue;\r\n }\r\n\r\n // shift\r\n if (overflows.x.before) {\r\n x += overflows.x.before;\r\n contentRect.x += overflows.x.before;\r\n }\r\n if (overflows.x.after) {\r\n x -= overflows.x.after;\r\n contentRect.x -= overflows.x.after;\r\n }\r\n if (overflows.y.before) {\r\n y += overflows.y.before;\r\n contentRect.y += overflows.y.before;\r\n }\r\n if (overflows.y.after) {\r\n y -= overflows.y.after;\r\n contentRect.y -= overflows.y.after;\r\n }\r\n\r\n // size\r\n {\r\n const overflows = getOverflow(contentRect, viewport);\r\n available.x = viewport.width - overflows.x.before - overflows.x.after;\r\n available.y = viewport.height - overflows.y.before - overflows.y.after;\r\n\r\n x += overflows.x.before;\r\n contentRect.x += overflows.x.before;\r\n y += overflows.y.before;\r\n contentRect.y += overflows.y.before;\r\n }\r\n\r\n break;\r\n }\r\n\r\n const axis = getAxis(placement.anchor);\r\n\r\n Object.assign(coordinateStyles.value, {\r\n '--y-levitation-anchor-origin': `${placement.anchor.side} ${placement.anchor.align}`,\r\n transformOrigin: `${placement.origin.side} ${placement.origin.align}`,\r\n top: toStyleSizeValue(pixelRound(y)),\r\n left: isRtl.value ? undefined : toStyleSizeValue(pixelRound(x)),\r\n right: isRtl.value ? toStyleSizeValue(pixelRound(-x)) : undefined,\r\n minWidth: toStyleSizeValue(\r\n axis === 'y'\r\n ? Math.min(minWidth.value, baseRect.width)\r\n : minWidth.value,\r\n ),\r\n maxWidth: toStyleSizeValue(\r\n pixelCeil(\r\n clamp(\r\n available.x,\r\n minWidth.value === Infinity ? 0 : minWidth.value,\r\n maxWidth.value,\r\n ),\r\n ),\r\n ),\r\n maxHeight: toStyleSizeValue(\r\n pixelCeil(\r\n clamp(\r\n available.y,\r\n minHeight.value === Infinity ? 0 : minHeight.value,\r\n maxHeight.value,\r\n ),\r\n ),\r\n ),\r\n });\r\n\r\n return {\r\n available,\r\n contentRect,\r\n };\r\n }\r\n\r\n watch(\r\n () => [\r\n props.offset,\r\n props.minWidth,\r\n props.minHeight,\r\n props.maxWidth,\r\n props.maxHeight,\r\n ],\r\n () => updateCoordinate(),\r\n );\r\n\r\n nextTick(() => {\r\n const result = updateCoordinate();\r\n if (!result) return;\r\n const { available, contentRect } = result;\r\n if (contentRect.height > available.y) {\r\n requestAnimationFrame(() => {\r\n updateCoordinate();\r\n requestAnimationFrame(() => {\r\n updateCoordinate();\r\n });\r\n });\r\n }\r\n });\r\n\r\n return {\r\n updateCoordinate,\r\n };\r\n}\r\n"],"mappings":"AACA,SAASA,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAC,SAInEC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,OAAO,EACPC,WAAW;AAAA,SAEJC,KAAK;AAAA,SACLC,SAAS;AAAA,SACTC,WAAW,EAAQC,WAAW;AAAA,SAC9BC,gBAAgB;AAAA,SAEvBC,mBAAmB,EACnBC,SAAS,EACTC,UAAU,EACVC,gBAAgB;AAAA,SAITC,aAAa,EAAEC,SAAS;AAEjC,OAAO,SAASC,eAAeA,CAC7BC,KAAU,EACVC,KAAsB,EACtBC,UAAiC,EACjCC,gBAAoC,EACpC;EACA,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAGL,KAAK;EAEzC,MAAMM,KAAK,GAAG1B,GAAG,CAAC,KAAK,CAAC;;EAExB;EACA,MAAM,CAAC2B,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,CAAC,GAC9C,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,CAAC,CAClDC,GAAG,CAAEC,GAAG,IAAK;IACb,OAAOnC,QAAQ,CAAC,MAAM;MACpB,MAAMoC,GAAG,GAAGC,UAAU,CAACf,KAAK,CAACa,GAAG,CAAE,CAAC;MACnC,OAAOG,KAAK,CAACF,GAAG,CAAC,GAAGG,QAAQ,GAAGH,GAAG;IACpC,CAAC,CAAC;EACJ,CAAC,CAAC;;EAEF;EACA,MAAMI,MAAM,GAAGxC,QAAQ,CAAC,MAAM;IAC5B,IAAIyC,KAAK,CAACC,OAAO,CAACpB,KAAK,CAACkB,MAAM,CAAC,EAAE;MAC/B,OAAOlB,KAAK,CAACkB,MAAM;IACrB;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AW,CAACF,MAAM,GAAGkC,SAAS,CAAC1C,CAAC,EAAE;MACpCK,qBAAqB,CAAC,MAAM;QAC1BtB,gBAAgB,CAAC,CAAC;QAClBsB,qBAAqB,CAAC,MAAM;UAC1BtB,gBAAgB,CAAC,CAAC;QACpB,CAAC,CAAC;MACJ,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;EAEF,OAAO;IACLA;EACF,CAAC;AACH"}
1
+ {"version":3,"file":"levitation.js","names":["computed","nextTick","onScopeDispose","ref","watch","flipAlign","flipCorner","flipSide","getAxis","parseAnchor","clamp","$computed","getOverflow","MutableRect","getScrollParents","getBoundingPureRect","pixelCeil","pixelRound","toStyleSizeValue","anchorToPoint","getOffset","applyLevitation","props","state","coordination","coordinateStyles","contentEl","base","active","isRtl","isFlipped","minWidth","minHeight","maxWidth","maxHeight","map","key","val","parseFloat","isNaN","Infinity","preferredAnchor","preferredOrigin","location","position","align","parsedAnchor","parsedOrigin","origin","side","offset","Array","isArray","split","length","push","viewportMargin","observe","resizeObserver","ResizeObserver","updateCoordinate","_ref","_ref2","neoBaseEl","neoContentEl","oldBaseEl","oldContentEl","nodeType","unobserve","immediate","disconnect","getIgnoreInsetRect","el","rect","x","style","left","y","top","$base","value","$content","requestAnimationFrame","baseRect","width","height","getBoundingClientRect","contentRect","scrollParents","document","documentElement","viewport","reduce","box","scrollBox","clientWidth","clientHeight","Math","max","min","right","bottom","undefined","placement","anchor","checkOverflow","_placement","targetPoint","contentPoint","overflows","available","flipped","resets","_x","_y","axis","hasOverflowX","before","after","hasOverflowY","reset","forEach","newPlacement","flip","newOverflows","Object","assign","transformOrigin","result"],"sources":["../../../src/composables/coordinate/levitation.ts"],"sourcesContent":["import type { CSSProperties, Ref } from \"vue\";\nimport { computed, nextTick, onScopeDispose, ref, watch } from \"vue\";\n\nimport {\n\ttype Anchor,\n\tflipAlign,\n\tflipCorner,\n\tflipSide,\n\tgetAxis,\n\tparseAnchor,\n} from \"@/util/anchor\";\nimport { clamp } from \"@/util/common\";\nimport { $computed } from \"@/util/reactivity\";\nimport { getOverflow, MutableRect } from \"@/util/rect\";\nimport { getScrollParents } from \"@/util/scroll\";\nimport {\n\tgetBoundingPureRect,\n\tpixelCeil,\n\tpixelRound,\n\ttoStyleSizeValue,\n} from \"@/util/ui\";\n\nimport type { CoordinateState } from \"./types\";\nimport { anchorToPoint, getOffset } from \"./utils/point\";\n\nexport function applyLevitation(\n\tprops: any,\n\tstate: CoordinateState,\n\tcoordination: Ref<any>,\n\tcoordinateStyles: Ref<CSSProperties>,\n) {\n\tconst { contentEl, base, active } = state;\n\n\tconst isRtl = ref(false);\n\tconst isFlipped = ref([false, false]);\n\n\t/* Content Limitations */\n\tconst [minWidth, minHeight, maxWidth, maxHeight] = (\n\t\t[\"minWidth\", \"minHeight\", \"maxWidth\", \"maxHeight\"] as const\n\t).map((key) => {\n\t\treturn computed(() => {\n\t\t\tconst val = parseFloat(props[key]!);\n\t\t\treturn isNaN(val) ? Infinity : val;\n\t\t});\n\t});\n\n\tconst { preferredAnchor, preferredOrigin } = $computed(() => {\n\t\tconst location = `${props.position} ${props.align}` as Anchor;\n\t\tconst parsedAnchor = parseAnchor(location, false);\n\t\tconst parsedOrigin =\n\t\t\tprops.origin === \"overlap\"\n\t\t\t\t? parsedAnchor\n\t\t\t\t: props.origin === \"auto\"\n\t\t\t\t\t? flipSide(parsedAnchor)\n\t\t\t\t\t: parseAnchor(props.origin, false);\n\n\t\t// Some combinations of props may produce an invalid origin\n\t\tif (\n\t\t\tparsedAnchor.side === parsedOrigin.side &&\n\t\t\tparsedAnchor.align === flipAlign(parsedOrigin).align\n\t\t) {\n\t\t\treturn {\n\t\t\t\tpreferredAnchor: flipCorner(parsedAnchor),\n\t\t\t\tpreferredOrigin: flipCorner(parsedOrigin),\n\t\t\t};\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tpreferredAnchor: parsedAnchor,\n\t\t\t\tpreferredOrigin: parsedOrigin,\n\t\t\t};\n\t\t}\n\t});\n\n\t/* Offset */\n\tconst offset = computed(() => {\n\t\tif (Array.isArray(props.offset)) {\n\t\t\treturn props.offset;\n\t\t}\n\t\tif (typeof props.offset === \"string\") {\n\t\t\tconst offset = props.offset.split(\" \").map(parseFloat);\n\t\t\tif (offset.length < 2) offset.push(0);\n\t\t\treturn offset;\n\t\t}\n\t\treturn typeof props.offset === \"number\" ? [props.offset, 0] : [0, 0];\n\t});\n\n\t/* Viewport Margin */\n\tconst viewportMargin = computed(() => {\n\t\tif (Array.isArray(props.viewportMargin)) {\n\t\t\treturn props.viewportMargin;\n\t\t}\n\t\tif (typeof props.viewportMargin === \"string\") {\n\t\t\tconst offset = props.viewportMargin.split(\" \").map(parseFloat);\n\t\t\tif (offset.length < 2) offset.push(0);\n\t\t\treturn offset;\n\t\t}\n\t\treturn typeof props.viewportMargin === \"number\"\n\t\t\t? [props.viewportMargin, 0]\n\t\t\t: [0, 0];\n\t});\n\n\t/* Observing Update */\n\tlet observe = false;\n\tconst resizeObserver = new ResizeObserver(() => {\n\t\tif (observe) updateCoordinate();\n\t});\n\n\twatch(\n\t\t[state.base, state.contentEl],\n\t\t([neoBaseEl, neoContentEl], [oldBaseEl, oldContentEl]) => {\n\t\t\tif (oldBaseEl && !Array.isArray(oldBaseEl) && oldBaseEl.nodeType === 1)\n\t\t\t\tresizeObserver.unobserve(oldBaseEl);\n\t\t\tif (neoBaseEl && !Array.isArray(neoBaseEl) && neoBaseEl.nodeType === 1)\n\t\t\t\tresizeObserver.observe(neoBaseEl);\n\n\t\t\tif (oldContentEl) resizeObserver.unobserve(oldContentEl);\n\t\t\tif (neoContentEl) resizeObserver.observe(neoContentEl);\n\t\t},\n\t\t{ immediate: true },\n\t);\n\n\tonScopeDispose(() => {\n\t\tresizeObserver.disconnect();\n\t});\n\n\tfunction getIgnoreInsetRect(el: HTMLElement) {\n\t\tconst rect = getBoundingPureRect(el);\n\t\trect.x -= parseFloat(el.style.left || \"0\");\n\t\trect.y -= parseFloat(el.style.top || \"0\");\n\t\treturn rect;\n\t}\n\n\tfunction updateCoordinate(): any {\n\t\tobserve = false;\n\t\tconst $base = base.value;\n\t\tconst $content = contentEl.value;\n\t\trequestAnimationFrame(() => {\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tobserve = true;\n\t\t\t});\n\t\t});\n\n\t\tif (!$base || !$content) return;\n\n\t\tconst baseRect = Array.isArray($base)\n\t\t\t? new MutableRect({\n\t\t\t\t\tx: $base?.[0] ?? 0,\n\t\t\t\t\ty: $base?.[1] ?? 0,\n\t\t\t\t\twidth: 0,\n\t\t\t\t\theight: 0,\n\t\t\t\t})\n\t\t\t: $base.getBoundingClientRect();\n\t\tconst contentRect = getIgnoreInsetRect($content);\n\t\tconst scrollParents = getScrollParents($content);\n\n\t\tif (scrollParents.length < 1) {\n\t\t\tscrollParents.push(document.documentElement);\n\t\t}\n\n\t\t/**\n\t\t * Viewport area\n\t\t */\n\t\tconst viewport = scrollParents.reduce<MutableRect>(\n\t\t\t(box: MutableRect | undefined, el) => {\n\t\t\t\tconst rect = el.getBoundingClientRect();\n\t\t\t\tconst scrollBox = new MutableRect({\n\t\t\t\t\tx: el === document.documentElement ? 0 : rect.x,\n\t\t\t\t\ty: el === document.documentElement ? 0 : rect.y,\n\t\t\t\t\twidth: el.clientWidth,\n\t\t\t\t\theight: el.clientHeight,\n\t\t\t\t});\n\n\t\t\t\tif (box) {\n\t\t\t\t\treturn new MutableRect({\n\t\t\t\t\t\tx: Math.max(box.left, scrollBox.left),\n\t\t\t\t\t\ty: Math.max(box.top, scrollBox.top),\n\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\tMath.min(box.right, scrollBox.right) -\n\t\t\t\t\t\t\tMath.max(box.left, scrollBox.left),\n\t\t\t\t\t\theight:\n\t\t\t\t\t\t\tMath.min(box.bottom, scrollBox.bottom) -\n\t\t\t\t\t\t\tMath.max(box.top, scrollBox.top),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn scrollBox;\n\t\t\t},\n\t\t\tundefined!,\n\t\t);\n\t\tviewport.x += viewportMargin.value[0];\n\t\tviewport.y += viewportMargin.value[1];\n\t\tviewport.width -= viewportMargin.value[0] * 2;\n\t\tviewport.height -= viewportMargin.value[1] * 2;\n\n\t\tlet placement = {\n\t\t\tanchor: preferredAnchor.value,\n\t\t\torigin: preferredOrigin.value,\n\t\t};\n\n\t\tfunction checkOverflow(_placement: typeof placement) {\n\t\t\tconst box = new MutableRect(contentRect);\n\t\t\tconst targetPoint = anchorToPoint(_placement.anchor, baseRect);\n\t\t\tconst contentPoint = anchorToPoint(_placement.origin, box);\n\n\t\t\tlet { x, y } = getOffset(targetPoint, contentPoint);\n\n\t\t\tswitch (_placement.anchor.side) {\n\t\t\t\tcase \"top\":\n\t\t\t\t\ty -= offset.value[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"bottom\":\n\t\t\t\t\ty += offset.value[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tx -= offset.value[0];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tx += offset.value[0];\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch (_placement.anchor.align) {\n\t\t\t\tcase \"top\":\n\t\t\t\t\ty -= offset.value[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"bottom\":\n\t\t\t\t\ty += offset.value[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tx -= offset.value[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tx += offset.value[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"center\": {\n\t\t\t\t\tif (\n\t\t\t\t\t\t_placement.anchor.side === \"top\" ||\n\t\t\t\t\t\t_placement.anchor.side === \"bottom\"\n\t\t\t\t\t) {\n\t\t\t\t\t\tx += offset.value[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\ty += offset.value[1];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbox.x += x;\n\t\t\tbox.y += y;\n\n\t\t\tbox.width = Math.min(box.width, maxWidth.value);\n\t\t\tbox.height = Math.min(box.height, maxHeight.value);\n\n\t\t\tconst overflows = getOverflow(box, viewport);\n\n\t\t\treturn { overflows, x, y };\n\t\t}\n\n\t\tlet x = 0;\n\t\tlet y = 0;\n\t\tconst available = { x: 0, y: 0 };\n\t\tconst flipped = { x: false, y: false };\n\t\tlet resets = -1;\n\t\twhile (true) {\n\t\t\tif (resets++ > 10) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst { x: _x, y: _y, overflows } = checkOverflow(placement);\n\n\t\t\tx += _x;\n\t\t\ty += _y;\n\n\t\t\tcontentRect.x += _x;\n\t\t\tcontentRect.y += _y;\n\n\t\t\t// flip\n\t\t\t{\n\t\t\t\tconst axis = getAxis(placement.anchor);\n\t\t\t\tconst hasOverflowX = overflows.x.before || overflows.x.after;\n\t\t\t\tconst hasOverflowY = overflows.y.before || overflows.y.after;\n\n\t\t\t\tlet reset = false;\n\t\t\t\t[\"x\", \"y\"].forEach((key) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t(key === \"x\" && hasOverflowX && !flipped.x) ||\n\t\t\t\t\t\t(key === \"y\" && hasOverflowY && !flipped.y)\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst newPlacement = {\n\t\t\t\t\t\t\tanchor: { ...placement.anchor },\n\t\t\t\t\t\t\torigin: { ...placement.origin },\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst flip =\n\t\t\t\t\t\t\tkey === \"x\"\n\t\t\t\t\t\t\t\t? axis === \"y\"\n\t\t\t\t\t\t\t\t\t? flipAlign\n\t\t\t\t\t\t\t\t\t: flipSide\n\t\t\t\t\t\t\t\t: axis === \"y\"\n\t\t\t\t\t\t\t\t\t? flipSide\n\t\t\t\t\t\t\t\t\t: flipAlign;\n\t\t\t\t\t\tnewPlacement.anchor = flip(newPlacement.anchor);\n\t\t\t\t\t\tnewPlacement.origin = flip(newPlacement.origin);\n\t\t\t\t\t\tconst { overflows: newOverflows } = checkOverflow(newPlacement);\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t(newOverflows[key].before <= overflows[key].before &&\n\t\t\t\t\t\t\t\tnewOverflows[key].after <= overflows[key].after) ||\n\t\t\t\t\t\t\tnewOverflows[key].before + newOverflows[key].after <\n\t\t\t\t\t\t\t\t(overflows[key].before + overflows[key].after) / 2\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tplacement = newPlacement;\n\t\t\t\t\t\t\treset = flipped[key] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (reset) continue;\n\t\t\t}\n\n\t\t\t// shift\n\t\t\tif (overflows.x.before) {\n\t\t\t\tx += overflows.x.before;\n\t\t\t\tcontentRect.x += overflows.x.before;\n\t\t\t}\n\t\t\tif (overflows.x.after) {\n\t\t\t\tx -= overflows.x.after;\n\t\t\t\tcontentRect.x -= overflows.x.after;\n\t\t\t}\n\t\t\tif (overflows.y.before) {\n\t\t\t\ty += overflows.y.before;\n\t\t\t\tcontentRect.y += overflows.y.before;\n\t\t\t}\n\t\t\tif (overflows.y.after) {\n\t\t\t\ty -= overflows.y.after;\n\t\t\t\tcontentRect.y -= overflows.y.after;\n\t\t\t}\n\n\t\t\t// size\n\t\t\t{\n\t\t\t\tconst overflows = getOverflow(contentRect, viewport);\n\t\t\t\tavailable.x = viewport.width - overflows.x.before - overflows.x.after;\n\t\t\t\tavailable.y = viewport.height - overflows.y.before - overflows.y.after;\n\n\t\t\t\tx += overflows.x.before;\n\t\t\t\tcontentRect.x += overflows.x.before;\n\t\t\t\ty += overflows.y.before;\n\t\t\t\tcontentRect.y += overflows.y.before;\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\n\t\tconst axis = getAxis(placement.anchor);\n\n\t\tcoordination.value = {\n\t\t\tside: placement.anchor.side,\n\t\t\talign: placement.anchor.align,\n\t\t\trect: new MutableRect({\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t\twidth: contentRect.width,\n\t\t\t\theight: contentRect.height,\n\t\t\t}),\n\t\t\toffset: [0, 0],\n\t\t};\n\n\t\tObject.assign(coordinateStyles.value, {\n\t\t\t\"--y-levitation-anchor-origin\": `${placement.anchor.side} ${placement.anchor.align}`,\n\t\t\ttransformOrigin: `${placement.origin.side} ${placement.origin.align}`,\n\t\t\ttop: toStyleSizeValue(pixelRound(y)),\n\t\t\tleft: isRtl.value ? undefined : toStyleSizeValue(pixelRound(x)),\n\t\t\tright: isRtl.value ? toStyleSizeValue(pixelRound(-x)) : undefined,\n\t\t\tminWidth: toStyleSizeValue(\n\t\t\t\taxis === \"y\"\n\t\t\t\t\t? Math.min(minWidth.value, baseRect.width)\n\t\t\t\t\t: minWidth.value,\n\t\t\t),\n\t\t\tmaxWidth: toStyleSizeValue(\n\t\t\t\tpixelCeil(\n\t\t\t\t\tclamp(\n\t\t\t\t\t\tavailable.x,\n\t\t\t\t\t\tminWidth.value === Infinity ? 0 : minWidth.value,\n\t\t\t\t\t\tmaxWidth.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\tmaxHeight: toStyleSizeValue(\n\t\t\t\tpixelCeil(\n\t\t\t\t\tclamp(\n\t\t\t\t\t\tavailable.y,\n\t\t\t\t\t\tminHeight.value === Infinity ? 0 : minHeight.value,\n\t\t\t\t\t\tmaxHeight.value,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t});\n\n\t\tisFlipped.value = [flipped.x, flipped.y];\n\n\t\treturn {\n\t\t\tavailable,\n\t\t\tcontentRect,\n\t\t\tflipped,\n\t\t\tplacement,\n\t\t};\n\t}\n\n\twatch(\n\t\t() => [\n\t\t\tprops.offset,\n\t\t\tprops.minWidth,\n\t\t\tprops.minHeight,\n\t\t\tprops.maxWidth,\n\t\t\tprops.maxHeight,\n\t\t\tpreferredAnchor.value,\n\t\t\tpreferredOrigin.value,\n\t\t],\n\t\t() => updateCoordinate(),\n\t);\n\n\tnextTick(() => {\n\t\tconst result = updateCoordinate();\n\t\tif (!result) return;\n\t\tconst { available, contentRect } = result;\n\t\tif (contentRect.height > available.y) {\n\t\t\trequestAnimationFrame(() => {\n\t\t\t\tupdateCoordinate();\n\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\tupdateCoordinate();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t});\n\n\treturn {\n\t\tupdateCoordinate,\n\t\tisFlipped,\n\t\tpreferredAnchor,\n\t\tpreferredOrigin,\n\t};\n}\n"],"mappings":"AACA,SAASA,QAAQ,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAC,SAIpEC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,OAAO,EACPC,WAAW;AAAA,SAEHC,KAAK;AAAA,SACLC,SAAS;AAAA,SACTC,WAAW,EAAEC,WAAW;AAAA,SACxBC,gBAAgB;AAAA,SAExBC,mBAAmB,EACnBC,SAAS,EACTC,UAAU,EACVC,gBAAgB;AAAA,SAIRC,aAAa,EAAEC,SAAS;AAEjC,OAAO,SAASC,eAAeA,CAC9BC,KAAU,EACVC,KAAsB,EACtBC,YAAsB,EACtBC,gBAAoC,EACnC;EACD,MAAM;IAAEC,SAAS;IAAEC,IAAI;IAAEC;EAAO,CAAC,GAAGL,KAAK;EAEzC,MAAMM,KAAK,GAAG1B,GAAG,CAAC,KAAK,CAAC;EACxB,MAAM2B,SAAS,GAAG3B,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;;EAErC;EACA,MAAM,CAAC4B,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,CAAC,GAC/C,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,CAAC,CACjDC,GAAG,CAAEC,GAAG,IAAK;IACd,OAAOpC,QAAQ,CAAC,MA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MACrCK,qBAAqB,CAAC,MAAM;QAC3BtB,gBAAgB,CAAC,CAAC;QAClBsB,qBAAqB,CAAC,MAAM;UAC3BtB,gBAAgB,CAAC,CAAC;QACnB,CAAC,CAAC;MACH,CAAC,CAAC;IACH;EACD,CAAC,CAAC;EAEF,OAAO;IACNA,gBAAgB;IAChB9B,SAAS;IACTW,eAAe;IACfC;EACD,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/composables/coordinate/types.ts"],"sourcesContent":["import type { Ref } from \"vue\";\r\n\r\nexport interface CoordinateState {\r\n contentEl: Ref<HTMLElement | undefined>;\r\n base: Ref<HTMLElement | [x: number, y: number] | undefined>;\r\n active: Ref<boolean>;\r\n}\r\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/composables/coordinate/types.ts"],"sourcesContent":["import type { Ref } from 'vue';\n\nexport interface CoordinateState {\n contentEl: Ref<HTMLElement | undefined>;\n base: Ref<HTMLElement | [x: number, y: number] | undefined>;\n active: Ref<boolean>;\n placement?: Ref<any>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"point.js","names":["elementToViewport","point","offset","x","y","viewportToElement","getOffset","a","b","anchorToPoint","anchor","box","side","align","width","height"],"sources":["../../../../src/composables/coordinate/utils/point.ts"],"sourcesContent":["import { type ParsedAnchor } from '@/util/anchor';\r\nimport { type MutableRect } from '@/util/rect';\r\n\r\ntype Point = { x: number; y: number };\r\ndeclare class As<T extends string> {\r\n private as: T;\r\n}\r\ntype ElementPoint = Point & As<'element'>;\r\ntype ViewportPoint = Point & As<'viewport'>;\r\ntype Offset = Point & As<'offset'>;\r\n\r\n/** Convert a point in local space to viewport space */\r\nexport function elementToViewport(\r\n point: ElementPoint,\r\n offset: Offset | MutableRect,\r\n) {\r\n return {\r\n x: point.x + offset.x,\r\n y: point.y + offset.y,\r\n } as ViewportPoint;\r\n}\r\n\r\n/** Convert a point in viewport space to local space */\r\nexport function viewportToElement(\r\n point: ViewportPoint,\r\n offset: Offset | MutableRect,\r\n) {\r\n return {\r\n x: point.x - offset.x,\r\n y: point.y - offset.y,\r\n } as ElementPoint;\r\n}\r\n\r\n/** Get the difference between two points */\r\nexport function getOffset<T extends Point>(a: T, b: T) {\r\n return {\r\n x: a.x - b.x,\r\n y: a.y - b.y,\r\n } as Offset;\r\n}\r\n\r\n/** Convert an anchor object to a point in local space */\r\nexport function anchorToPoint(\r\n anchor: ParsedAnchor,\r\n box: MutableRect,\r\n): ViewportPoint {\r\n if (anchor.side === 'top' || anchor.side === 'bottom') {\r\n const { side, align } = anchor;\r\n\r\n const x: number =\r\n align === 'left'\r\n ? 0\r\n : align === 'center'\r\n ? box.width / 2\r\n : align === 'right'\r\n ? box.width\r\n : align;\r\n const y: number =\r\n side === 'top' ? 0 : side === 'bottom' ? box.height : side;\r\n\r\n return elementToViewport({ x, y } as ElementPoint, box);\r\n } else if (anchor.side === 'left' || anchor.side === 'right') {\r\n const { side, align } = anchor;\r\n\r\n const x: number = side === 'left' ? 0 : side === 'right' ? box.width : side;\r\n const y: number =\r\n align === 'top'\r\n ? 0\r\n : align === 'center'\r\n ? box.height / 2\r\n : align === 'bottom'\r\n ? box.height\r\n : align;\r\n\r\n return elementToViewport({ x, y } as ElementPoint, box);\r\n }\r\n\r\n return elementToViewport(\r\n {\r\n x: box.width / 2,\r\n y: box.height / 2,\r\n } as ElementPoint,\r\n box,\r\n );\r\n}\r\n"],"mappings":"AAWA;AACA,OAAO,SAASA,iBAAiBA,CAC/BC,KAAmB,EACnBC,MAA4B,EAC5B;EACA,OAAO;IACLC,CAAC,EAAEF,KAAK,CAACE,CAAC,GAAGD,MAAM,CAACC,CAAC;IACrBC,CAAC,EAAEH,KAAK,CAACG,CAAC,GAAGF,MAAM,CAACE;EACtB,CAAC;AACH;;AAEA;AACA,OAAO,SAASC,iBAAiBA,CAC/BJ,KAAoB,EACpBC,MAA4B,EAC5B;EAC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3E,MAAMR,CAAS,GACbS,KAAK,KAAK,KAAK,GACX,CAAC,GACDA,KAAK,KAAK,QAAQ,GAChBF,GAAG,CAACI,MAAM,GAAG,CAAC,GACdF,KAAK,KAAK,QAAQ,GAChBF,GAAG,CAACI,MAAM,GACVF,KAAK;IAEf,OAAOb,iBAAiB,CAAC;MAAEG,CAAC;MAAEC;IAAE,CAAC,EAAkBO,GAAG,CAAC;EACzD;EAEA,OAAOX,iBAAiB,CACtB;IACEG,CAAC,EAAEQ,GAAG,CAACG,KAAK,GAAG,CAAC;IAChBV,CAAC,EAAEO,GAAG,CAACI,MAAM,GAAG;EAClB,CAAC,EACDJ,GACF,CAAC;AACH"}
1
+ {"version":3,"file":"point.js","names":["elementToViewport","point","offset","x","y","viewportToElement","getOffset","a","b","anchorToPoint","anchor","box","side","align","width","height"],"sources":["../../../../src/composables/coordinate/utils/point.ts"],"sourcesContent":["import { type ParsedAnchor } from '@/util/anchor';\nimport { type MutableRect } from '@/util/rect';\n\ntype Point = { x: number; y: number };\ndeclare class As<T extends string> {\n private as: T;\n}\ntype ElementPoint = Point & As<'element'>;\ntype ViewportPoint = Point & As<'viewport'>;\ntype Offset = Point & As<'offset'>;\n\n/** Convert a point in local space to viewport space */\nexport function elementToViewport(\n point: ElementPoint,\n offset: Offset | MutableRect,\n) {\n return {\n x: point.x + offset.x,\n y: point.y + offset.y,\n } as ViewportPoint;\n}\n\n/** Convert a point in viewport space to local space */\nexport function viewportToElement(\n point: ViewportPoint,\n offset: Offset | MutableRect,\n) {\n return {\n x: point.x - offset.x,\n y: point.y - offset.y,\n } as ElementPoint;\n}\n\n/** Get the difference between two points */\nexport function getOffset<T extends Point>(a: T, b: T) {\n return {\n x: a.x - b.x,\n y: a.y - b.y,\n } as Offset;\n}\n\n/** Convert an anchor object to a point in local space */\nexport function anchorToPoint(\n anchor: ParsedAnchor,\n box: MutableRect,\n): ViewportPoint {\n if (anchor.side === 'top' || anchor.side === 'bottom') {\n const { side, align } = anchor;\n\n const x: number =\n align === 'left'\n ? 0\n : align === 'center'\n ? box.width / 2\n : align === 'right'\n ? box.width\n : align;\n const y: number =\n side === 'top' ? 0 : side === 'bottom' ? box.height : side;\n\n return elementToViewport({ x, y } as ElementPoint, box);\n } else if (anchor.side === 'left' || anchor.side === 'right') {\n const { side, align } = anchor;\n\n const x: number = side === 'left' ? 0 : side === 'right' ? box.width : side;\n const y: number =\n align === 'top'\n ? 0\n : align === 'center'\n ? box.height / 2\n : align === 'bottom'\n ? box.height\n : align;\n\n return elementToViewport({ x, y } as ElementPoint, box);\n }\n\n return elementToViewport(\n {\n x: box.width / 2,\n y: box.height / 2,\n } as ElementPoint,\n box,\n );\n}\n"],"mappings":"AAWA;AACA,OAAO,SAASA,iBAAiBA,CAC/BC,KAAmB,EACnBC,MAA4B,EAC5B;EACA,OAAO;IACLC,CAAC,EAAEF,KAAK,CAACE,CAAC,GAAGD,MAAM,CAACC,CAAC;IACrBC,CAAC,EAAEH,KAAK,CAACG,CAAC,GAAGF,MAAM,CAACE;EACtB,CAAC;AACH;;AAEA;AACA,OAAO,SAASC,iBAAiBA,CAC/BJ,KAAoB,EACpBC,MAA4B,EAC5B;EACA,OAAO;IACLC,CAAC,EAAEF,KAAK,CAACE,CAAC,GAAGD,MAAM,CAACC,CAAC;IACrBC,CAAC,EAAEH,KAAK,CAACG,CAAC,GAAGF,MAAM,CAACE;EACtB,CAAC;AACH;;AAEA;AACA,OAAO,SAASE,SAASA,CAAkBC,CAAI,EAAEC,CAAI,EAAE;EACrD,OAAO;IACLL,CAAC,EAAEI,CAAC,CAACJ,CAAC,GAAGK,CAAC,CAACL,CAAC;IACZC,CAAC,EAAEG,CAAC,CAACH,CAAC,GAAGI,CAAC,CAACJ;EACb,CAAC;AACH;;AAEA;AACA,OAAO,SAASK,aAAaA,CAC3BC,MAAoB,EACpBC,GAAgB,EACD;EACf,IAAID,MAAM,CAACE,IAAI,KAAK,KAAK,IAAIF,MAAM,CAACE,IAAI,KAAK,QAAQ,EAAE;IACrD,MAAM;MAAEA,IAAI;MAAEC;IAAM,CAAC,GAAGH,MAAM;IAE9B,MAAMP,CAAS,GACbU,KAAK,KAAK,MAAM,GACZ,CAAC,GACDA,KAAK,KAAK,QAAQ,GAChBF,GAAG,CAACG,KAAK,GAAG,CAAC,GACbD,KAAK,KAAK,OAAO,GACfF,GAAG,CAACG,KAAK,GACTD,KAAK;IACf,MAAMT,CAAS,GACbQ,IAAI,KAAK,KAAK,GAAG,CAAC,GAAGA,IAAI,KAAK,QAAQ,GAAGD,GAAG,CAACI,MAAM,GAAGH,IAAI;IAE5D,OAAOZ,iBAAiB,CAAC;MAAEG,CAAC;MAAEC;IAAE,CAAC,EAAkBO,GAAG,CAAC;EACzD,CAAC,MAAM,IAAID,MAAM,CAACE,IAAI,KAAK,MAAM,IAAIF,MAAM,CAACE,IAAI,KAAK,OAAO,EAAE;IAC5D,MAAM;MAAEA,IAAI;MAAEC;IAAM,CAAC,GAAGH,MAAM;IAE9B,MAAMP,CAAS,GAAGS,IAAI,KAAK,MAAM,GAAG,CAAC,GAAGA,IAAI,KAAK,OAAO,GAAGD,GAAG,CAACG,KAAK,GAAGF,IAAI;IAC3E,MAAMR,CAAS,GACbS,KAAK,KAAK,KAAK,GACX,CAAC,GACDA,KAAK,KAAK,QAAQ,GAChBF,GAAG,CAACI,MAAM,GAAG,CAAC,GACdF,KAAK,KAAK,QAAQ,GAChBF,GAAG,CAACI,MAAM,GACVF,KAAK;IAEf,OAAOb,iBAAiB,CAAC;MAAEG,CAAC;MAAEC;IAAE,CAAC,EAAkBO,GAAG,CAAC;EACzD;EAEA,OAAOX,iBAAiB,CACtB;IACEG,CAAC,EAAEQ,GAAG,CAACG,KAAK,GAAG,CAAC;IAChBV,CAAC,EAAEO,GAAG,CAACI,MAAM,GAAG;EAClB,CAAC,EACDJ,GACF,CAAC;AACH","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","names":["reactive","watch","constructAdapter","options","locale","instance","adapter","value","formats"],"sources":["../../../src/composables/date/factory.ts"],"sourcesContent":["import { reactive, watch } from 'vue';\r\n\r\nimport { LocaleModule } from '@/i18n/types';\r\n\r\nexport function constructAdapter(options: any, locale: LocaleModule) {\r\n const instance = reactive(\r\n typeof options.adapter === 'function'\r\n ? new options.adapter({\r\n locale: options.locale[locale.locale.value] ?? locale.locale.value,\r\n formats: options.formats,\r\n })\r\n : options.adapter,\r\n );\r\n\r\n watch(locale.locale, (value) => {\r\n instance.locale = options.locale[value] ?? value ?? instance.locale;\r\n });\r\n\r\n return instance;\r\n}\r\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAIrC,OAAO,SAASC,gBAAgBA,CAACC,OAAY,EAAEC,MAAoB,EAAE;EACnE,MAAMC,QAAQ,GAAGL,QAAQ,CACvB,OAAOG,OAAO,CAACG,OAAO,KAAK,UAAU,GACjC,IAAIH,OAAO,CAACG,OAAO,CAAC;IAClBF,MAAM,EAAED,OAAO,CAACC,MAAM,CAACA,MAAM,CAACA,MAAM,CAACG,KAAK,CAAC,IAAIH,MAAM,CAACA,MAAM,CAACG,KAAK;IAClEC,OAAO,EAAEL,OAAO,CAACK;EACnB,CAAC,CAAC,GACFL,OAAO,CAACG,OACd,CAAC;EAEDL,KAAK,CAACG,MAAM,CAACA,MAAM,EAAGG,KAAK,IAAK;IAC9BF,QAAQ,CAACD,MAAM,GAAGD,OAAO,CAACC,MAAM,CAACG,KAAK,CAAC,IAAIA,KAAK,IAAIF,QAAQ,CAACD,MAAM;EACrE,CAAC,CAAC;EAEF,OAAOC,QAAQ;AACjB"}
1
+ {"version":3,"file":"factory.js","names":["reactive","watch","constructAdapter","options","locale","instance","adapter","value","formats"],"sources":["../../../src/composables/date/factory.ts"],"sourcesContent":["import { reactive, watch } from 'vue';\n\nimport { LocaleModule } from '@/i18n/types';\n\nexport function constructAdapter(options: any, locale: LocaleModule) {\n const instance = reactive(\n typeof options.adapter === 'function'\n ? new options.adapter({\n locale: options.locale[locale.locale.value] ?? locale.locale.value,\n formats: options.formats,\n })\n : options.adapter,\n );\n\n watch(locale.locale, (value) => {\n instance.locale = options.locale[value] ?? value ?? instance.locale;\n });\n\n return instance;\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAIrC,OAAO,SAASC,gBAAgBA,CAACC,OAAY,EAAEC,MAAoB,EAAE;EACnE,MAAMC,QAAQ,GAAGL,QAAQ,CACvB,OAAOG,OAAO,CAACG,OAAO,KAAK,UAAU,GACjC,IAAIH,OAAO,CAACG,OAAO,CAAC;IAClBF,MAAM,EAAED,OAAO,CAACC,MAAM,CAACA,MAAM,CAACA,MAAM,CAACG,KAAK,CAAC,IAAIH,MAAM,CAACA,MAAM,CAACG,KAAK;IAClEC,OAAO,EAAEL,OAAO,CAACK;EACnB,CAAC,CAAC,GACFL,OAAO,CAACG,OACd,CAAC;EAEDL,KAAK,CAACG,MAAM,CAACA,MAAM,EAAGG,KAAK,IAAK;IAC9BF,QAAQ,CAACD,MAAM,GAAGD,OAAO,CAACC,MAAM,CAACG,KAAK,CAAC,IAAIA,KAAK,IAAIF,QAAQ,CAACD,MAAM;EACrE,CAAC,CAAC;EAEF,OAAOC,QAAQ;AACjB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["inject","useI18n","constructAdapter","configureOptions","YUYEON_DATE_KEY","Symbol","for","YUYEON_DATE_OPTIONS_KEY","createDateModule","options","locale","_options","instance","useDate","Error","i18n"],"sources":["../../../src/composables/date/index.ts"],"sourcesContent":["import { inject } from 'vue';\r\n\r\nimport { LocaleModule } from '@/i18n/types';\r\n\r\nimport { useI18n } from '../i18n';\r\nimport { constructAdapter } from './factory';\r\nimport { configureOptions } from './setting';\r\nimport { DateInstance, DateOptions } from './types';\r\n\r\nexport const YUYEON_DATE_KEY = Symbol.for('yuyeon.date');\r\nexport const YUYEON_DATE_OPTIONS_KEY = Symbol.for('yuyeon.date-options');\r\n\r\nexport function createDateModule(options: DateOptions, locale: LocaleModule) {\r\n const _options = configureOptions(options);\r\n return {\r\n options: _options,\r\n instance: constructAdapter(_options, locale),\r\n };\r\n}\r\n\r\nexport function useDate(): DateInstance {\r\n const options = inject<any>(YUYEON_DATE_OPTIONS_KEY);\r\n if (!options)\r\n throw new Error('【yuyeon】 Not found provided \"DateModule\" for options');\r\n\r\n const i18n = useI18n();\r\n\r\n return constructAdapter(options, i18n);\r\n}\r\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,KAAK;AAAC,SAIpBC,OAAO;AAAA,SACPC,gBAAgB;AAAA,SAChBC,gBAAgB;AAGzB,OAAO,MAAMC,eAAe,GAAGC,MAAM,CAACC,GAAG,CAAC,aAAa,CAAC;AACxD,OAAO,MAAMC,uBAAuB,GAAGF,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC;AAExE,OAAO,SAASE,gBAAgBA,CAACC,OAAoB,EAAEC,MAAoB,EAAE;EAC3E,MAAMC,QAAQ,GAAGR,gBAAgB,CAACM,OAAO,CAAC;EAC1C,OAAO;IACLA,OAAO,EAAEE,QAAQ;IACjBC,QAAQ,EAAEV,gBAAgB,CAACS,QAAQ,EAAED,MAAM;EAC7C,CAAC;AACH;AAEA,OAAO,SAASG,OAAOA,CAAA,EAAiB;EACtC,MAAMJ,OAAO,GAAGT,MAAM,CAAMO,uBAAuB,CAAC;EACpD,IAAI,CAACE,OAAO,EACV,MAAM,IAAIK,KAAK,CAAC,sDAAsD,CAAC;EAEzE,MAAMC,IAAI,GAAGd,OAAO,CAAC,CAAC;EAEtB,OAAOC,gBAAgB,CAACO,OAAO,EAAEM,IAAI,CAAC;AACxC"}
1
+ {"version":3,"file":"index.js","names":["inject","useI18n","constructAdapter","configureOptions","YUYEON_DATE_KEY","Symbol","for","YUYEON_DATE_OPTIONS_KEY","createDateModule","options","locale","_options","instance","useDate","Error","i18n"],"sources":["../../../src/composables/date/index.ts"],"sourcesContent":["import { inject } from 'vue';\n\nimport { LocaleModule } from '@/i18n/types';\n\nimport { useI18n } from '../i18n';\nimport { constructAdapter } from './factory';\nimport { configureOptions } from './setting';\nimport { DateInstance, DateOptions } from './types';\n\nexport const YUYEON_DATE_KEY = Symbol.for('yuyeon.date');\nexport const YUYEON_DATE_OPTIONS_KEY = Symbol.for('yuyeon.date-options');\n\nexport function createDateModule(options: DateOptions, locale: LocaleModule) {\n const _options = configureOptions(options);\n return {\n options: _options,\n instance: constructAdapter(_options, locale),\n };\n}\n\nexport function useDate(): DateInstance {\n const options = inject<any>(YUYEON_DATE_OPTIONS_KEY);\n if (!options)\n throw new Error('【yuyeon】 Not found provided \"DateModule\" for options');\n\n const i18n = useI18n();\n\n return constructAdapter(options, i18n);\n}\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,KAAK;AAAC,SAIpBC,OAAO;AAAA,SACPC,gBAAgB;AAAA,SAChBC,gBAAgB;AAGzB,OAAO,MAAMC,eAAe,GAAGC,MAAM,CAACC,GAAG,CAAC,aAAa,CAAC;AACxD,OAAO,MAAMC,uBAAuB,GAAGF,MAAM,CAACC,GAAG,CAAC,qBAAqB,CAAC;AAExE,OAAO,SAASE,gBAAgBA,CAACC,OAAoB,EAAEC,MAAoB,EAAE;EAC3E,MAAMC,QAAQ,GAAGR,gBAAgB,CAACM,OAAO,CAAC;EAC1C,OAAO;IACLA,OAAO,EAAEE,QAAQ;IACjBC,QAAQ,EAAEV,gBAAgB,CAACS,QAAQ,EAAED,MAAM;EAC7C,CAAC;AACH;AAEA,OAAO,SAASG,OAAOA,CAAA,EAAiB;EACtC,MAAMJ,OAAO,GAAGT,MAAM,CAAMO,uBAAuB,CAAC;EACpD,IAAI,CAACE,OAAO,EACV,MAAM,IAAIK,KAAK,CAAC,sDAAsD,CAAC;EAEzE,MAAMC,IAAI,GAAGd,OAAO,CAAC,CAAC;EAEtB,OAAOC,gBAAgB,CAACO,OAAO,EAAEM,IAAI,CAAC;AACxC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"setting.js","names":["localeCodesMap","mergeDeep","YuyeonDateAdapter","configureOptions","options","_options","adapter","locale"],"sources":["../../../src/composables/date/setting.ts"],"sourcesContent":["import { localeCodesMap } from '@/i18n/config';\r\nimport { mergeDeep } from '@/util/common';\r\nimport { YuyeonDateAdapter } from '@/util/date';\r\n\r\nimport type { DateOptions } from './types';\r\n\r\nexport function configureOptions(options?: DateOptions) {\r\n const _options = mergeDeep(\r\n {\r\n adapter: YuyeonDateAdapter,\r\n locale: localeCodesMap,\r\n },\r\n options,\r\n );\r\n\r\n return _options;\r\n}\r\n"],"mappings":"SAASA,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,iBAAiB;AAI1B,OAAO,SAASC,gBAAgBA,CAACC,OAAqB,EAAE;EACtD,MAAMC,QAAQ,GAAGJ,SAAS,CACxB;IACEK,OAAO,EAAEJ,iBAAiB;IAC1BK,MAAM,EAAEP;EACV,CAAC,EACDI,OACF,CAAC;EAED,OAAOC,QAAQ;AACjB"}
1
+ {"version":3,"file":"setting.js","names":["localeCodesMap","mergeDeep","YuyeonDateAdapter","configureOptions","options","_options","adapter","locale"],"sources":["../../../src/composables/date/setting.ts"],"sourcesContent":["import { localeCodesMap } from '@/i18n/config';\nimport { mergeDeep } from '@/util/common';\nimport { YuyeonDateAdapter } from '@/util/date';\n\nimport type { DateOptions } from './types';\n\nexport function configureOptions(options?: DateOptions) {\n const _options = mergeDeep(\n {\n adapter: YuyeonDateAdapter,\n locale: localeCodesMap,\n },\n options,\n );\n\n return _options;\n}\n"],"mappings":"SAASA,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,iBAAiB;AAI1B,OAAO,SAASC,gBAAgBA,CAACC,OAAqB,EAAE;EACtD,MAAMC,QAAQ,GAAGJ,SAAS,CACxB;IACEK,OAAO,EAAEJ,iBAAiB;IAC1BK,MAAM,EAAEP;EACV,CAAC,EACDI,OACF,CAAC;EAED,OAAOC,QAAQ;AACjB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/composables/date/types.ts"],"sourcesContent":["import type { DateAdapter } from '@/util/date/types';\r\n\r\nexport interface DateOptions {\r\n adapter: any;\r\n locale: Record<string, any>;\r\n formats?: Record<string, any>;\r\n}\r\n\r\nexport interface DateInstanceType {\r\n instanceType: unknown;\r\n}\r\n\r\nexport interface DateInstance<T = DateInstanceType['instanceType']>\r\n extends DateAdapter<T> {\r\n locale?: any;\r\n}\r\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/composables/date/types.ts"],"sourcesContent":["import type { DateAdapter } from '@/util/date/types';\n\nexport interface DateOptions {\n adapter: any;\n locale: Record<string, any>;\n formats?: Record<string, any>;\n}\n\nexport interface DateInstanceType {\n instanceType: unknown;\n}\n\nexport interface DateInstance<T = DateInstanceType['instanceType']>\n extends DateAdapter<T> {\n locale?: any;\n}\n"],"mappings":"","ignoreList":[]}