origam 2.41.0 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/dist/src/assets/locales/en.json +10 -1
  3. package/dist/src/assets/locales/fr.json +10 -1
  4. package/dist/src/components/Alert/OrigamAlert.vue +1 -2
  5. package/dist/src/components/Audio/OrigamAudio.vue +15 -14
  6. package/dist/src/components/Badge/OrigamBadge.vue +6 -1
  7. package/dist/src/components/Bracket/OrigamBracket.vue +5 -5
  8. package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +1 -2
  9. package/dist/src/components/Btn/OrigamBtn.vue +71 -27
  10. package/dist/src/components/Card/OrigamCard.vue +2 -1
  11. package/dist/src/components/Carousel/OrigamCarousel.vue +14 -13
  12. package/dist/src/components/Chart/OrigamChartBullet.vue +4 -1
  13. package/dist/src/components/Chart/OrigamChartPictorial.vue +3 -6
  14. package/dist/src/components/Chart/OrigamChartPolar.vue +2 -1
  15. package/dist/src/components/Chart/OrigamChartPolarBar.vue +3 -1
  16. package/dist/src/components/Chart/OrigamChartSankey.vue +9 -167
  17. package/dist/src/components/Chart/OrigamChartStreamgraph.vue +14 -12
  18. package/dist/src/components/Chart/OrigamChartSunburst.vue +10 -2
  19. package/dist/src/components/Chart/OrigamChartWordCloud.vue +39 -36
  20. package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +3 -4
  21. package/dist/src/components/Chip/OrigamChip.vue +14 -15
  22. package/dist/src/components/Chip/OrigamChipGroup.vue +2 -3
  23. package/dist/src/components/Clipboard/OrigamClipboard.vue +1 -1
  24. package/dist/src/components/Code/OrigamCode.vue +4 -2
  25. package/dist/src/components/ColorPicker/OrigamColorPicker.vue +5 -1
  26. package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +1 -2
  27. package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -2
  28. package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +1 -2
  29. package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +6 -2
  30. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +2 -4
  31. package/dist/src/components/Counter/OrigamCounter.vue +1 -0
  32. package/dist/src/components/DataTable/OrigamDataTable.vue +2 -3
  33. package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +1 -2
  34. package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +3 -2
  35. package/dist/src/components/DataTable/OrigamDataTableRow.vue +2 -3
  36. package/dist/src/components/DataTable/OrigamDataTableRows.vue +43 -39
  37. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +3 -4
  38. package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +1 -1
  39. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1 -2
  40. package/dist/src/components/Dialog/OrigamDialog.vue +1 -2
  41. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +2 -3
  42. package/dist/src/components/Field/OrigamField.vue +2 -6
  43. package/dist/src/components/FileField/OrigamFileField.vue +23 -6
  44. package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +3 -4
  45. package/dist/src/components/FileField/OrigamFileFieldListItem.vue +3 -4
  46. package/dist/src/components/Form/OrigamForm.vue +0 -2
  47. package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +7 -7
  48. package/dist/src/components/Input/OrigamInput.vue +3 -11
  49. package/dist/src/components/List/OrigamListGroup.vue +2 -3
  50. package/dist/src/components/List/OrigamListItem.vue +11 -5
  51. package/dist/src/components/Media/OrigamMediaController.vue +12 -13
  52. package/dist/src/components/Media/OrigamMediaScrubber.vue +15 -12
  53. package/dist/src/components/Media/OrigamMediaVolumeControl.vue +4 -5
  54. package/dist/src/components/Menu/OrigamMenu.vue +1 -2
  55. package/dist/src/components/NumberField/OrigamNumberField.vue +7 -10
  56. package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +7 -1
  57. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1 -1
  58. package/dist/src/components/Pagination/OrigamPagination.vue +4 -5
  59. package/dist/src/components/Parallax/OrigamParallaxElement.vue +1 -4
  60. package/dist/src/components/PasswordField/OrigamPasswordField.vue +37 -15
  61. package/dist/src/components/Progress/OrigamProgressLinear.vue +7 -6
  62. package/dist/src/components/Radio/OrigamRadio.vue +5 -2
  63. package/dist/src/components/Radio/OrigamRadioBtn.vue +7 -5
  64. package/dist/src/components/RatingField/OrigamRatingField.vue +1 -2
  65. package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +2 -3
  66. package/dist/src/components/Select/OrigamSelect.vue +174 -107
  67. package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +7 -2
  68. package/dist/src/components/Slide/OrigamSlideGroup.vue +7 -10
  69. package/dist/src/components/SliderField/OrigamSliderField.vue +1 -2
  70. package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +9 -10
  71. package/dist/src/components/Stepper/OrigamStepper.vue +7 -11
  72. package/dist/src/components/Stepper/OrigamStepperItem.vue +2 -3
  73. package/dist/src/components/Switch/OrigamSwitch.vue +0 -9
  74. package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
  75. package/dist/src/components/TextField/OrigamTextField.vue +2 -5
  76. package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -2
  77. package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +13 -14
  78. package/dist/src/components/Transition/OrigamExpandX.vue +4 -10
  79. package/dist/src/components/Transition/OrigamExpandY.vue +4 -10
  80. package/dist/src/components/Transition/OrigamSnack.vue +2 -8
  81. package/dist/src/components/Treeview/OrigamTreeviewNode.vue +24 -18
  82. package/dist/src/components/Video/OrigamVideo.vue +14 -19
  83. package/dist/src/components/Window/OrigamWindow.vue +2 -3
  84. package/dist/src/composables/Audio/use-waveform.composable.cjs +24 -19
  85. package/dist/src/composables/Audio/use-waveform.composable.js +24 -19
  86. package/dist/src/composables/Calendar/calendar.composable.cjs +11 -11
  87. package/dist/src/composables/Calendar/calendar.composable.js +1 -1
  88. package/dist/src/composables/Chart/chart.composable.cjs +541 -415
  89. package/dist/src/composables/Chart/chart.composable.d.ts +2 -5
  90. package/dist/src/composables/Chart/chart.composable.js +392 -338
  91. package/dist/src/composables/Code/code.composable.cjs +4 -4
  92. package/dist/src/composables/Code/code.composable.js +1 -1
  93. package/dist/src/composables/Commons/color.composable.cjs +106 -48
  94. package/dist/src/composables/Commons/color.composable.js +55 -48
  95. package/dist/src/composables/Commons/display.composable.cjs +7 -1
  96. package/dist/src/composables/Commons/display.composable.js +2 -2
  97. package/dist/src/composables/Commons/dragResizer.composable.cjs +11 -10
  98. package/dist/src/composables/Commons/dragResizer.composable.js +2 -1
  99. package/dist/src/composables/Commons/group.composable.cjs +17 -14
  100. package/dist/src/composables/Commons/group.composable.js +19 -15
  101. package/dist/src/composables/Commons/nested.composable.cjs +16 -16
  102. package/dist/src/composables/Commons/nested.composable.d.ts +1 -1
  103. package/dist/src/composables/Commons/nested.composable.js +1 -1
  104. package/dist/src/composables/Commons/nestedItem.composable.cjs +3 -3
  105. package/dist/src/composables/Commons/nestedItem.composable.d.ts +1 -1
  106. package/dist/src/composables/Commons/nestedItem.composable.js +1 -1
  107. package/dist/src/composables/Commons/size.composable.cjs +1 -1
  108. package/dist/src/composables/Commons/size.composable.js +1 -1
  109. package/dist/src/composables/Commons/stateEffect.composable.cjs +54 -32
  110. package/dist/src/composables/Commons/stateEffect.composable.js +43 -33
  111. package/dist/src/composables/Commons/teleport.composable.cjs +2 -1
  112. package/dist/src/composables/Commons/teleport.composable.js +4 -1
  113. package/dist/src/composables/Commons/touch.composable.cjs +77 -33
  114. package/dist/src/composables/Commons/touch.composable.js +77 -33
  115. package/dist/src/composables/Commons/vModel.composable.cjs +1 -1
  116. package/dist/src/composables/Commons/vModel.composable.js +1 -1
  117. package/dist/src/composables/Commons/validation.composable.cjs +1 -1
  118. package/dist/src/composables/Commons/validation.composable.js +1 -1
  119. package/dist/src/composables/Commons/velocity.composable.cjs +5 -1
  120. package/dist/src/composables/Commons/velocity.composable.js +5 -1
  121. package/dist/src/composables/DataTable/headers.composable.cjs +36 -30
  122. package/dist/src/composables/DataTable/headers.composable.d.ts +1 -1
  123. package/dist/src/composables/DataTable/headers.composable.js +29 -23
  124. package/dist/src/composables/DataTable/headersCell.composable.cjs +2 -2
  125. package/dist/src/composables/DataTable/headersCell.composable.js +1 -1
  126. package/dist/src/composables/DataTable/select.composable.cjs +4 -4
  127. package/dist/src/composables/DataTable/select.composable.js +1 -1
  128. package/dist/src/composables/DataTable/sort.composable.cjs +6 -6
  129. package/dist/src/composables/DataTable/sort.composable.js +1 -1
  130. package/dist/src/composables/Form/form.composable.cjs +1 -1
  131. package/dist/src/composables/Form/form.composable.js +3 -1
  132. package/dist/src/composables/Masonry/masonry.composable.cjs +29 -20
  133. package/dist/src/composables/Masonry/masonry.composable.d.ts +0 -14
  134. package/dist/src/composables/Masonry/masonry.composable.js +29 -20
  135. package/dist/src/composables/NumberFormat/number-format.composable.cjs +28 -23
  136. package/dist/src/composables/NumberFormat/number-format.composable.js +28 -23
  137. package/dist/src/composables/Parallax/parallax.composable.cjs +9 -9
  138. package/dist/src/composables/Parallax/parallax.composable.js +3 -3
  139. package/dist/src/composables/Parallax/transform.composable.cjs +14 -13
  140. package/dist/src/composables/Parallax/transform.composable.js +2 -1
  141. package/dist/src/composables/PasswordField/passwordStrength.composable.cjs +2 -2
  142. package/dist/src/composables/PasswordField/passwordStrength.composable.js +1 -1
  143. package/dist/src/composables/QrCode/qr-code.composable.cjs +1 -1
  144. package/dist/src/composables/QrCode/qr-code.composable.js +1 -1
  145. package/dist/src/composables/Sheet/sheetSwipe.composable.cjs +3 -4
  146. package/dist/src/composables/Sheet/sheetSwipe.composable.js +4 -4
  147. package/dist/src/composables/TextareaField/textarea-field-rich.composable.cjs +31 -31
  148. package/dist/src/composables/TextareaField/textarea-field-rich.composable.js +1 -1
  149. package/dist/src/composables/Watermark/watermark.composable.cjs +1 -1
  150. package/dist/src/composables/Watermark/watermark.composable.js +1 -1
  151. package/dist/src/consts/Audio/audio.const.cjs +5 -4
  152. package/dist/src/consts/Audio/audio.const.d.ts +2 -1
  153. package/dist/src/consts/Audio/audio.const.js +2 -1
  154. package/dist/src/consts/Blockquote/blockquote.const.cjs +3 -3
  155. package/dist/src/consts/Blockquote/blockquote.const.js +1 -1
  156. package/dist/src/consts/Bracket/bracket.const.cjs +4 -3
  157. package/dist/src/consts/Bracket/bracket.const.js +2 -1
  158. package/dist/src/consts/Code/code.const.cjs +3 -3
  159. package/dist/src/consts/Code/code.const.d.ts +1 -1
  160. package/dist/src/consts/Code/code.const.js +1 -1
  161. package/dist/src/consts/Commons/autocomplete.const.cjs +2 -2
  162. package/dist/src/consts/Commons/autocomplete.const.d.ts +1 -1
  163. package/dist/src/consts/Commons/autocomplete.const.js +1 -1
  164. package/dist/src/consts/Commons/display.const.cjs +2 -2
  165. package/dist/src/consts/Commons/display.const.js +1 -1
  166. package/dist/src/consts/Commons/hotkey.const.cjs +2 -2
  167. package/dist/src/consts/Commons/hotkey.const.js +1 -1
  168. package/dist/src/consts/Commons/margin.const.cjs +1 -1
  169. package/dist/src/consts/Commons/margin.const.js +1 -1
  170. package/dist/src/consts/Commons/padding.const.cjs +1 -1
  171. package/dist/src/consts/Commons/padding.const.js +1 -1
  172. package/dist/src/consts/Commons/rounded.const.cjs +6 -2
  173. package/dist/src/consts/Commons/rounded.const.js +6 -2
  174. package/dist/src/consts/EmptyState/empty-state.const.cjs +12 -12
  175. package/dist/src/consts/EmptyState/empty-state.const.js +6 -6
  176. package/dist/src/consts/PasswordField/password-field.const.cjs +20 -11
  177. package/dist/src/consts/PasswordField/password-field.const.d.ts +10 -5
  178. package/dist/src/consts/PasswordField/password-field.const.js +17 -10
  179. package/dist/src/consts/QrCode/qr-code.const.cjs +2 -2
  180. package/dist/src/consts/QrCode/qr-code.const.js +1 -1
  181. package/dist/src/consts/TextField/text-field.const.cjs +21 -21
  182. package/dist/src/consts/TextField/text-field.const.js +1 -1
  183. package/dist/src/consts/TextareaField/textarea-field.const.cjs +32 -4
  184. package/dist/src/consts/TextareaField/textarea-field.const.d.ts +1 -0
  185. package/dist/src/consts/TextareaField/textarea-field.const.js +29 -1
  186. package/dist/src/directives/Contrast/contrast.directive.cjs +5 -3
  187. package/dist/src/directives/Contrast/contrast.directive.js +5 -3
  188. package/dist/src/directives/Intersect/intersect.directive.cjs +2 -1
  189. package/dist/src/directives/Intersect/intersect.directive.js +2 -1
  190. package/dist/src/interfaces/Chart/chart.interface.d.ts +70 -1
  191. package/dist/src/interfaces/ColorPicker/color-picker.interface.d.ts +1 -1
  192. package/dist/src/interfaces/Commons/border.interface.d.ts +11 -10
  193. package/dist/src/interfaces/Commons/filters.interface.d.ts +7 -0
  194. package/dist/src/interfaces/Commons/margin.interface.d.ts +12 -11
  195. package/dist/src/interfaces/Commons/padding.interface.d.ts +12 -11
  196. package/dist/src/interfaces/Commons/ripple.interface.d.ts +1 -3
  197. package/dist/src/interfaces/Commons/rounded.interface.d.ts +10 -9
  198. package/dist/src/interfaces/DataTable/sort.interface.d.ts +6 -0
  199. package/dist/src/interfaces/Grid/grid.interface.d.ts +4 -4
  200. package/dist/src/interfaces/PasswordField/password-field.interface.d.ts +5 -1
  201. package/dist/src/interfaces/PasswordField/password-requirement.interface.d.ts +8 -0
  202. package/dist/src/interfaces/Radio/radio-btn.interface.d.ts +2 -2
  203. package/dist/src/interfaces/Radio/radio.interface.d.ts +2 -1
  204. package/dist/src/interfaces/Select/select.interface.d.ts +1 -0
  205. package/dist/src/interfaces/SelectionControl/selection-control.interface.d.ts +5 -1
  206. package/dist/src/interfaces/SliderField/slider-field.interface.d.ts +4 -4
  207. package/dist/src/origam-core.cjs +51 -33
  208. package/dist/src/origam-core.js +21 -27
  209. package/dist/src/types/Commons/box-value.type.cjs +1 -0
  210. package/dist/src/types/Commons/box-value.type.d.ts +1 -0
  211. package/dist/src/types/Commons/box-value.type.js +0 -0
  212. package/dist/src/types/Commons/location.type.d.ts +13 -0
  213. package/dist/src/types/Commons/point.type.d.ts +1 -1
  214. package/dist/src/types/DataTable/data-table.type.d.ts +1 -0
  215. package/dist/src/types/Grid/grid.type.d.ts +7 -0
  216. package/dist/src/types/SliderField/slider-field.type.d.ts +8 -0
  217. package/dist/src/utils/Bracket/bracket-surface.util.cjs +9 -2
  218. package/dist/src/utils/Bracket/bracket-surface.util.js +9 -2
  219. package/dist/src/utils/Calendar/rrule.util.cjs +12 -7
  220. package/dist/src/utils/Calendar/rrule.util.js +12 -7
  221. package/dist/src/utils/Chart/chart-point.util.cjs +15 -0
  222. package/dist/src/utils/Chart/chart-point.util.d.ts +11 -0
  223. package/dist/src/utils/Chart/chart-point.util.js +8 -0
  224. package/dist/src/utils/Chart/sankey-layout.util.cjs +144 -0
  225. package/dist/src/utils/Chart/sankey-layout.util.d.ts +27 -0
  226. package/dist/src/utils/Chart/sankey-layout.util.js +130 -0
  227. package/dist/src/utils/Code/parse-highlight-lines.util.cjs +17 -14
  228. package/dist/src/utils/Code/parse-highlight-lines.util.js +17 -14
  229. package/dist/src/utils/CommandPalette/fuzzy-match.util.cjs +13 -9
  230. package/dist/src/utils/CommandPalette/fuzzy-match.util.js +13 -9
  231. package/dist/src/utils/Commons/anchor.util.cjs +6 -1
  232. package/dist/src/utils/Commons/anchor.util.js +6 -1
  233. package/dist/src/utils/Commons/apply-mask.util.cjs +11 -14
  234. package/dist/src/utils/Commons/apply-mask.util.js +7 -10
  235. package/dist/src/utils/Commons/apply-theme.util.cjs +6 -4
  236. package/dist/src/utils/Commons/apply-theme.util.js +6 -4
  237. package/dist/src/utils/Commons/bindProps.util.cjs +3 -5
  238. package/dist/src/utils/Commons/bindProps.util.js +3 -5
  239. package/dist/src/utils/Commons/color.util.cjs +43 -36
  240. package/dist/src/utils/Commons/color.util.js +44 -31
  241. package/dist/src/utils/Commons/commons.util.cjs +3 -3
  242. package/dist/src/utils/Commons/commons.util.js +3 -3
  243. package/dist/src/utils/Commons/console.util.cjs +6 -0
  244. package/dist/src/utils/Commons/console.util.d.ts +11 -0
  245. package/dist/src/utils/Commons/console.util.js +5 -0
  246. package/dist/src/utils/Commons/date.util.cjs +2 -27
  247. package/dist/src/utils/Commons/date.util.js +2 -27
  248. package/dist/src/utils/Commons/display.util.cjs +10 -1
  249. package/dist/src/utils/Commons/display.util.d.ts +8 -1
  250. package/dist/src/utils/Commons/display.util.js +9 -1
  251. package/dist/src/utils/Commons/eventListener.util.cjs +1 -2
  252. package/dist/src/utils/Commons/eventListener.util.js +1 -2
  253. package/dist/src/utils/Commons/filters.util.cjs +48 -34
  254. package/dist/src/utils/Commons/filters.util.d.ts +3 -8
  255. package/dist/src/utils/Commons/filters.util.js +47 -34
  256. package/dist/src/utils/Commons/forwardRefs.util.cjs +44 -40
  257. package/dist/src/utils/Commons/forwardRefs.util.js +44 -40
  258. package/dist/src/utils/Commons/group.util.cjs +1 -1
  259. package/dist/src/utils/Commons/group.util.js +1 -1
  260. package/dist/src/utils/Commons/hotkey.util.cjs +65 -61
  261. package/dist/src/utils/Commons/hotkey.util.js +56 -53
  262. package/dist/src/utils/Commons/hover.util.cjs +2 -2
  263. package/dist/src/utils/Commons/hover.util.js +2 -2
  264. package/dist/src/utils/Commons/locale.util.cjs +1 -1
  265. package/dist/src/utils/Commons/locale.util.js +1 -1
  266. package/dist/src/utils/Commons/location.util.cjs +87 -92
  267. package/dist/src/utils/Commons/location.util.js +75 -83
  268. package/dist/src/utils/Commons/nested.util.cjs +11 -11
  269. package/dist/src/utils/Commons/nested.util.js +1 -1
  270. package/dist/src/utils/Commons/point.util.cjs +16 -14
  271. package/dist/src/utils/Commons/point.util.js +13 -8
  272. package/dist/src/utils/Commons/ripple.util.cjs +4 -4
  273. package/dist/src/utils/Commons/ripple.util.js +4 -4
  274. package/dist/src/utils/Commons/scroll.util.cjs +9 -6
  275. package/dist/src/utils/Commons/scroll.util.js +9 -6
  276. package/dist/src/utils/Commons/token-name.util.cjs +22 -21
  277. package/dist/src/utils/Commons/token-name.util.js +22 -21
  278. package/dist/src/utils/Commons/validate-pattern.util.cjs +6 -6
  279. package/dist/src/utils/Commons/validate-pattern.util.js +1 -1
  280. package/dist/src/utils/DataTable/headers.util.cjs +20 -26
  281. package/dist/src/utils/DataTable/headers.util.js +18 -26
  282. package/dist/src/utils/DataTable/sort.util.cjs +41 -47
  283. package/dist/src/utils/DataTable/sort.util.d.ts +2 -7
  284. package/dist/src/utils/DataTable/sort.util.js +49 -47
  285. package/dist/src/utils/List/list-item.util.cjs +6 -1
  286. package/dist/src/utils/List/list-item.util.js +6 -1
  287. package/dist/src/utils/Parallax/parallax-element.util.cjs +13 -14
  288. package/dist/src/utils/Parallax/parallax-element.util.js +10 -11
  289. package/dist/src/utils/Slide/slide-group.util.cjs +4 -4
  290. package/dist/src/utils/Slide/slide-group.util.js +4 -4
  291. package/dist/src/utils/TextareaField/html-to-markdown.util.cjs +5 -36
  292. package/dist/src/utils/TextareaField/html-to-markdown.util.js +5 -36
  293. package/dist/src/utils/TextareaField/sanitize-html.util.cjs +18 -22
  294. package/dist/src/utils/TextareaField/sanitize-html.util.js +19 -23
  295. package/dist/src/utils/index.cjs +11 -0
  296. package/dist/src/utils/index.d.ts +1 -0
  297. package/dist/src/utils/index.js +1 -0
  298. package/package.json +1 -1
@@ -8,28 +8,23 @@ exports.splitKeyCombination = splitKeyCombination;
8
8
  exports.splitKeySequence = splitKeySequence;
9
9
  var _hotkey = require("../../consts/Commons/hotkey.const.cjs");
10
10
  var _console = require("./console.util.cjs");
11
- function splitKeyCombination(combination, isInternal = false) {
12
- if (!combination) {
13
- if (!isInternal) (0, _console.consoleWarn)("Invalid hotkey combination: empty string provided");
14
- return [];
15
- }
11
+ function hasInvalidCombinationStructure(combination) {
16
12
  const startsWithPlusOrUnderscore = combination.startsWith("+") || combination.startsWith("_");
17
13
  const hasInvalidLeadingSeparator =
18
14
  // Starts with a single '+' or '_' followed by a non-separator character (e.g. '+a', '_a')
19
15
  startsWithPlusOrUnderscore && !(combination.startsWith("++") || combination.startsWith("__"));
20
- const hasInvalidStructure =
21
- // Invalid leading separator patterns
22
- combination.length > 1 && hasInvalidLeadingSeparator ||
23
- // Disallow literal + or _ keys (they require shift)
24
- combination.includes("++") || combination.includes("__") || combination === "+" || combination === "_" ||
25
- // Ends with a separator that is not part of a doubled literal
26
- combination.length > 1 && (combination.endsWith("+") || combination.endsWith("_")) && combination.at(-2) !== combination.at(-1) ||
27
- // Stand-alone doubled separators (dangling)
28
- combination === "++" || combination === "--" || combination === "__";
29
- if (hasInvalidStructure) {
30
- if (!isInternal) (0, _console.consoleWarn)(`Invalid hotkey combination: "${combination}" has invalid structure`);
31
- return [];
32
- }
16
+ return (
17
+ // Invalid leading separator patterns
18
+ combination.length > 1 && hasInvalidLeadingSeparator ||
19
+ // Disallow literal + or _ keys (they require shift)
20
+ combination.includes("++") || combination.includes("__") || combination === "+" || combination === "_" ||
21
+ // Ends with a separator that is not part of a doubled literal
22
+ combination.length > 1 && (combination.endsWith("+") || combination.endsWith("_")) && combination.at(-2) !== combination.at(-1) ||
23
+ // Stand-alone doubled separators (dangling)
24
+ combination === "++" || combination === "--" || combination === "__"
25
+ );
26
+ }
27
+ function parseCombinationKeys(combination) {
33
28
  const keys = [];
34
29
  let buffer = "";
35
30
  const flushBuffer = () => {
@@ -41,74 +36,71 @@ function splitKeyCombination(combination, isInternal = false) {
41
36
  for (let i = 0; i < combination.length; i++) {
42
37
  const char = combination[i];
43
38
  const nextChar = combination[i + 1];
44
- if (char === "+" || char === "_" || char === "-") {
45
- if (char === nextChar) {
46
- flushBuffer();
47
- keys.push(char);
48
- i++;
49
- } else if (char === "+" || char === "_") {
50
- flushBuffer();
51
- } else {
52
- buffer += char;
53
- }
39
+ const isSeparator = char === "+" || char === "_" || char === "-";
40
+ if (isSeparator && char === nextChar) {
41
+ flushBuffer();
42
+ keys.push(char);
43
+ i++;
44
+ } else if (char === "+" || char === "_") {
45
+ flushBuffer();
54
46
  } else {
55
47
  buffer += char;
56
48
  }
57
49
  }
58
50
  flushBuffer();
59
- const hasInvalidMinus = keys.some(key => key.length > 1 && key.includes("-") && key !== "--");
60
- if (hasInvalidMinus) {
61
- if (!isInternal) (0, _console.consoleWarn)(`Invalid hotkey combination: "${combination}" has invalid structure`);
51
+ return keys;
52
+ }
53
+ function splitKeyCombination(combination, isInternal = false) {
54
+ if (!combination) {
55
+ if (!isInternal) (0, _console.consoleWarn)("Invalid hotkey combination: empty string provided");
62
56
  return [];
63
57
  }
58
+ const warnInvalidStructure = () => {
59
+ if (!isInternal) (0, _console.consoleWarn)(`Invalid hotkey combination: "${combination}" has invalid structure`);
60
+ return [];
61
+ };
62
+ if (hasInvalidCombinationStructure(combination)) return warnInvalidStructure();
63
+ const keys = parseCombinationKeys(combination);
64
+ const hasInvalidMinus = keys.some(key => key.length > 1 && key.includes("-") && key !== "--");
65
+ if (hasInvalidMinus) return warnInvalidStructure();
64
66
  if (keys.length === 0 && combination) {
65
67
  return [normalizeKey(combination)];
66
68
  }
67
69
  return keys;
68
70
  }
69
- function splitKeySequence(str) {
70
- if (!str) {
71
- (0, _console.consoleWarn)("Invalid hotkey sequence: empty string provided");
72
- return [];
73
- }
71
+ function hasInvalidSequenceEdges(str) {
74
72
  const hasInvalidStart = str.startsWith("-") && !["---", "--+"].includes(str);
75
73
  const hasInvalidEnd = str.endsWith("-") && !str.endsWith("+-") && !str.endsWith("_-") && str !== "-" && str !== "---";
76
- if (hasInvalidStart || hasInvalidEnd) {
77
- (0, _console.consoleWarn)(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
78
- return [];
79
- }
74
+ return hasInvalidStart || hasInvalidEnd;
75
+ }
76
+ function isHyphenInCombination(str, i) {
77
+ const prevChar = str[i - 1];
78
+ const prevPrevChar = i > 1 ? str[i - 2] : void 0;
79
+ return (prevChar === "+" || prevChar === "_") && prevPrevChar !== "+";
80
+ }
81
+ function tokenizeSequence(str) {
80
82
  const result = [];
81
83
  let buffer = "";
82
- let i = 0;
83
- while (i < str.length) {
84
+ for (let i = 0; i < str.length; i++) {
84
85
  const char = str[i];
85
- if (char === "-") {
86
- const prevChar = str[i - 1];
87
- const prevPrevChar = i > 1 ? str[i - 2] : void 0;
88
- const precededBySinglePlusOrUnderscore = (prevChar === "+" || prevChar === "_") && prevPrevChar !== "+";
89
- if (precededBySinglePlusOrUnderscore) {
90
- buffer += char;
91
- i++;
92
- } else {
93
- if (buffer) {
94
- result.push(buffer);
95
- buffer = "";
96
- } else {
97
- result.push("-");
98
- }
99
- i++;
100
- }
101
- } else {
86
+ if (char !== "-" || isHyphenInCombination(str, i)) {
102
87
  buffer += char;
103
- i++;
88
+ } else if (buffer) {
89
+ result.push(buffer);
90
+ buffer = "";
91
+ } else {
92
+ result.push("-");
104
93
  }
105
94
  }
106
95
  if (buffer) {
107
96
  result.push(buffer);
108
97
  }
98
+ return result;
99
+ }
100
+ function collapseMinusRuns(parts) {
109
101
  const collapsed = [];
110
102
  let minusCount = 0;
111
- for (const part of result) {
103
+ for (const part of parts) {
112
104
  if (part === "-") {
113
105
  if (minusCount % 2 === 0) collapsed.push("-");
114
106
  minusCount++;
@@ -117,6 +109,18 @@ function splitKeySequence(str) {
117
109
  collapsed.push(part);
118
110
  }
119
111
  }
112
+ return collapsed;
113
+ }
114
+ function splitKeySequence(str) {
115
+ if (!str) {
116
+ (0, _console.consoleWarn)("Invalid hotkey sequence: empty string provided");
117
+ return [];
118
+ }
119
+ if (hasInvalidSequenceEdges(str)) {
120
+ (0, _console.consoleWarn)(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
121
+ return [];
122
+ }
123
+ const collapsed = collapseMinusRuns(tokenizeSequence(str));
120
124
  const areAllValid = collapsed.every(s => splitKeyCombination(s, true).length > 0);
121
125
  if (!areAllValid) {
122
126
  (0, _console.consoleWarn)(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
@@ -1,26 +1,20 @@
1
1
  import { KEYBOARD_ALIASES } from "../../consts/Commons/hotkey.const.js";
2
2
  import { consoleWarn } from "./console.util.js";
3
- export function splitKeyCombination(combination, isInternal = false) {
4
- if (!combination) {
5
- if (!isInternal) consoleWarn("Invalid hotkey combination: empty string provided");
6
- return [];
7
- }
3
+ function hasInvalidCombinationStructure(combination) {
8
4
  const startsWithPlusOrUnderscore = combination.startsWith("+") || combination.startsWith("_");
9
5
  const hasInvalidLeadingSeparator = (
10
6
  // Starts with a single '+' or '_' followed by a non-separator character (e.g. '+a', '_a')
11
7
  startsWithPlusOrUnderscore && !(combination.startsWith("++") || combination.startsWith("__"))
12
8
  );
13
- const hasInvalidStructure = (
9
+ return (
14
10
  // Invalid leading separator patterns
15
11
  combination.length > 1 && hasInvalidLeadingSeparator || // Disallow literal + or _ keys (they require shift)
16
12
  combination.includes("++") || combination.includes("__") || combination === "+" || combination === "_" || // Ends with a separator that is not part of a doubled literal
17
13
  combination.length > 1 && (combination.endsWith("+") || combination.endsWith("_")) && combination.at(-2) !== combination.at(-1) || // Stand-alone doubled separators (dangling)
18
14
  combination === "++" || combination === "--" || combination === "__"
19
15
  );
20
- if (hasInvalidStructure) {
21
- if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
22
- return [];
23
- }
16
+ }
17
+ function parseCombinationKeys(combination) {
24
18
  const keys = [];
25
19
  let buffer = "";
26
20
  const flushBuffer = () => {
@@ -32,74 +26,71 @@ export function splitKeyCombination(combination, isInternal = false) {
32
26
  for (let i = 0; i < combination.length; i++) {
33
27
  const char = combination[i];
34
28
  const nextChar = combination[i + 1];
35
- if (char === "+" || char === "_" || char === "-") {
36
- if (char === nextChar) {
37
- flushBuffer();
38
- keys.push(char);
39
- i++;
40
- } else if (char === "+" || char === "_") {
41
- flushBuffer();
42
- } else {
43
- buffer += char;
44
- }
29
+ const isSeparator = char === "+" || char === "_" || char === "-";
30
+ if (isSeparator && char === nextChar) {
31
+ flushBuffer();
32
+ keys.push(char);
33
+ i++;
34
+ } else if (char === "+" || char === "_") {
35
+ flushBuffer();
45
36
  } else {
46
37
  buffer += char;
47
38
  }
48
39
  }
49
40
  flushBuffer();
50
- const hasInvalidMinus = keys.some((key) => key.length > 1 && key.includes("-") && key !== "--");
51
- if (hasInvalidMinus) {
52
- if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
41
+ return keys;
42
+ }
43
+ export function splitKeyCombination(combination, isInternal = false) {
44
+ if (!combination) {
45
+ if (!isInternal) consoleWarn("Invalid hotkey combination: empty string provided");
53
46
  return [];
54
47
  }
48
+ const warnInvalidStructure = () => {
49
+ if (!isInternal) consoleWarn(`Invalid hotkey combination: "${combination}" has invalid structure`);
50
+ return [];
51
+ };
52
+ if (hasInvalidCombinationStructure(combination)) return warnInvalidStructure();
53
+ const keys = parseCombinationKeys(combination);
54
+ const hasInvalidMinus = keys.some((key) => key.length > 1 && key.includes("-") && key !== "--");
55
+ if (hasInvalidMinus) return warnInvalidStructure();
55
56
  if (keys.length === 0 && combination) {
56
57
  return [normalizeKey(combination)];
57
58
  }
58
59
  return keys;
59
60
  }
60
- export function splitKeySequence(str) {
61
- if (!str) {
62
- consoleWarn("Invalid hotkey sequence: empty string provided");
63
- return [];
64
- }
61
+ function hasInvalidSequenceEdges(str) {
65
62
  const hasInvalidStart = str.startsWith("-") && !["---", "--+"].includes(str);
66
63
  const hasInvalidEnd = str.endsWith("-") && !str.endsWith("+-") && !str.endsWith("_-") && str !== "-" && str !== "---";
67
- if (hasInvalidStart || hasInvalidEnd) {
68
- consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
69
- return [];
70
- }
64
+ return hasInvalidStart || hasInvalidEnd;
65
+ }
66
+ function isHyphenInCombination(str, i) {
67
+ const prevChar = str[i - 1];
68
+ const prevPrevChar = i > 1 ? str[i - 2] : void 0;
69
+ return (prevChar === "+" || prevChar === "_") && prevPrevChar !== "+";
70
+ }
71
+ function tokenizeSequence(str) {
71
72
  const result = [];
72
73
  let buffer = "";
73
- let i = 0;
74
- while (i < str.length) {
74
+ for (let i = 0; i < str.length; i++) {
75
75
  const char = str[i];
76
- if (char === "-") {
77
- const prevChar = str[i - 1];
78
- const prevPrevChar = i > 1 ? str[i - 2] : void 0;
79
- const precededBySinglePlusOrUnderscore = (prevChar === "+" || prevChar === "_") && prevPrevChar !== "+";
80
- if (precededBySinglePlusOrUnderscore) {
81
- buffer += char;
82
- i++;
83
- } else {
84
- if (buffer) {
85
- result.push(buffer);
86
- buffer = "";
87
- } else {
88
- result.push("-");
89
- }
90
- i++;
91
- }
92
- } else {
76
+ if (char !== "-" || isHyphenInCombination(str, i)) {
93
77
  buffer += char;
94
- i++;
78
+ } else if (buffer) {
79
+ result.push(buffer);
80
+ buffer = "";
81
+ } else {
82
+ result.push("-");
95
83
  }
96
84
  }
97
85
  if (buffer) {
98
86
  result.push(buffer);
99
87
  }
88
+ return result;
89
+ }
90
+ function collapseMinusRuns(parts) {
100
91
  const collapsed = [];
101
92
  let minusCount = 0;
102
- for (const part of result) {
93
+ for (const part of parts) {
103
94
  if (part === "-") {
104
95
  if (minusCount % 2 === 0) collapsed.push("-");
105
96
  minusCount++;
@@ -108,6 +99,18 @@ export function splitKeySequence(str) {
108
99
  collapsed.push(part);
109
100
  }
110
101
  }
102
+ return collapsed;
103
+ }
104
+ export function splitKeySequence(str) {
105
+ if (!str) {
106
+ consoleWarn("Invalid hotkey sequence: empty string provided");
107
+ return [];
108
+ }
109
+ if (hasInvalidSequenceEdges(str)) {
110
+ consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
111
+ return [];
112
+ }
113
+ const collapsed = collapseMinusRuns(tokenizeSequence(str));
111
114
  const areAllValid = collapsed.every((s) => splitKeyCombination(s, true).length > 0);
112
115
  if (!areAllValid) {
113
116
  consoleWarn(`Invalid hotkey sequence: "${str}" contains invalid combinations`);
@@ -66,8 +66,8 @@ function hoverShow(e) {
66
66
  if ((0, _ripple.isTouchEvent)(e)) {
67
67
  element._hover.touched = true;
68
68
  element._hover.isTouch = true;
69
- } else {
70
- if (element._hover.isTouch) return;
69
+ } else if (element._hover.isTouch) {
70
+ return;
71
71
  }
72
72
  if (element._hover.class) {
73
73
  value.class = element._hover.class;
@@ -42,8 +42,8 @@ export function hoverShow(e) {
42
42
  if (isTouchEvent(e)) {
43
43
  element._hover.touched = true;
44
44
  element._hover.isTouch = true;
45
- } else {
46
- if (element._hover.isTouch) return;
45
+ } else if (element._hover.isTouch) {
46
+ return;
47
47
  }
48
48
  if (element._hover.class) {
49
49
  value.class = element._hover.class;
@@ -12,7 +12,7 @@ var _vModel = require("../../composables/Commons/vModel.composable.cjs");
12
12
  function callI18nT(fn, key, params) {
13
13
  if (typeof key !== "string" || !key) return key;
14
14
  if (!params.length) return fn(key);
15
- const list = params.map(p => p == null ? "" : p);
15
+ const list = params.map(p => p ?? "");
16
16
  return fn(key, list);
17
17
  }
18
18
  function createVueI18nAdapter({
@@ -3,7 +3,7 @@ import { useVModel } from "../../composables/Commons/vModel.composable.js";
3
3
  function callI18nT(fn, key, params) {
4
4
  if (typeof key !== "string" || !key) return key;
5
5
  if (!params.length) return fn(key);
6
- const list = params.map((p) => p == null ? "" : p);
6
+ const list = params.map((p) => p ?? "");
7
7
  return fn(key, list);
8
8
  }
9
9
  export function createVueI18nAdapter({ i18n, useI18n }) {
@@ -34,7 +34,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
34
34
  preferredOrigin
35
35
  } = (0, _commons.destructComputed)(() => {
36
36
  const parsedAnchor = (0, _anchor.parseAnchor)(props.location);
37
- const parsedOrigin = props.origin === "overlap" ? parsedAnchor : props.origin === "auto" ? (0, _anchor.flipSide)(parsedAnchor) : (0, _anchor.parseAnchor)(props.origin);
37
+ const parsedOrigin = resolveOrigin(props.origin, parsedAnchor);
38
38
  if (parsedAnchor.side === parsedOrigin.side && parsedAnchor.align === (0, _anchor.flipAlign)(parsedOrigin).align) {
39
39
  return {
40
40
  preferredAnchor: (0, _anchor.flipCorner)(parsedAnchor),
@@ -107,24 +107,7 @@ function connectedLocationStrategy(data, props, contentStyles) {
107
107
  contentBox.y -= parseFloat(document.documentElement.style.getPropertyValue("--origam-body-scroll-y") || "0");
108
108
  }
109
109
  }
110
- const viewport = scrollParents.reduce((box, el) => {
111
- const rect = el.getBoundingClientRect();
112
- const scrollBox = new _box.Box({
113
- x: el === document.documentElement ? 0 : rect.x,
114
- y: el === document.documentElement ? 0 : rect.y,
115
- width: el.clientWidth,
116
- height: el.clientHeight
117
- });
118
- if (box) {
119
- return new _box.Box({
120
- x: Math.max(box.left, scrollBox.left),
121
- y: Math.max(box.top, scrollBox.top),
122
- width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),
123
- height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top)
124
- });
125
- }
126
- return scrollBox;
127
- }, void 0);
110
+ const viewport = intersectScrollParents(scrollParents);
128
111
  viewport.x += viewportMargin;
129
112
  viewport.y += viewportMargin;
130
113
  viewport.width -= viewportMargin * 2;
@@ -141,34 +124,8 @@ function connectedLocationStrategy(data, props, contentStyles) {
141
124
  x: x2,
142
125
  y: y2
143
126
  } = (0, _point.getOffset)(targetPoint, contentPoint);
144
- switch (_placement.anchor.side) {
145
- case "top":
146
- y2 -= offset.value[0];
147
- break;
148
- case "bottom":
149
- y2 += offset.value[0];
150
- break;
151
- case "left":
152
- x2 -= offset.value[0];
153
- break;
154
- case "right":
155
- x2 += offset.value[0];
156
- break;
157
- }
158
- switch (_placement.anchor.align) {
159
- case "top":
160
- y2 -= offset.value[1];
161
- break;
162
- case "bottom":
163
- y2 += offset.value[1];
164
- break;
165
- case "left":
166
- x2 -= offset.value[1];
167
- break;
168
- case "right":
169
- x2 += offset.value[1];
170
- break;
171
- }
127
+ [x2, y2] = applyEdgeOffset(x2, y2, _placement.anchor.side, offset.value[0]);
128
+ [x2, y2] = applyEdgeOffset(x2, y2, _placement.anchor.align, offset.value[1]);
172
129
  box.x += x2;
173
130
  box.y += y2;
174
131
  box.width = Math.min(box.width, maxWidth.value);
@@ -205,51 +162,13 @@ function connectedLocationStrategy(data, props, contentStyles) {
205
162
  y += _y;
206
163
  contentBox.x += _x;
207
164
  contentBox.y += _y;
208
- {
209
- const axis2 = (0, _anchor.getAxis)(placement.anchor);
210
- const hasOverflowX = overflows.x.before || overflows.x.after;
211
- const hasOverflowY = overflows.y.before || overflows.y.after;
212
- let reset = false;
213
- [_drag.AXIS.X, _drag.AXIS.Y].forEach(key => {
214
- if (key === _drag.AXIS.X && hasOverflowX && !flipped.x || key === _drag.AXIS.Y && hasOverflowY && !flipped.y) {
215
- const newPlacement = {
216
- anchor: {
217
- ...placement.anchor
218
- },
219
- origin: {
220
- ...placement.origin
221
- }
222
- };
223
- const flip = key === _drag.AXIS.X ? axis2 === _drag.AXIS.Y ? _anchor.flipAlign : _anchor.flipSide : axis2 === _drag.AXIS.Y ? _anchor.flipSide : _anchor.flipAlign;
224
- newPlacement.anchor = flip(newPlacement.anchor);
225
- newPlacement.origin = flip(newPlacement.origin);
226
- const {
227
- overflows: newOverflows
228
- } = checkOverflow(newPlacement);
229
- if (newOverflows[key].before <= overflows[key].before && newOverflows[key].after <= overflows[key].after || newOverflows[key].before + newOverflows[key].after < (overflows[key].before + overflows[key].after) / 2) {
230
- placement = newPlacement;
231
- reset = flipped[key] = true;
232
- }
233
- }
234
- });
235
- if (reset) continue;
236
- }
237
- if (overflows.x.before) {
238
- x += overflows.x.before;
239
- contentBox.x += overflows.x.before;
240
- }
241
- if (overflows.x.after) {
242
- x -= overflows.x.after;
243
- contentBox.x -= overflows.x.after;
244
- }
245
- if (overflows.y.before) {
246
- y += overflows.y.before;
247
- contentBox.y += overflows.y.before;
248
- }
249
- if (overflows.y.after) {
250
- y -= overflows.y.after;
251
- contentBox.y -= overflows.y.after;
252
- }
165
+ const flip = flipPlacement(placement, overflows, flipped, checkOverflow);
166
+ placement = flip.placement;
167
+ if (flip.reset) continue;
168
+ x = shiftAxis(x, overflows.x);
169
+ contentBox.x = shiftAxis(contentBox.x, overflows.x);
170
+ y = shiftAxis(y, overflows.y);
171
+ contentBox.y = shiftAxis(contentBox.y, overflows.y);
253
172
  {
254
173
  const overflows2 = (0, _box2.getOverflow)(contentBox, viewport);
255
174
  available.x = viewport.width - overflows2.x.before - overflows2.x.after;
@@ -299,6 +218,82 @@ function connectedLocationStrategy(data, props, contentStyles) {
299
218
  updateLocation
300
219
  };
301
220
  }
221
+ function resolveOrigin(origin, anchor) {
222
+ if (origin === "overlap") return anchor;
223
+ if (origin === "auto") return (0, _anchor.flipSide)(anchor);
224
+ return (0, _anchor.parseAnchor)(origin);
225
+ }
226
+ function intersectScrollParents(scrollParents) {
227
+ return scrollParents.reduce((box, el) => {
228
+ const rect = el.getBoundingClientRect();
229
+ const scrollBox = new _box.Box({
230
+ x: el === document.documentElement ? 0 : rect.x,
231
+ y: el === document.documentElement ? 0 : rect.y,
232
+ width: el.clientWidth,
233
+ height: el.clientHeight
234
+ });
235
+ if (box) {
236
+ return new _box.Box({
237
+ x: Math.max(box.left, scrollBox.left),
238
+ y: Math.max(box.top, scrollBox.top),
239
+ width: Math.min(box.right, scrollBox.right) - Math.max(box.left, scrollBox.left),
240
+ height: Math.min(box.bottom, scrollBox.bottom) - Math.max(box.top, scrollBox.top)
241
+ });
242
+ }
243
+ return scrollBox;
244
+ }, void 0);
245
+ }
246
+ function applyEdgeOffset(x, y, edge, amount) {
247
+ switch (edge) {
248
+ case "top":
249
+ return [x, y - amount];
250
+ case "bottom":
251
+ return [x, y + amount];
252
+ case "left":
253
+ return [x - amount, y];
254
+ case "right":
255
+ return [x + amount, y];
256
+ default:
257
+ return [x, y];
258
+ }
259
+ }
260
+ function shiftAxis(value, overflow) {
261
+ if (overflow.before) value += overflow.before;
262
+ if (overflow.after) value -= overflow.after;
263
+ return value;
264
+ }
265
+ function flipPlacement(initial, overflows, flipped, checkOverflow) {
266
+ let placement = initial;
267
+ let reset = false;
268
+ const axis = (0, _anchor.getAxis)(placement.anchor);
269
+ const hasOverflow = {
270
+ x: overflows.x.before || overflows.x.after,
271
+ y: overflows.y.before || overflows.y.after
272
+ };
273
+ for (const key of [_drag.AXIS.X, _drag.AXIS.Y]) {
274
+ if (!hasOverflow[key] || flipped[key]) continue;
275
+ const flip = key === _drag.AXIS.X === (axis === _drag.AXIS.Y) ? _anchor.flipAlign : _anchor.flipSide;
276
+ const newPlacement = {
277
+ anchor: flip({
278
+ ...placement.anchor
279
+ }),
280
+ origin: flip({
281
+ ...placement.origin
282
+ })
283
+ };
284
+ const {
285
+ overflows: newOverflows
286
+ } = checkOverflow(newPlacement);
287
+ if (newOverflows[key].before <= overflows[key].before && newOverflows[key].after <= overflows[key].after || newOverflows[key].before + newOverflows[key].after < (overflows[key].before + overflows[key].after) / 2) {
288
+ placement = newPlacement;
289
+ reset = flipped[key] = true;
290
+ }
291
+ }
292
+ return {
293
+ placement,
294
+ reset
295
+ };
296
+ }
302
297
  function getIntrinsicSize(el) {
303
298
  el.style.removeProperty("right");
304
299
  const contentBox = (0, _animation.nullifyTransforms)(el);