@onereach/ui-components 6.2.0-beta.3286.0 → 6.2.0-beta.3294.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 (549) hide show
  1. package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +1 -1
  2. package/dist/bundled/v2/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
  3. package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +1 -1
  4. package/dist/bundled/v2/components/OrCode/OrCode.js +3 -3
  5. package/dist/bundled/v2/components/OrCode/index.js +5 -4
  6. package/dist/bundled/v2/components/OrCode/lang.js +5 -5
  7. package/dist/bundled/v2/components/OrCode/libs.js +5 -4
  8. package/dist/bundled/v2/components/OrCode/theme.js +1 -1
  9. package/dist/bundled/v2/components/OrCodeV3/OrCode.js +8 -8
  10. package/dist/bundled/v2/components/OrCodeV3/index.js +3 -2
  11. package/dist/bundled/v2/components/OrCodeV3/libs.d.ts +2 -1
  12. package/dist/bundled/v2/components/OrCodeV3/libs.js +3 -2
  13. package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +2 -2
  14. package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +3 -3
  15. package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +3 -3
  16. package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +2 -2
  17. package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +1 -1
  18. package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +3 -3
  19. package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +1 -1
  20. package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +1 -1
  21. package/dist/bundled/v2/components/OrModal/OrModal.js +2 -2
  22. package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
  23. package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +1 -1
  24. package/dist/bundled/v2/components/OrPassword/OrPassword.js +1 -1
  25. package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +1 -1
  26. package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +1 -1
  27. package/dist/bundled/v2/components/OrSearch/OrSearch.js +1 -1
  28. package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +1 -1
  29. package/dist/bundled/v2/components/OrSelect/OrSelect.js +1 -1
  30. package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +1 -1
  31. package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +1 -1
  32. package/dist/bundled/v2/components/OrSlider/OrSlider.js +1 -1
  33. package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +1 -1
  34. package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
  35. package/dist/bundled/v2/components/OrTextarea/OrTextarea.vue.d.ts +2 -2
  36. package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
  37. package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
  38. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +2 -2
  39. package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +2 -2
  40. package/dist/bundled/v2/components/OrToast/OrToast.vue.d.ts +2 -2
  41. package/dist/bundled/v2/components/OrToast/Timer.js +1 -1
  42. package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +2 -2
  43. package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +1 -1
  44. package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +1 -1
  45. package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
  46. package/dist/bundled/v2/components/OrToastV3/Timer.js +1 -1
  47. package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +2 -2
  48. package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
  49. package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
  50. package/dist/bundled/v2/components/OrTreeV3/OrTree.js +1 -1
  51. package/dist/bundled/v2/components/OrTreeV3/OrTree.vue.d.ts +2 -2
  52. package/dist/bundled/v2/components/index.js +6 -5
  53. package/dist/bundled/v2/hooks/useOverflow.js +1 -1
  54. package/dist/bundled/v2/hooks/usePopoverState.js +1 -1
  55. package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +1 -1
  56. package/dist/bundled/v2/{index-509d77a1.js → index-048e41ad.js} +1 -1
  57. package/dist/bundled/v2/{index-5ee42d1f.js → index-0789b976.js} +2 -2
  58. package/dist/bundled/v2/index-0ad0f605.js +826 -0
  59. package/dist/bundled/v2/{index-5ce3ef85.js → index-379ec85d.js} +10 -831
  60. package/dist/bundled/{v3/index-22f7d3aa.js → v2/index-5e5d18d5.js} +3 -3
  61. package/dist/bundled/{v3/index-792c62f6.js → v2/index-7211e1c5.js} +2 -2
  62. package/dist/bundled/{v3/index-500b3ace.js → v2/index-82718479.js} +1 -1
  63. package/dist/bundled/v2/{index-f31843f4.js → index-9e0bdde8.js} +2 -2
  64. package/dist/bundled/v2/{index-61aeae22.js → index-b261a47e.js} +348 -292
  65. package/dist/bundled/v2/{index-c26082b9.js → index-c321391a.js} +1 -1
  66. package/dist/bundled/v2/{index-648acd9e.js → index-d02cdc81.js} +1 -1
  67. package/dist/bundled/{v3/index-84ea2fc8.js → v2/index-ea7a689d.js} +4 -4
  68. package/dist/bundled/v2/index.js +6 -5
  69. package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-4adbc880.js → OrBottomSheet.vue_vue_type_script_lang-33bfe3c4.js} +2 -2
  70. package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-22b24f8b.js → OrButton.vue_vue_type_script_lang-85f1cb3f.js} +1 -1
  71. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-3c786697.js → OrCardCollection.vue_vue_type_script_lang-0ba13713.js} +3 -3
  72. package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-ac7e801f.js → OrCardCollection.vue_vue_type_script_lang-fe769106.js} +1 -1
  73. package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-ca6ba786.js → OrCheckboxGroup.vue_vue_type_script_lang-c05088ee.js} +1 -1
  74. package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-d3ed803b.js → OrCheckboxTree.vue_vue_type_script_lang-bd0fa916.js} +2 -2
  75. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-8c5b4f6e.js → OrCode.vue_vue_type_script_lang-1df17839.js} +4 -4
  76. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-b46a0f8a.js → OrCode.vue_vue_type_script_lang-ad985f8f.js} +10 -10
  77. package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-7b6d1e64.js → OrColorPicker.vue_vue_type_script_lang-153ef60d.js} +2 -2
  78. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-1c8833a9.js → OrConfirm.vue_vue_type_script_lang-808367f7.js} +4 -4
  79. package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-cd1e7075.js → OrConfirm.vue_vue_type_script_lang-cf909881.js} +6 -6
  80. package/dist/bundled/v3/{OrContextMenu.vue_vue_type_script_lang-db980d2e.js → OrContextMenu.vue_vue_type_script_lang-b4e0569b.js} +1 -1
  81. package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-715f99d5.js → OrDatePicker.vue_vue_type_script_lang-b1130337.js} +4 -4
  82. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-94d71788.js → OrDateTimePicker.vue_vue_type_script_lang-37b1996e.js} +5 -5
  83. package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-2a292787.js → OrDateTimePicker.vue_vue_type_script_lang-98f80113.js} +1 -1
  84. package/dist/bundled/v3/{OrDateTimePickerMonthSelect-f2744b4e.js → OrDateTimePickerMonthSelect-7fcfccdf.js} +3 -3
  85. package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-daa7e47b.js → OrDateTimePickerPopoverHeader-78fe6852.js} +1 -1
  86. package/dist/bundled/v3/{OrDateTimePickerTimeSelect-96c4d657.js → OrDateTimePickerTimeSelect-56bff361.js} +1 -1
  87. package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-e11abdcc.js → OrIconButton.vue_vue_type_script_lang-20210ebe.js} +1 -1
  88. package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-120b4dae.js → OrInlineInput.vue_vue_type_script_lang-e78cacec.js} +1 -1
  89. package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-e5151109.js → OrInlineTextEdit.vue_vue_type_script_lang-d7f24fd6.js} +1 -1
  90. package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-ebe8d51d.js → OrInlineTextarea.vue_vue_type_script_lang-e69604e1.js} +1 -1
  91. package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-7d7ad741.js → OrInput.vue_vue_type_script_lang-4c9af1b9.js} +2 -2
  92. package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-0395ad21.js → OrLoader.vue_vue_type_script_lang-b0347c70.js} +1 -1
  93. package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-97b33dae.js → OrMenu.vue_vue_type_script_lang-80d3a47b.js} +1 -1
  94. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-7f46b47e.js → OrModal.vue_vue_type_script_lang-22ca96e3.js} +2 -2
  95. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-8d01d297.js → OrModal.vue_vue_type_script_lang-fe9b0d62.js} +2 -2
  96. package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-2bf01716.js → OrNotification.vue_vue_type_script_lang-bb93ca64.js} +1 -1
  97. package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-f8e4a5b8.js → OrOverflowMenu.vue_vue_type_script_lang-ab2d6d33.js} +2 -2
  98. package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-2da128a3.js → OrOverlay.vue_vue_type_script_lang-7e9b1817.js} +1 -1
  99. package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-729c913f.js → OrPagination.vue_vue_type_script_lang-6e3a561d.js} +2 -2
  100. package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-e85c91c4.js → OrPassword.vue_vue_type_script_lang-fc8438a8.js} +1 -1
  101. package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-3aed1b31.js → OrPopover.vue_vue_type_script_lang-b6dba09f.js} +2 -2
  102. package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-32e6da23.js → OrProgress.vue_vue_type_script_lang-78c933d7.js} +1 -1
  103. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-57162ecf.js → OrSearch.vue_vue_type_script_lang-981f3cf0.js} +1 -1
  104. package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-8470f57f.js → OrSearch.vue_vue_type_script_lang-9e5da97d.js} +2 -2
  105. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-e2818b8e.js → OrSelect.vue_vue_type_script_lang-d496bc7b.js} +1 -1
  106. package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-d95a1d66.js → OrSelect.vue_vue_type_script_lang-f651614d.js} +5 -5
  107. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-b12bca44.js → OrSidebar.vue_vue_type_script_lang-3ea9752f.js} +2 -2
  108. package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-81941fe6.js → OrSidebar.vue_vue_type_script_lang-f5d46ede.js} +1 -1
  109. package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-1632008b.js → OrSlider.vue_vue_type_script_lang-ef8699ca.js} +1 -1
  110. package/dist/bundled/v3/{OrSorting.vue_vue_type_script_lang-115be0a4.js → OrSorting.vue_vue_type_script_lang-7496f136.js} +2 -2
  111. package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-a2f28112.js → OrSwitch.vue_vue_type_script_lang-51b857e2.js} +1 -1
  112. package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-e90c3291.js → OrTabs.vue_vue_type_script_lang-2e57804a.js} +2 -2
  113. package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-8fc22835.js → OrTag.vue_vue_type_script_lang-b66887dd.js} +1 -1
  114. package/dist/bundled/v3/{OrTagInput.vue_vue_type_script_lang-f453ac36.js → OrTagInput.vue_vue_type_script_lang-a00eb885.js} +2 -2
  115. package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-422cbf86.js → OrTags.vue_vue_type_script_lang-938b34b7.js} +3 -3
  116. package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-59a1b975.js → OrTimePicker.vue_vue_type_script_lang-8c297fdd.js} +4 -4
  117. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-8544ff72.js → OrToastContainer.vue_vue_type_script_lang-07b75b00.js} +1 -1
  118. package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-71a39d2d.js → OrToastContainer.vue_vue_type_script_lang-8d3ed93a.js} +1 -1
  119. package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-fbacc740.js → OrTooltip.vue_vue_type_script_lang-81dbde5d.js} +1 -1
  120. package/dist/bundled/v3/{OrTree.vue_vue_type_script_lang-ffd5fbc3.js → OrTree.vue_vue_type_script_lang-bd439beb.js} +2 -2
  121. package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +26 -11
  122. package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +22 -7
  123. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
  124. package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +568 -25
  125. package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.d.ts +1 -1
  126. package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
  127. package/dist/bundled/v3/components/OrBottomSheetV3/index.js +1 -1
  128. package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +51 -16
  129. package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +57 -20
  130. package/dist/bundled/v3/components/OrButtonV3/OrButton.js +2 -2
  131. package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +35 -15
  132. package/dist/bundled/v3/components/OrButtonV3/index.js +1 -1
  133. package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +15 -7
  134. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +2 -2
  135. package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +47 -21
  136. package/dist/bundled/v3/components/OrCardCollection/index.js +1 -1
  137. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +2 -2
  138. package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +44 -17
  139. package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
  140. package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +7 -4
  141. package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +35 -15
  142. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
  143. package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +24 -6
  144. package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +1 -1
  145. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
  146. package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +43 -17
  147. package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
  148. package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +53 -23
  149. package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +25 -9
  150. package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +51 -24
  151. package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
  152. package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +69 -24
  153. package/dist/bundled/v3/components/OrCode/index.js +6 -5
  154. package/dist/bundled/v3/components/OrCode/lang.js +5 -5
  155. package/dist/bundled/v3/components/OrCode/libs.js +5 -4
  156. package/dist/bundled/v3/components/OrCode/theme.js +1 -1
  157. package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
  158. package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +83 -33
  159. package/dist/bundled/v3/components/OrCodeV3/index.js +4 -3
  160. package/dist/bundled/v3/components/OrCodeV3/libs.d.ts +2 -1
  161. package/dist/bundled/v3/components/OrCodeV3/libs.js +3 -2
  162. package/dist/bundled/v3/components/OrCollapse/OrCollapse.vue.d.ts +39 -17
  163. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +2 -2
  164. package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +31 -13
  165. package/dist/bundled/v3/components/OrColorPicker/index.js +1 -1
  166. package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +30 -8
  167. package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +2 -2
  168. package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +84 -23
  169. package/dist/bundled/v3/components/OrConfirm/index.js +1 -1
  170. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +2 -2
  171. package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +91 -30
  172. package/dist/bundled/v3/components/OrConfirmV3/index.js +1 -1
  173. package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.js +2 -2
  174. package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.vue.d.ts +27 -13
  175. package/dist/bundled/v3/components/OrContextMenuV3/index.js +1 -1
  176. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +2 -2
  177. package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +83 -88
  178. package/dist/bundled/v3/components/OrDatePickerV3/index.js +1 -1
  179. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +2 -2
  180. package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +177 -68
  181. package/dist/bundled/v3/components/OrDateTimePicker/index.js +1 -1
  182. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +2 -2
  183. package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +109 -94
  184. package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +1 -1
  185. package/dist/bundled/v3/components/OrEmptyStateV3/OrEmptyState.vue.d.ts +28 -11
  186. package/dist/bundled/v3/components/OrError/OrError.vue.d.ts +8 -4
  187. package/dist/bundled/v3/components/OrErrorTagV3/OrErrorTag.vue.d.ts +7 -4
  188. package/dist/bundled/v3/components/OrErrorV3/OrError.vue.d.ts +18 -9
  189. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.js +2 -2
  190. package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +39 -16
  191. package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +1 -1
  192. package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +20 -8
  193. package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +46 -15
  194. package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +30 -10
  195. package/dist/bundled/v3/components/OrHint/OrHint.vue.d.ts +8 -4
  196. package/dist/bundled/v3/components/OrHintV3/OrHint.vue.d.ts +18 -9
  197. package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +44 -16
  198. package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +43 -13
  199. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +2 -2
  200. package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +54 -16
  201. package/dist/bundled/v3/components/OrIconButtonV3/index.js +1 -1
  202. package/dist/bundled/v3/components/OrIconV3/OrIcon.vue.d.ts +18 -7
  203. package/dist/bundled/v3/components/OrInlineInputBoxV3/OrInlineInputBox.vue.d.ts +16 -7
  204. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +2 -2
  205. package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +83 -39
  206. package/dist/bundled/v3/components/OrInlineInputV3/index.js +1 -1
  207. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
  208. package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +95 -43
  209. package/dist/bundled/v3/components/OrInlineTextEdit/index.js +1 -1
  210. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
  211. package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +79 -39
  212. package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +1 -1
  213. package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +87 -36
  214. package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +22 -7
  215. package/dist/bundled/v3/components/OrInputV3/OrInput.js +2 -2
  216. package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +88 -38
  217. package/dist/bundled/v3/components/OrInputV3/index.js +1 -1
  218. package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +20 -9
  219. package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +26 -9
  220. package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +24 -7
  221. package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +47 -21
  222. package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +27 -11
  223. package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +26 -10
  224. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +2 -2
  225. package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +34 -13
  226. package/dist/bundled/v3/components/OrLoaderV3/index.js +1 -1
  227. package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +34 -13
  228. package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +2 -2
  229. package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +33 -15
  230. package/dist/bundled/v3/components/OrMenuV3/index.js +1 -1
  231. package/dist/bundled/v3/components/OrModal/OrModal.js +2 -2
  232. package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +38 -14
  233. package/dist/bundled/v3/components/OrModal/index.js +1 -1
  234. package/dist/bundled/v3/components/OrModalV3/OrModal.js +2 -2
  235. package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +25 -13
  236. package/dist/bundled/v3/components/OrModalV3/index.js +1 -1
  237. package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +27 -9
  238. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +2 -2
  239. package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +20 -9
  240. package/dist/bundled/v3/components/OrNotificationV3/index.js +1 -1
  241. package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +70 -24
  242. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
  243. package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +31 -13
  244. package/dist/bundled/v3/components/OrOverflowMenu/index.js +1 -1
  245. package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +16 -6
  246. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +2 -2
  247. package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +14 -7
  248. package/dist/bundled/v3/components/OrOverlayV3/index.js +1 -1
  249. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +2 -2
  250. package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +75 -27
  251. package/dist/bundled/v3/components/OrPaginationV3/index.js +1 -1
  252. package/dist/bundled/v3/components/OrPassword/OrPassword.js +2 -2
  253. package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +63 -22
  254. package/dist/bundled/v3/components/OrPassword/index.js +1 -1
  255. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +2 -2
  256. package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +92 -32
  257. package/dist/bundled/v3/components/OrPopoverV3/index.js +1 -1
  258. package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +56 -20
  259. package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +2 -2
  260. package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +62 -25
  261. package/dist/bundled/v3/components/OrProgressV3/index.js +1 -1
  262. package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +35 -13
  263. package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.vue.d.ts +26 -9
  264. package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +32 -6
  265. package/dist/bundled/v3/components/OrRadioV3/OrRadio.vue.d.ts +49 -21
  266. package/dist/bundled/v3/components/OrSearch/OrSearch.js +2 -2
  267. package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +65 -23
  268. package/dist/bundled/v3/components/OrSearch/index.js +1 -1
  269. package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +2 -2
  270. package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +41 -17
  271. package/dist/bundled/v3/components/OrSearchV3/index.js +1 -1
  272. package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +25 -9
  273. package/dist/bundled/v3/components/OrSelect/OrSelect.js +2 -2
  274. package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +77 -28
  275. package/dist/bundled/v3/components/OrSelect/index.js +1 -1
  276. package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +2 -2
  277. package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +133 -44
  278. package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
  279. package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +2 -2
  280. package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +33 -14
  281. package/dist/bundled/v3/components/OrSidebar/index.js +1 -1
  282. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +2 -2
  283. package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +63 -28
  284. package/dist/bundled/v3/components/OrSidebarV3/index.js +1 -1
  285. package/dist/bundled/v3/components/OrSkeletonCircle/OrSkeletonCircle.vue.d.ts +20 -9
  286. package/dist/bundled/v3/components/OrSkeletonCircleV3/OrSkeletonCircle.vue.d.ts +28 -13
  287. package/dist/bundled/v3/components/OrSkeletonRect/OrSkeletonRect.vue.d.ts +22 -9
  288. package/dist/bundled/v3/components/OrSkeletonRectV3/OrSkeletonRect.vue.d.ts +26 -11
  289. package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +26 -10
  290. package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +40 -16
  291. package/dist/bundled/v3/components/OrSlider/OrSlider.js +2 -2
  292. package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +91 -35
  293. package/dist/bundled/v3/components/OrSlider/index.js +1 -1
  294. package/dist/bundled/v3/components/OrSortingV3/OrSorting.js +2 -2
  295. package/dist/bundled/v3/components/OrSortingV3/OrSorting.vue.d.ts +45 -13
  296. package/dist/bundled/v3/components/OrSortingV3/index.js +1 -1
  297. package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +43 -16
  298. package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +33 -12
  299. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +2 -2
  300. package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +53 -22
  301. package/dist/bundled/v3/components/OrSwitchV3/index.js +1 -1
  302. package/dist/bundled/v3/components/OrTab/OrTab.vue.d.ts +22 -9
  303. package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.vue.d.ts +29 -13
  304. package/dist/bundled/v3/components/OrTabV3/OrTab.vue.d.ts +17 -10
  305. package/dist/bundled/v3/components/OrTabs/OrTabs.vue.d.ts +17 -4
  306. package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +2 -2
  307. package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +73 -26
  308. package/dist/bundled/v3/components/OrTabsV3/index.js +1 -1
  309. package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +27 -10
  310. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +2 -2
  311. package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.vue.d.ts +85 -37
  312. package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
  313. package/dist/bundled/v3/components/OrTagV3/OrTag.js +2 -2
  314. package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +23 -12
  315. package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
  316. package/dist/bundled/v3/components/OrTagsV3/OrTags.js +2 -2
  317. package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +68 -23
  318. package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
  319. package/dist/bundled/v3/components/OrTeleport/OrTeleport.vue3.vue.d.ts +10 -4
  320. package/dist/bundled/v3/components/OrTeleportV3/OrTeleport.vue3.vue.d.ts +10 -4
  321. package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +24 -11
  322. package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +85 -37
  323. package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +73 -32
  324. package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +137 -55
  325. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +2 -2
  326. package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +83 -88
  327. package/dist/bundled/v3/components/OrTimePickerV3/index.js +1 -1
  328. package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +31 -11
  329. package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
  330. package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
  331. package/dist/bundled/v3/components/OrToast/index.js +1 -1
  332. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +2 -2
  333. package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +55 -25
  334. package/dist/bundled/v3/components/OrToastContainer/index.js +1 -1
  335. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +2 -2
  336. package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +54 -24
  337. package/dist/bundled/v3/components/OrToastContainerV3/index.js +1 -1
  338. package/dist/bundled/v3/components/OrToastV3/OrToast.js +2 -2
  339. package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +38 -16
  340. package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
  341. package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
  342. package/dist/bundled/v3/components/OrToastV3/index.js +1 -1
  343. package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +33 -14
  344. package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +10 -4
  345. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +2 -2
  346. package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +33 -15
  347. package/dist/bundled/v3/components/OrTooltipV3/index.js +1 -1
  348. package/dist/bundled/v3/components/OrTreeV3/OrTree.js +2 -2
  349. package/dist/bundled/v3/components/OrTreeV3/OrTree.vue.d.ts +19 -13
  350. package/dist/bundled/v3/components/OrTreeV3/index.js +1 -1
  351. package/dist/bundled/v3/components/index.js +56 -55
  352. package/dist/bundled/v3/directives/dropdown-close.d.ts +1 -3
  353. package/dist/bundled/v3/directives/dropdown-open.d.ts +1 -3
  354. package/dist/bundled/v3/hooks/useOverflow.js +1 -1
  355. package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
  356. package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  357. package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +1 -1
  358. package/dist/bundled/v3/index-168d8a72.js +826 -0
  359. package/dist/bundled/v3/{index-929e224a.js → index-2db1212e.js} +1 -1
  360. package/dist/bundled/v3/{index-f92296d7.js → index-3074ab3c.js} +10 -831
  361. package/dist/bundled/{v2/index-e72fe4a8.js → v3/index-3de4069f.js} +2 -2
  362. package/dist/bundled/{v2/index-15e8c1f3.js → v3/index-51eb57bd.js} +1 -1
  363. package/dist/bundled/v3/{index-bb6d92dd.js → index-540ed5cb.js} +1 -1
  364. package/dist/bundled/v3/{index-929b54f2.js → index-73699920.js} +348 -292
  365. package/dist/bundled/v3/{index-19d70079.js → index-a59e89b4.js} +2 -2
  366. package/dist/bundled/{v2/index-64a3a364.js → v3/index-c661340a.js} +3 -3
  367. package/dist/bundled/v3/{index-df2529d7.js → index-ce11b31b.js} +1 -1
  368. package/dist/bundled/v3/{index-b71d76f4.js → index-e0aaa8dc.js} +2 -2
  369. package/dist/bundled/{v2/index-5dd41049.js → v3/index-fdffd536.js} +4 -4
  370. package/dist/bundled/v3/index.js +56 -55
  371. package/dist/esm/v2/components/or-code-v3/index.js +2 -1
  372. package/dist/esm/v2/components/or-code-v3/libs.d.ts +2 -1
  373. package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +2 -2
  374. package/dist/esm/v2/components/or-textarea/OrTextarea.vue.d.ts +2 -2
  375. package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +2 -2
  376. package/dist/esm/v2/components/or-textbox/OrTextbox.vue.d.ts +2 -2
  377. package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +2 -2
  378. package/dist/esm/v2/components/or-toast/OrToast.vue.d.ts +2 -2
  379. package/dist/esm/v2/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +2 -2
  380. package/dist/esm/v2/components/or-toast-v3/OrToast.vue.d.ts +2 -2
  381. package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
  382. package/dist/esm/v2/components/or-tooltip/OrTooltip.vue.d.ts +2 -2
  383. package/dist/esm/v2/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +2 -2
  384. package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +2 -2
  385. package/dist/esm/v2/components/or-tree-v3/OrTree.vue.d.ts +2 -2
  386. package/dist/esm/v3/components/or-avatar/OrAvatar.vue.d.ts +26 -11
  387. package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +22 -7
  388. package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +568 -25
  389. package/dist/esm/v3/components/or-bottom-sheet-v3/hooks/useBottomSheetSwipeState.d.ts +1 -1
  390. package/dist/esm/v3/components/or-button/OrButton.vue.d.ts +51 -16
  391. package/dist/esm/v3/components/or-button-v2/OrButton.vue.d.ts +57 -20
  392. package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +35 -15
  393. package/dist/esm/v3/components/or-card/OrCard.vue.d.ts +15 -7
  394. package/dist/esm/v3/components/or-card-collection/OrCardCollection.vue.d.ts +47 -21
  395. package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +44 -17
  396. package/dist/esm/v3/components/or-card-collection-v3/partials/OrCardCollectionView.vue3.vue.d.ts +14 -6
  397. package/dist/esm/v3/components/or-card-v3/OrCard.vue.d.ts +7 -4
  398. package/dist/esm/v3/components/or-checkbox/OrCheckbox.vue.d.ts +35 -15
  399. package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +24 -6
  400. package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +43 -17
  401. package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +53 -23
  402. package/dist/esm/v3/components/or-chips/OrChips.vue.d.ts +51 -24
  403. package/dist/esm/v3/components/or-chips/or-chip/OrChip.vue.d.ts +25 -9
  404. package/dist/esm/v3/components/or-chips/partials/OrChipsInput.vue.d.ts +37 -17
  405. package/dist/esm/v3/components/or-code/OrCode.vue.d.ts +69 -24
  406. package/dist/esm/v3/components/or-code-v3/OrCode.vue.d.ts +83 -33
  407. package/dist/esm/v3/components/or-code-v3/index.js +2 -1
  408. package/dist/esm/v3/components/or-code-v3/libs.d.ts +2 -1
  409. package/dist/esm/v3/components/or-collapse/OrCollapse.vue.d.ts +39 -17
  410. package/dist/esm/v3/components/or-color-picker/OrColorPicker.vue.d.ts +31 -13
  411. package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +30 -8
  412. package/dist/esm/v3/components/or-confirm/OrConfirm.vue.d.ts +84 -23
  413. package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +91 -30
  414. package/dist/esm/v3/components/or-context-menu-v3/OrContextMenu.vue.d.ts +27 -13
  415. package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +83 -88
  416. package/dist/esm/v3/components/or-date-time-picker/OrDateTimePicker.vue.d.ts +177 -68
  417. package/dist/esm/v3/components/or-date-time-picker/partials/OrDateTimePickerCalendarItem.vue.d.ts +33 -12
  418. package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +109 -94
  419. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +28 -11
  420. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +39 -17
  421. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +15 -7
  422. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +85 -23
  423. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +17 -9
  424. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +7 -4
  425. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +30 -11
  426. package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +43 -17
  427. package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +28 -11
  428. package/dist/esm/v3/components/or-error/OrError.vue.d.ts +8 -4
  429. package/dist/esm/v3/components/or-error-tag-v3/OrErrorTag.vue.d.ts +7 -4
  430. package/dist/esm/v3/components/or-error-v3/OrError.vue.d.ts +18 -9
  431. package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +39 -16
  432. package/dist/esm/v3/components/or-fab-v3/OrFab.vue.d.ts +20 -8
  433. package/dist/esm/v3/components/or-floating/OrFloating.vue.d.ts +46 -15
  434. package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +30 -10
  435. package/dist/esm/v3/components/or-hint/OrHint.vue.d.ts +8 -4
  436. package/dist/esm/v3/components/or-hint-v3/OrHint.vue.d.ts +18 -9
  437. package/dist/esm/v3/components/or-icon/OrIcon.vue.d.ts +44 -16
  438. package/dist/esm/v3/components/or-icon-button-v2/OrIconButton.vue.d.ts +43 -13
  439. package/dist/esm/v3/components/or-icon-button-v2/partials/OrTooltipWrapper.vue.d.ts +10 -8
  440. package/dist/esm/v3/components/or-icon-button-v3/OrIconButton.vue.d.ts +54 -16
  441. package/dist/esm/v3/components/or-icon-v3/OrIcon.vue.d.ts +18 -7
  442. package/dist/esm/v3/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +16 -7
  443. package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +83 -39
  444. package/dist/esm/v3/components/or-inline-text-edit/OrInlineTextEdit.vue.d.ts +95 -43
  445. package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +79 -39
  446. package/dist/esm/v3/components/or-input/OrInput.vue.d.ts +87 -36
  447. package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +22 -7
  448. package/dist/esm/v3/components/or-input-box-v3/partials/or-input-box-addon/OrInputBoxAddon.vue.d.ts +18 -7
  449. package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +88 -38
  450. package/dist/esm/v3/components/or-label/OrLabel.vue.d.ts +20 -9
  451. package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +26 -9
  452. package/dist/esm/v3/components/or-link-v3/OrLink.vue.d.ts +24 -7
  453. package/dist/esm/v3/components/or-list/OrList.vue.d.ts +47 -21
  454. package/dist/esm/v3/components/or-list-of-inputs/OrListOfInputs.vue.d.ts +27 -11
  455. package/dist/esm/v3/components/or-loader/OrLoader.vue.d.ts +26 -10
  456. package/dist/esm/v3/components/or-loader-v3/OrLoader.vue.d.ts +34 -13
  457. package/dist/esm/v3/components/or-menu-item-v3/OrMenuItem.vue.d.ts +34 -13
  458. package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +33 -15
  459. package/dist/esm/v3/components/or-modal/OrModal.vue.d.ts +38 -14
  460. package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +25 -13
  461. package/dist/esm/v3/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue.d.ts +7 -4
  462. package/dist/esm/v3/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue.d.ts +7 -4
  463. package/dist/esm/v3/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue.d.ts +11 -6
  464. package/dist/esm/v3/components/or-notification/OrNotification.vue.d.ts +27 -9
  465. package/dist/esm/v3/components/or-notification-v3/OrNotification.vue.d.ts +20 -9
  466. package/dist/esm/v3/components/or-number-input/OrNumberInput.vue.d.ts +70 -24
  467. package/dist/esm/v3/components/or-overflow-menu/OrOverflowMenu.vue.d.ts +31 -13
  468. package/dist/esm/v3/components/or-overflow-menu/partials/OrOverflowMenuItem.vue.d.ts +23 -7
  469. package/dist/esm/v3/components/or-overlay/OrOverlay.vue.d.ts +16 -6
  470. package/dist/esm/v3/components/or-overlay-v3/OrOverlay.vue.d.ts +14 -7
  471. package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +75 -27
  472. package/dist/esm/v3/components/or-password/OrPassword.vue.d.ts +63 -22
  473. package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +92 -32
  474. package/dist/esm/v3/components/or-progress/OrProgress.vue.d.ts +56 -20
  475. package/dist/esm/v3/components/or-progress-v3/OrProgress.vue.d.ts +62 -25
  476. package/dist/esm/v3/components/or-radio/OrRadio.vue.d.ts +35 -13
  477. package/dist/esm/v3/components/or-radio-group/OrRadioGroup.vue.d.ts +26 -9
  478. package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +32 -6
  479. package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +49 -21
  480. package/dist/esm/v3/components/or-search/OrSearch.vue.d.ts +65 -23
  481. package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +41 -17
  482. package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +25 -9
  483. package/dist/esm/v3/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +20 -8
  484. package/dist/esm/v3/components/or-select/OrSelect.vue.d.ts +77 -28
  485. package/dist/esm/v3/components/or-select/partials/OrSelectContent.vue.d.ts +49 -18
  486. package/dist/esm/v3/components/or-select/partials/OrSelectContentEmpty.vue.d.ts +16 -4
  487. package/dist/esm/v3/components/or-select/partials/OrSelectContentOptions.vue.d.ts +67 -13
  488. package/dist/esm/v3/components/or-select/partials/OrSelectInput.vue.d.ts +41 -16
  489. package/dist/esm/v3/components/or-select/partials/OrSelectInputValue.vue.d.ts +35 -16
  490. package/dist/esm/v3/components/or-select/partials/OrSelectMain.vue.d.ts +71 -24
  491. package/dist/esm/v3/components/or-select/partials/OrSelectOption.vue.d.ts +19 -7
  492. package/dist/esm/v3/components/or-select/partials/OrSelectSearchOptions.vue.d.ts +24 -11
  493. package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +133 -44
  494. package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue.d.ts +14 -7
  495. package/dist/esm/v3/components/or-sidebar/OrSidebar.vue.d.ts +33 -14
  496. package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +63 -28
  497. package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +23 -10
  498. package/dist/esm/v3/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.vue.d.ts +20 -9
  499. package/dist/esm/v3/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.vue.d.ts +22 -9
  500. package/dist/esm/v3/components/or-skeleton/or-skeleton-text/OrSkeletonText.vue.d.ts +26 -10
  501. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +28 -13
  502. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +26 -11
  503. package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +40 -16
  504. package/dist/esm/v3/components/or-slider/OrSlider.vue.d.ts +91 -35
  505. package/dist/esm/v3/components/or-sorting-v3/OrSorting.vue.d.ts +45 -13
  506. package/dist/esm/v3/components/or-stepper/OrStepper.vue.d.ts +43 -16
  507. package/dist/esm/v3/components/or-stepper/partials/OrStepperButtonOptions.vue.d.ts +20 -4
  508. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionHorizontal.vue.d.ts +26 -4
  509. package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionVertical.vue.d.ts +26 -4
  510. package/dist/esm/v3/components/or-stepper/partials/OrStepperTitle.vue.d.ts +22 -6
  511. package/dist/esm/v3/components/or-stepper/partials/StatusIcon.vue.d.ts +12 -6
  512. package/dist/esm/v3/components/or-switch/OrSwitch.vue.d.ts +33 -12
  513. package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +53 -22
  514. package/dist/esm/v3/components/or-tab/OrTab.vue.d.ts +22 -9
  515. package/dist/esm/v3/components/or-tab-header-item/OrTabHeaderItem.vue.d.ts +29 -13
  516. package/dist/esm/v3/components/or-tab-v3/OrTab.vue.d.ts +17 -10
  517. package/dist/esm/v3/components/or-tabs/OrTabs.vue.d.ts +17 -4
  518. package/dist/esm/v3/components/or-tabs-v3/OrTabs.vue.d.ts +73 -26
  519. package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +27 -10
  520. package/dist/esm/v3/components/or-tag-input-v3/OrTagInput.vue.d.ts +85 -37
  521. package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +23 -12
  522. package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +68 -23
  523. package/dist/esm/v3/components/or-teleport/OrTeleport.vue3.vue.d.ts +10 -4
  524. package/dist/esm/v3/components/or-teleport-v3/OrTeleport.vue3.vue.d.ts +10 -4
  525. package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +24 -11
  526. package/dist/esm/v3/components/or-textarea/OrTextarea.vue.d.ts +85 -37
  527. package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +73 -32
  528. package/dist/esm/v3/components/or-textbox/OrTextbox.vue.d.ts +137 -55
  529. package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +83 -88
  530. package/dist/esm/v3/components/or-toast/OrToast.vue.d.ts +31 -11
  531. package/dist/esm/v3/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +55 -25
  532. package/dist/esm/v3/components/or-toast-v3/OrToast.vue.d.ts +38 -16
  533. package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +54 -24
  534. package/dist/esm/v3/components/or-tooltip/OrTooltip.vue.d.ts +33 -14
  535. package/dist/esm/v3/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +10 -4
  536. package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +33 -15
  537. package/dist/esm/v3/components/or-tree-v3/OrTree.vue.d.ts +19 -13
  538. package/dist/esm/v3/components/or-tree-v3/partials/or-tree-node/OrTreeNode.vue.d.ts +63 -31
  539. package/dist/esm/v3/directives/dropdown-close.d.ts +1 -3
  540. package/dist/esm/v3/directives/dropdown-open.d.ts +1 -3
  541. package/dist/esm/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
  542. package/package.json +4 -1
  543. package/src/components/or-code-v3/libs.ts +5 -1
  544. /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-e7037d50.js → OrDateTimePickerMonthSelect-5c7d6cc7.js} +0 -0
  545. /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-2c7e113b.js → OrDateTimePickerPopoverHeader-922f203c.js} +0 -0
  546. /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-7fd83e23.js → OrDateTimePickerTimeSelect-fc9d4e29.js} +0 -0
  547. /package/dist/bundled/v2/{index-ec92055d.js → index-8a1b5b9c.js} +0 -0
  548. /package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-de05b51f.js → OrExpansionPanel.vue_vue_type_script_lang-e09daea9.js} +0 -0
  549. /package/dist/bundled/v3/{index-f4d8e24c.js → index-5e8e7a46.js} +0 -0
@@ -2,10 +2,6 @@
2
2
  The data structure for documents. @nonabstract
3
3
  */
4
4
  class Text {
5
- /**
6
- @internal
7
- */
8
- constructor() {}
9
5
  /**
10
6
  Get the line description around the given position.
11
7
  */
@@ -100,7 +96,8 @@ class Text {
100
96
  return new LineCursor(inner);
101
97
  }
102
98
  /**
103
- @internal
99
+ Return the document as a string, using newline characters to
100
+ separate lines.
104
101
  */
105
102
  toString() {
106
103
  return this.sliceString(0);
@@ -115,6 +112,10 @@ class Text {
115
112
  return lines;
116
113
  }
117
114
  /**
115
+ @internal
116
+ */
117
+ constructor() {}
118
+ /**
118
119
  Create a `Text` instance for the given array of lines.
119
120
  */
120
121
  static of(text) {
@@ -2150,7 +2151,10 @@ class StateEffect {
2150
2151
  }
2151
2152
  /**
2152
2153
  Define a new effect type. The type parameter indicates the type
2153
- of values that his effect holds.
2154
+ of values that his effect holds. It should be a type that
2155
+ doesn't include `undefined`, since that is used in
2156
+ [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
2157
+ removed.
2154
2158
  */
2155
2159
  static define() {
2156
2160
  let spec = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -3287,8 +3291,7 @@ class RangeSet {
3287
3291
  static compare(oldSets, newSets,
3288
3292
  /**
3289
3293
  This indicates how the underlying data changed between these
3290
- ranges, and is needed to synchronize the iteration. `from` and
3291
- `to` are coordinates in the _new_ space, after these changes.
3294
+ ranges, and is needed to synchronize the iteration.
3292
3295
  */
3293
3296
  textDiff, comparator) {
3294
3297
  let minPointSize = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
@@ -3383,6 +3386,18 @@ A range set builder is a data structure that helps build up a
3383
3386
  an array of [`Range`](https://codemirror.net/6/docs/ref/#state.Range) objects.
3384
3387
  */
3385
3388
  class RangeSetBuilder {
3389
+ finishChunk(newArrays) {
3390
+ this.chunks.push(new Chunk(this.from, this.to, this.value, this.maxPoint));
3391
+ this.chunkPos.push(this.chunkStart);
3392
+ this.chunkStart = -1;
3393
+ this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint);
3394
+ this.maxPoint = -1;
3395
+ if (newArrays) {
3396
+ this.from = [];
3397
+ this.to = [];
3398
+ this.value = [];
3399
+ }
3400
+ }
3386
3401
  /**
3387
3402
  Create an empty builder.
3388
3403
  */
@@ -3400,18 +3415,6 @@ class RangeSetBuilder {
3400
3415
  this.setMaxPoint = -1;
3401
3416
  this.nextLayer = null;
3402
3417
  }
3403
- finishChunk(newArrays) {
3404
- this.chunks.push(new Chunk(this.from, this.to, this.value, this.maxPoint));
3405
- this.chunkPos.push(this.chunkStart);
3406
- this.chunkStart = -1;
3407
- this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint);
3408
- this.maxPoint = -1;
3409
- if (newArrays) {
3410
- this.from = [];
3411
- this.to = [];
3412
- this.value = [];
3413
- }
3414
- }
3415
3418
  /**
3416
3419
  Add a range. Ranges should be added in sorted (by `from` and
3417
3420
  `value.startSide`) order.
@@ -3745,7 +3748,7 @@ function compare(a, startA, b, startB, length, comparator) {
3745
3748
  let end = diff < 0 ? a.to + dPos : b.to,
3746
3749
  clipEnd = Math.min(end, endB);
3747
3750
  if (a.point || b.point) {
3748
- if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) && sameValues(a.activeForPoint(a.to + dPos), b.activeForPoint(b.to)))) comparator.comparePoint(pos, clipEnd, a.point, b.point);
3751
+ if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) && sameValues(a.activeForPoint(a.to), b.activeForPoint(b.to)))) comparator.comparePoint(pos, clipEnd, a.point, b.point);
3749
3752
  } else {
3750
3753
  if (clipEnd > pos && !sameValues(a.active, b.active)) comparator.compareRange(pos, clipEnd, a.active, b.active);
3751
3754
  }
@@ -4407,7 +4410,7 @@ class ContentView {
4407
4410
  constructor() {
4408
4411
  this.parent = null;
4409
4412
  this.dom = null;
4410
- this.dirty = 2 /* Dirty.Node */;
4413
+ this.dirty = 2 /* Node */;
4411
4414
  }
4412
4415
 
4413
4416
  get overrideDOMText() {
@@ -4431,7 +4434,7 @@ class ContentView {
4431
4434
  return this.posBefore(view) + view.length;
4432
4435
  }
4433
4436
  sync(view, track) {
4434
- if (this.dirty & 2 /* Dirty.Node */) {
4437
+ if (this.dirty & 2 /* Node */) {
4435
4438
  let parent = this.dom;
4436
4439
  let prev = null,
4437
4440
  next;
@@ -4442,7 +4445,7 @@ class ContentView {
4442
4445
  if (!contentView || !contentView.parent && contentView.canReuseDOM(child)) child.reuseDOM(next);
4443
4446
  }
4444
4447
  child.sync(view, track);
4445
- child.dirty = 0 /* Dirty.Not */;
4448
+ child.dirty = 0 /* Not */;
4446
4449
  }
4447
4450
 
4448
4451
  next = prev ? prev.nextSibling : parent.firstChild;
@@ -4457,10 +4460,10 @@ class ContentView {
4457
4460
  next = prev ? prev.nextSibling : parent.firstChild;
4458
4461
  if (next && track && track.node == parent) track.written = true;
4459
4462
  while (next) next = rm$1(next);
4460
- } else if (this.dirty & 1 /* Dirty.Child */) {
4463
+ } else if (this.dirty & 1 /* Child */) {
4461
4464
  for (let child of this.children) if (child.dirty) {
4462
4465
  child.sync(view, track);
4463
- child.dirty = 0 /* Dirty.Not */;
4466
+ child.dirty = 0 /* Not */;
4464
4467
  }
4465
4468
  }
4466
4469
  }
@@ -4522,14 +4525,14 @@ class ContentView {
4522
4525
  }
4523
4526
  markDirty() {
4524
4527
  let andParent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
4525
- this.dirty |= 2 /* Dirty.Node */;
4528
+ this.dirty |= 2 /* Node */;
4526
4529
  this.markParentsDirty(andParent);
4527
4530
  }
4528
4531
  markParentsDirty(childList) {
4529
4532
  for (let parent = this.parent; parent; parent = parent.parent) {
4530
- if (childList) parent.dirty |= 2 /* Dirty.Node */;
4531
- if (parent.dirty & 1 /* Dirty.Child */) return;
4532
- parent.dirty |= 1 /* Dirty.Child */;
4533
+ if (childList) parent.dirty |= 2 /* Node */;
4534
+ if (parent.dirty & 1 /* Child */) return;
4535
+ parent.dirty |= 1 /* Child */;
4533
4536
  childList = false;
4534
4537
  }
4535
4538
  }
@@ -4824,12 +4827,12 @@ class MarkView extends ContentView {
4824
4827
  reuseDOM(node) {
4825
4828
  if (node.nodeName == this.mark.tagName.toUpperCase()) {
4826
4829
  this.setDOM(node);
4827
- this.dirty |= 4 /* Dirty.Attrs */ | 2 /* Dirty.Node */;
4830
+ this.dirty |= 4 /* Attrs */ | 2 /* Node */;
4828
4831
  }
4829
4832
  }
4830
4833
 
4831
4834
  sync(view, track) {
4832
- if (!this.dom) this.setDOM(this.setAttrs(document.createElement(this.mark.tagName)));else if (this.dirty & 4 /* Dirty.Attrs */) this.setAttrs(this.dom);
4835
+ if (!this.dom) this.setDOM(this.setAttrs(document.createElement(this.mark.tagName)));else if (this.dirty & 4 /* Attrs */) this.setAttrs(this.dom);
4833
4836
  super.sync(view, track);
4834
4837
  }
4835
4838
  merge(from, to, source, _hasStart, openStart, openEnd) {
@@ -4894,9 +4897,6 @@ function textCoords(text, pos, side) {
4894
4897
  }
4895
4898
  // Also used for collapsed ranges that don't have a placeholder widget!
4896
4899
  class WidgetView extends ContentView {
4897
- static create(widget, length, side) {
4898
- return new (widget.customView || WidgetView)(widget, length, side);
4899
- }
4900
4900
  constructor(widget, length, side) {
4901
4901
  super();
4902
4902
  this.widget = widget;
@@ -4904,6 +4904,9 @@ class WidgetView extends ContentView {
4904
4904
  this.side = side;
4905
4905
  this.prevWidget = null;
4906
4906
  }
4907
+ static create(widget, length, side) {
4908
+ return new (widget.customView || WidgetView)(widget, length, side);
4909
+ }
4907
4910
  split(from) {
4908
4911
  let result = WidgetView.create(this.widget, this.length - from, this.side);
4909
4912
  this.length -= from;
@@ -4964,11 +4967,12 @@ class WidgetView extends ContentView {
4964
4967
  let rects = this.dom.getClientRects(),
4965
4968
  rect = null;
4966
4969
  if (!rects.length) return null;
4967
- for (let i = pos > 0 ? rects.length - 1 : 0;; i += pos > 0 ? -1 : 1) {
4970
+ let fromBack = this.side ? this.side < 0 : pos > 0;
4971
+ for (let i = fromBack ? rects.length - 1 : 0;; i += fromBack ? -1 : 1) {
4968
4972
  rect = rects[i];
4969
4973
  if (pos > 0 ? i == 0 : i == rects.length - 1 || rect.top < rect.bottom) break;
4970
4974
  }
4971
- return this.length ? rect : flattenRect(rect, this.side > 0);
4975
+ return flattenRect(rect, !fromBack);
4972
4976
  }
4973
4977
  get isEditable() {
4974
4978
  return false;
@@ -5312,6 +5316,15 @@ class WidgetType {
5312
5316
  return -1;
5313
5317
  }
5314
5318
  /**
5319
+ For inline widgets that are displayed inline (as opposed to
5320
+ `inline-block`) and introduce line breaks (through `<br>` tags
5321
+ or textual newlines), this must indicate the amount of line
5322
+ breaks they introduce. Defaults to 0.
5323
+ */
5324
+ get lineBreaks() {
5325
+ return 0;
5326
+ }
5327
+ /**
5315
5328
  Can be used to configure which kinds of events inside the widget
5316
5329
  should be ignored by the editor. The default is to ignore all
5317
5330
  events.
@@ -5424,9 +5437,9 @@ class Decoration extends RangeValue {
5424
5437
  given position.
5425
5438
  */
5426
5439
  static widget(spec) {
5427
- let side = spec.side || 0,
5440
+ let side = Math.max(-10000, Math.min(10000, spec.side || 0)),
5428
5441
  block = !!spec.block;
5429
- side += block ? side > 0 ? 300000000 /* Side.BlockAfter */ : -400000000 /* Side.BlockBefore */ : side > 0 ? 100000000 /* Side.InlineAfter */ : -100000000 /* Side.InlineBefore */;
5442
+ side += block && !spec.inlineOrder ? side > 0 ? 300000000 /* BlockAfter */ : -400000000 /* BlockBefore */ : side > 0 ? 100000000 /* InlineAfter */ : -100000000 /* InlineBefore */;
5430
5443
  return new PointDecoration(spec, side, side, block, spec.widget || null, false);
5431
5444
  }
5432
5445
  /**
@@ -5438,15 +5451,15 @@ class Decoration extends RangeValue {
5438
5451
  startSide,
5439
5452
  endSide;
5440
5453
  if (spec.isBlockGap) {
5441
- startSide = -500000000 /* Side.GapStart */;
5442
- endSide = 400000000 /* Side.GapEnd */;
5454
+ startSide = -500000000 /* GapStart */;
5455
+ endSide = 400000000 /* GapEnd */;
5443
5456
  } else {
5444
5457
  let {
5445
5458
  start,
5446
5459
  end
5447
5460
  } = getInclusive(spec, block);
5448
- startSide = (start ? block ? -300000000 /* Side.BlockIncStart */ : -1 /* Side.InlineIncStart */ : 500000000 /* Side.NonIncStart */) - 1;
5449
- endSide = (end ? block ? 200000000 /* Side.BlockIncEnd */ : 1 /* Side.InlineIncEnd */ : -600000000 /* Side.NonIncEnd */) + 1;
5461
+ startSide = (start ? block ? -300000000 /* BlockIncStart */ : -1 /* InlineIncStart */ : 500000000 /* NonIncStart */) - 1;
5462
+ endSide = (end ? block ? 200000000 /* BlockIncEnd */ : 1 /* InlineIncEnd */ : -600000000 /* NonIncEnd */) + 1;
5450
5463
  }
5451
5464
  return new PointDecoration(spec, startSide, endSide, block, spec.widget || null, true);
5452
5465
  }
@@ -5483,7 +5496,7 @@ class MarkDecoration extends Decoration {
5483
5496
  start,
5484
5497
  end
5485
5498
  } = getInclusive(spec);
5486
- super(start ? -1 /* Side.InlineIncStart */ : 500000000 /* Side.NonIncStart */, end ? 1 /* Side.InlineIncEnd */ : -600000000 /* Side.NonIncEnd */, null, spec);
5499
+ super(start ? -1 /* InlineIncStart */ : 500000000 /* NonIncStart */, end ? 1 /* InlineIncEnd */ : -600000000 /* NonIncEnd */, null, spec);
5487
5500
  this.tagName = spec.tagName || "span";
5488
5501
  this.class = spec.class || "";
5489
5502
  this.attrs = spec.attributes || null;
@@ -5500,7 +5513,7 @@ class MarkDecoration extends Decoration {
5500
5513
  MarkDecoration.prototype.point = false;
5501
5514
  class LineDecoration extends Decoration {
5502
5515
  constructor(spec) {
5503
- super(-200000000 /* Side.Line */, -200000000 /* Side.Line */, null, spec);
5516
+ super(-200000000 /* Line */, -200000000 /* Line */, null, spec);
5504
5517
  }
5505
5518
  eq(other) {
5506
5519
  return other instanceof LineDecoration && this.spec.class == other.spec.class && attrsEq(this.spec.attributes, other.spec.attributes);
@@ -5525,7 +5538,7 @@ class PointDecoration extends Decoration {
5525
5538
  return this.startSide < this.endSide ? BlockType.WidgetRange : this.startSide <= 0 ? BlockType.WidgetBefore : BlockType.WidgetAfter;
5526
5539
  }
5527
5540
  get heightRelevant() {
5528
- return this.block || !!this.widget && this.widget.estimatedHeight >= 5;
5541
+ return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
5529
5542
  }
5530
5543
  eq(other) {
5531
5544
  return other instanceof PointDecoration && widgetsEq(this.widget, other.widget) && this.block == other.block && this.startSide == other.startSide && this.endSide == other.endSide;
@@ -5634,7 +5647,7 @@ class LineView extends ContentView {
5634
5647
  reuseDOM(node) {
5635
5648
  if (node.nodeName == "DIV") {
5636
5649
  this.setDOM(node);
5637
- this.dirty |= 4 /* Dirty.Attrs */ | 2 /* Dirty.Node */;
5650
+ this.dirty |= 4 /* Attrs */ | 2 /* Node */;
5638
5651
  }
5639
5652
  }
5640
5653
 
@@ -5644,7 +5657,7 @@ class LineView extends ContentView {
5644
5657
  this.setDOM(document.createElement("div"));
5645
5658
  this.dom.className = "cm-line";
5646
5659
  this.prevAttrs = this.attrs ? null : undefined;
5647
- } else if (this.dirty & 4 /* Dirty.Attrs */) {
5660
+ } else if (this.dirty & 4 /* Attrs */) {
5648
5661
  clearAttributes(this.dom);
5649
5662
  this.dom.className = "cm-line";
5650
5663
  this.prevAttrs = this.attrs ? null : undefined;
@@ -5802,7 +5815,7 @@ class ContentBuilder {
5802
5815
  this.content = [];
5803
5816
  this.curLine = null;
5804
5817
  this.breakAtStart = 0;
5805
- this.pendingBuffer = 0 /* Buf.No */;
5818
+ this.pendingBuffer = 0 /* No */;
5806
5819
  this.bufferMarks = [];
5807
5820
  // Set to false directly after a widget that covers the position after it
5808
5821
  this.atCursorPos = true;
@@ -5829,7 +5842,7 @@ class ContentBuilder {
5829
5842
  let active = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.bufferMarks;
5830
5843
  if (this.pendingBuffer) {
5831
5844
  this.curLine.append(wrapMarks(new WidgetBufferView(-1), active), active.length);
5832
- this.pendingBuffer = 0 /* Buf.No */;
5845
+ this.pendingBuffer = 0 /* No */;
5833
5846
  }
5834
5847
  }
5835
5848
 
@@ -5839,7 +5852,7 @@ class ContentBuilder {
5839
5852
  this.content.push(view);
5840
5853
  }
5841
5854
  finish(openEnd) {
5842
- if (this.pendingBuffer && openEnd <= this.bufferMarks.length) this.flushBuffer();else this.pendingBuffer = 0 /* Buf.No */;
5855
+ if (this.pendingBuffer && openEnd <= this.bufferMarks.length) this.flushBuffer();else this.pendingBuffer = 0 /* No */;
5843
5856
  if (!this.posCovered()) this.getLine();
5844
5857
  }
5845
5858
  buildText(length, active, openStart) {
@@ -5865,7 +5878,7 @@ class ContentBuilder {
5865
5878
  this.textOff = 0;
5866
5879
  }
5867
5880
  }
5868
- let take = Math.min(this.text.length - this.textOff, length, 512 /* T.Chunk */);
5881
+ let take = Math.min(this.text.length - this.textOff, length, 512 /* Chunk */);
5869
5882
  this.flushBuffer(active.slice(active.length - openStart));
5870
5883
  this.getLine().append(wrapMarks(new TextView(this.text.slice(this.textOff, this.textOff + take)), active), openStart);
5871
5884
  this.atCursorPos = true;
@@ -5897,7 +5910,7 @@ class ContentBuilder {
5897
5910
  let cursorBefore = this.atCursorPos && !view.isEditable && openStart <= active.length && (from < to || deco.startSide > 0);
5898
5911
  let cursorAfter = !view.isEditable && (from < to || openStart > active.length || deco.startSide <= 0);
5899
5912
  let line = this.getLine();
5900
- if (this.pendingBuffer == 2 /* Buf.IfCursor */ && !cursorBefore && !view.isEditable) this.pendingBuffer = 0 /* Buf.No */;
5913
+ if (this.pendingBuffer == 2 /* IfCursor */ && !cursorBefore && !view.isEditable) this.pendingBuffer = 0 /* No */;
5901
5914
  this.flushBuffer(active);
5902
5915
  if (cursorBefore) {
5903
5916
  line.append(wrapMarks(new WidgetBufferView(1), active), openStart);
@@ -5905,7 +5918,7 @@ class ContentBuilder {
5905
5918
  }
5906
5919
  line.append(wrapMarks(view, active), openStart);
5907
5920
  this.atCursorPos = cursorAfter;
5908
- this.pendingBuffer = !cursorAfter ? 0 /* Buf.No */ : from < to || openStart > active.length ? 1 /* Buf.Yes */ : 2 /* Buf.IfCursor */;
5921
+ this.pendingBuffer = !cursorAfter ? 0 /* No */ : from < to || openStart > active.length ? 1 /* Yes */ : 2 /* IfCursor */;
5909
5922
  if (this.pendingBuffer) this.bufferMarks = active.slice();
5910
5923
  }
5911
5924
  } else if (this.doc.lineAt(this.pos).from == this.pos) {
@@ -6230,27 +6243,27 @@ class ViewUpdate {
6230
6243
  update.
6231
6244
  */
6232
6245
  get viewportChanged() {
6233
- return (this.flags & 4 /* UpdateFlag.Viewport */) > 0;
6246
+ return (this.flags & 4 /* Viewport */) > 0;
6234
6247
  }
6235
6248
  /**
6236
6249
  Indicates whether the height of a block element in the editor
6237
6250
  changed in this update.
6238
6251
  */
6239
6252
  get heightChanged() {
6240
- return (this.flags & 2 /* UpdateFlag.Height */) > 0;
6253
+ return (this.flags & 2 /* Height */) > 0;
6241
6254
  }
6242
6255
  /**
6243
6256
  Returns true when the document was modified or the size of the
6244
6257
  editor, or elements within the editor, changed.
6245
6258
  */
6246
6259
  get geometryChanged() {
6247
- return this.docChanged || (this.flags & (8 /* UpdateFlag.Geometry */ | 2 /* UpdateFlag.Height */)) > 0;
6260
+ return this.docChanged || (this.flags & (8 /* Geometry */ | 2 /* Height */)) > 0;
6248
6261
  }
6249
6262
  /**
6250
6263
  True when this update indicates a focus change.
6251
6264
  */
6252
6265
  get focusChanged() {
6253
- return (this.flags & 1 /* UpdateFlag.Focus */) > 0;
6266
+ return (this.flags & 1 /* Focus */) > 0;
6254
6267
  }
6255
6268
  /**
6256
6269
  Whether the document changed in this update.
@@ -6312,7 +6325,7 @@ for (let p of ["()", "[]", "{}"]) {
6312
6325
  Brackets[r] = -l;
6313
6326
  }
6314
6327
  function charType(ch) {
6315
- return ch <= 0xf7 ? LowTypes[ch] : 0x590 <= ch && ch <= 0x5f4 ? 2 /* T.R */ : 0x600 <= ch && ch <= 0x6f9 ? ArabicTypes[ch - 0x600] : 0x6ee <= ch && ch <= 0x8ac ? 4 /* T.AL */ : 0x2000 <= ch && ch <= 0x200b ? 256 /* T.NI */ : 0xfb50 <= ch && ch <= 0xfdff ? 4 /* T.AL */ : ch == 0x200c ? 256 /* T.NI */ : 1 /* T.L */;
6328
+ return ch <= 0xf7 ? LowTypes[ch] : 0x590 <= ch && ch <= 0x5f4 ? 2 /* R */ : 0x600 <= ch && ch <= 0x6f9 ? ArabicTypes[ch - 0x600] : 0x6ee <= ch && ch <= 0x8ac ? 4 /* AL */ : 0x2000 <= ch && ch <= 0x200b ? 256 /* NI */ : 0xfb50 <= ch && ch <= 0xfdff ? 4 /* AL */ : ch == 0x200c ? 256 /* NI */ : 1 /* L */;
6316
6329
  }
6317
6330
 
6318
6331
  const BidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
@@ -6321,12 +6334,6 @@ Represents a contiguous range of text that has a single direction
6321
6334
  (as in left-to-right or right-to-left).
6322
6335
  */
6323
6336
  class BidiSpan {
6324
- /**
6325
- The direction of this span.
6326
- */
6327
- get dir() {
6328
- return this.level % 2 ? RTL : LTR;
6329
- }
6330
6337
  /**
6331
6338
  @internal
6332
6339
  */
@@ -6352,6 +6359,12 @@ class BidiSpan {
6352
6359
  this.level = level;
6353
6360
  }
6354
6361
  /**
6362
+ The direction of this span.
6363
+ */
6364
+ get dir() {
6365
+ return this.level % 2 ? RTL : LTR;
6366
+ }
6367
+ /**
6355
6368
  @internal
6356
6369
  */
6357
6370
  side(end, dir) {
@@ -6380,9 +6393,9 @@ class BidiSpan {
6380
6393
  const types = [];
6381
6394
  function computeOrder(line, direction) {
6382
6395
  let len = line.length,
6383
- outerType = direction == LTR ? 1 /* T.L */ : 2 /* T.R */,
6384
- oppositeType = direction == LTR ? 2 /* T.R */ : 1 /* T.L */;
6385
- if (!line || outerType == 1 /* T.L */ && !BidiRE.test(line)) return trivialOrder(len);
6396
+ outerType = direction == LTR ? 1 /* L */ : 2 /* R */,
6397
+ oppositeType = direction == LTR ? 2 /* R */ : 1 /* L */;
6398
+ if (!line || outerType == 1 /* L */ && !BidiRE.test(line)) return trivialOrder(len);
6386
6399
  // W1. Examine each non-spacing mark (NSM) in the level run, and
6387
6400
  // change the type of the NSM to the type of the previous
6388
6401
  // character. If the NSM is at the start of the level run, it will
@@ -6395,9 +6408,9 @@ function computeOrder(line, direction) {
6395
6408
  // (Left after this: L, R, EN, AN, ET, CS, NI)
6396
6409
  for (let i = 0, prev = outerType, prevStrong = outerType; i < len; i++) {
6397
6410
  let type = charType(line.charCodeAt(i));
6398
- if (type == 512 /* T.NSM */) type = prev;else if (type == 8 /* T.EN */ && prevStrong == 4 /* T.AL */) type = 16 /* T.AN */;
6399
- types[i] = type == 4 /* T.AL */ ? 2 /* T.R */ : type;
6400
- if (type & 7 /* T.Strong */) prevStrong = type;
6411
+ if (type == 512 /* NSM */) type = prev;else if (type == 8 /* EN */ && prevStrong == 4 /* AL */) type = 16 /* AN */;
6412
+ types[i] = type == 4 /* AL */ ? 2 /* R */ : type;
6413
+ if (type & 7 /* Strong */) prevStrong = type;
6401
6414
  prev = type;
6402
6415
  }
6403
6416
  // W5. A sequence of European terminators adjacent to European
@@ -6410,20 +6423,20 @@ function computeOrder(line, direction) {
6410
6423
  // (Left after this: L, R, EN+AN, NI)
6411
6424
  for (let i = 0, prev = outerType, prevStrong = outerType; i < len; i++) {
6412
6425
  let type = types[i];
6413
- if (type == 128 /* T.CS */) {
6414
- if (i < len - 1 && prev == types[i + 1] && prev & 24 /* T.Num */) type = types[i] = prev;else types[i] = 256 /* T.NI */;
6415
- } else if (type == 64 /* T.ET */) {
6426
+ if (type == 128 /* CS */) {
6427
+ if (i < len - 1 && prev == types[i + 1] && prev & 24 /* Num */) type = types[i] = prev;else types[i] = 256 /* NI */;
6428
+ } else if (type == 64 /* ET */) {
6416
6429
  let end = i + 1;
6417
- while (end < len && types[end] == 64 /* T.ET */) end++;
6418
- let replace = i && prev == 8 /* T.EN */ || end < len && types[end] == 8 /* T.EN */ ? prevStrong == 1 /* T.L */ ? 1 /* T.L */ : 8 /* T.EN */ : 256 /* T.NI */;
6430
+ while (end < len && types[end] == 64 /* ET */) end++;
6431
+ let replace = i && prev == 8 /* EN */ || end < len && types[end] == 8 /* EN */ ? prevStrong == 1 /* L */ ? 1 /* L */ : 8 /* EN */ : 256 /* NI */;
6419
6432
  for (let j = i; j < end; j++) types[j] = replace;
6420
6433
  i = end - 1;
6421
- } else if (type == 8 /* T.EN */ && prevStrong == 1 /* T.L */) {
6422
- types[i] = 1 /* T.L */;
6434
+ } else if (type == 8 /* EN */ && prevStrong == 1 /* L */) {
6435
+ types[i] = 1 /* L */;
6423
6436
  }
6424
6437
 
6425
6438
  prev = type;
6426
- if (type & 7 /* T.Strong */) prevStrong = type;
6439
+ if (type & 7 /* Strong */) prevStrong = type;
6427
6440
  }
6428
6441
  // N0. Process bracket pairs in an isolating run sequence
6429
6442
  // sequentially in the logical order of the text positions of the
@@ -6438,30 +6451,30 @@ function computeOrder(line, direction) {
6438
6451
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
6439
6452
  if (BracketStack[sJ + 1] == -br) {
6440
6453
  let flags = BracketStack[sJ + 2];
6441
- let type = flags & 2 /* Bracketed.EmbedInside */ ? outerType : !(flags & 4 /* Bracketed.OppositeInside */) ? 0 : flags & 1 /* Bracketed.OppositeBefore */ ? oppositeType : outerType;
6454
+ let type = flags & 2 /* EmbedInside */ ? outerType : !(flags & 4 /* OppositeInside */) ? 0 : flags & 1 /* OppositeBefore */ ? oppositeType : outerType;
6442
6455
  if (type) types[i] = types[BracketStack[sJ]] = type;
6443
6456
  sI = sJ;
6444
6457
  break;
6445
6458
  }
6446
6459
  }
6447
- } else if (BracketStack.length == 189 /* Bracketed.MaxDepth */) {
6460
+ } else if (BracketStack.length == 189 /* MaxDepth */) {
6448
6461
  break;
6449
6462
  } else {
6450
6463
  BracketStack[sI++] = i;
6451
6464
  BracketStack[sI++] = ch;
6452
6465
  BracketStack[sI++] = context;
6453
6466
  }
6454
- } else if ((type = types[i]) == 2 /* T.R */ || type == 1 /* T.L */) {
6467
+ } else if ((type = types[i]) == 2 /* R */ || type == 1 /* L */) {
6455
6468
  let embed = type == outerType;
6456
- context = embed ? 0 : 1 /* Bracketed.OppositeBefore */;
6469
+ context = embed ? 0 : 1 /* OppositeBefore */;
6457
6470
  for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
6458
6471
  let cur = BracketStack[sJ + 2];
6459
- if (cur & 2 /* Bracketed.EmbedInside */) break;
6472
+ if (cur & 2 /* EmbedInside */) break;
6460
6473
  if (embed) {
6461
- BracketStack[sJ + 2] |= 2 /* Bracketed.EmbedInside */;
6474
+ BracketStack[sJ + 2] |= 2 /* EmbedInside */;
6462
6475
  } else {
6463
- if (cur & 4 /* Bracketed.OppositeInside */) break;
6464
- BracketStack[sJ + 2] |= 4 /* Bracketed.OppositeInside */;
6476
+ if (cur & 4 /* OppositeInside */) break;
6477
+ BracketStack[sJ + 2] |= 4 /* OppositeInside */;
6465
6478
  }
6466
6479
  }
6467
6480
  }
@@ -6474,12 +6487,12 @@ function computeOrder(line, direction) {
6474
6487
  // N2. Any remaining neutrals take the embedding direction.
6475
6488
  // (Left after this: L, R, EN+AN)
6476
6489
  for (let i = 0; i < len; i++) {
6477
- if (types[i] == 256 /* T.NI */) {
6490
+ if (types[i] == 256 /* NI */) {
6478
6491
  let end = i + 1;
6479
- while (end < len && types[end] == 256 /* T.NI */) end++;
6480
- let beforeL = (i ? types[i - 1] : outerType) == 1 /* T.L */;
6481
- let afterL = (end < len ? types[end] : outerType) == 1 /* T.L */;
6482
- let replace = beforeL == afterL ? beforeL ? 1 /* T.L */ : 2 /* T.R */ : outerType;
6492
+ while (end < len && types[end] == 256 /* NI */) end++;
6493
+ let beforeL = (i ? types[i - 1] : outerType) == 1 /* L */;
6494
+ let afterL = (end < len ? types[end] : outerType) == 1 /* L */;
6495
+ let replace = beforeL == afterL ? beforeL ? 1 /* L */ : 2 /* R */ : outerType;
6483
6496
  for (let j = i; j < end; j++) types[j] = replace;
6484
6497
  i = end - 1;
6485
6498
  }
@@ -6490,16 +6503,16 @@ function computeOrder(line, direction) {
6490
6503
  // explicit embedding into account, we can build up the order on
6491
6504
  // the fly, without following the level-based algorithm.
6492
6505
  let order = [];
6493
- if (outerType == 1 /* T.L */) {
6506
+ if (outerType == 1 /* L */) {
6494
6507
  for (let i = 0; i < len;) {
6495
6508
  let start = i,
6496
- rtl = types[i++] != 1 /* T.L */;
6497
- while (i < len && rtl == (types[i] != 1 /* T.L */)) i++;
6509
+ rtl = types[i++] != 1 /* L */;
6510
+ while (i < len && rtl == (types[i] != 1 /* L */)) i++;
6498
6511
  if (rtl) {
6499
6512
  for (let j = i; j > start;) {
6500
6513
  let end = j,
6501
- l = types[--j] != 2 /* T.R */;
6502
- while (j > start && l == (types[j - 1] != 2 /* T.R */)) j--;
6514
+ l = types[--j] != 2 /* R */;
6515
+ while (j > start && l == (types[j - 1] != 2 /* R */)) j--;
6503
6516
  order.push(new BidiSpan(j, end, l ? 2 : 1));
6504
6517
  }
6505
6518
  } else {
@@ -6509,8 +6522,8 @@ function computeOrder(line, direction) {
6509
6522
  } else {
6510
6523
  for (let i = 0; i < len;) {
6511
6524
  let start = i,
6512
- rtl = types[i++] == 2 /* T.R */;
6513
- while (i < len && rtl == (types[i] == 2 /* T.R */)) i++;
6525
+ rtl = types[i++] == 2 /* R */;
6526
+ while (i < len && rtl == (types[i] == 2 /* R */)) i++;
6514
6527
  order.push(new BidiSpan(start, i, rtl ? 1 : 2));
6515
6528
  }
6516
6529
  }
@@ -6640,9 +6653,6 @@ class DOMPoint {
6640
6653
  }
6641
6654
  }
6642
6655
  class DocView extends ContentView {
6643
- get length() {
6644
- return this.view.state.doc.length;
6645
- }
6646
6656
  constructor(view) {
6647
6657
  super();
6648
6658
  this.view = view;
@@ -6673,10 +6683,10 @@ class DocView extends ContentView {
6673
6683
  this.updateDeco();
6674
6684
  this.updateInner([new ChangedRange(0, 0, 0, view.state.doc.length)], 0);
6675
6685
  }
6676
- // Update the document view to a given state. scrollIntoView can be
6677
- // used as a hint to compute a new viewport that includes that
6678
- // position, if we know the editor is going to scroll that position
6679
- // into view.
6686
+ get length() {
6687
+ return this.view.state.doc.length;
6688
+ }
6689
+ // Update the document view to a given state.
6680
6690
  update(update) {
6681
6691
  let changedRanges = update.changedRanges;
6682
6692
  if (this.minWidth > 0 && changedRanges.length) {
@@ -6704,7 +6714,7 @@ class DocView extends ContentView {
6704
6714
  deco = this.updateDeco();
6705
6715
  let decoDiff = findChangedDeco(prevDeco, deco, update.changes);
6706
6716
  changedRanges = ChangedRange.extendWithRanges(changedRanges, decoDiff);
6707
- if (this.dirty == 0 /* Dirty.Not */ && changedRanges.length == 0) {
6717
+ if (this.dirty == 0 /* Not */ && changedRanges.length == 0) {
6708
6718
  return false;
6709
6719
  } else {
6710
6720
  this.updateInner(changedRanges, update.startState.doc.length);
@@ -6736,7 +6746,7 @@ class DocView extends ContentView {
6736
6746
  written: false
6737
6747
  } : undefined;
6738
6748
  this.sync(this.view, track);
6739
- this.dirty = 0 /* Dirty.Not */;
6749
+ this.dirty = 0 /* Not */;
6740
6750
  if (track && (track.written || observer.selectionRange.focusNode != track.node)) this.forceSelection = true;
6741
6751
  this.dom.style.height = "";
6742
6752
  });
@@ -6814,9 +6824,9 @@ class DocView extends ContentView {
6814
6824
  // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1612076
6815
6825
  if (browser.gecko) {
6816
6826
  let nextTo = nextToUneditable(anchor.node, anchor.offset);
6817
- if (nextTo && nextTo != (1 /* NextTo.Before */ | 2 /* NextTo.After */)) {
6818
- let text = nearbyTextNode(anchor.node, anchor.offset, nextTo == 1 /* NextTo.Before */ ? 1 : -1);
6819
- if (text) anchor = new DOMPos(text, nextTo == 1 /* NextTo.Before */ ? 0 : text.nodeValue.length);
6827
+ if (nextTo && nextTo != (1 /* Before */ | 2 /* After */)) {
6828
+ let text = nearbyTextNode(anchor.node, anchor.offset, nextTo == 1 /* Before */ ? 1 : -1);
6829
+ if (text) anchor = new DOMPos(text, nextTo == 1 /* Before */ ? 0 : text.nodeValue.length);
6820
6830
  }
6821
6831
  }
6822
6832
  rawSel.collapse(anchor.node, anchor.offset);
@@ -7118,7 +7128,11 @@ function computeCompositionDeco(view, changes) {
7118
7128
  let {
7119
7129
  state
7120
7130
  } = view,
7121
- text = node.nodeType == 3 ? node.nodeValue : new DOMReader([], state).readRange(node.firstChild, null).text;
7131
+ reader = new DOMReader([], state);
7132
+ if (node.nodeType == 3) reader.readTextNode(node);else reader.readRange(node.firstChild, null);
7133
+ let {
7134
+ text
7135
+ } = reader;
7122
7136
  if (text.indexOf(LineBreakPlaceholder) > -1) return Decoration.none; // Don't try to preserve multi-line compositions
7123
7137
  if (newTo - newFrom < text.length) {
7124
7138
  if (state.doc.sliceString(newFrom, Math.min(state.doc.length, newFrom + text.length)) == text) newTo = newFrom + text.length;else if (state.doc.sliceString(Math.max(0, newTo - text.length), newTo) == text) newFrom = newTo - text.length;else return Decoration.none;
@@ -7175,7 +7189,7 @@ function nearbyTextNode(startNode, startOffset, side) {
7175
7189
  }
7176
7190
  function nextToUneditable(node, offset) {
7177
7191
  if (node.nodeType != 1) return 0;
7178
- return (offset && node.childNodes[offset - 1].contentEditable == "false" ? 1 /* NextTo.Before */ : 0) | (offset < node.childNodes.length && node.childNodes[offset].contentEditable == "false" ? 2 /* NextTo.After */ : 0);
7192
+ return (offset && node.childNodes[offset - 1].contentEditable == "false" ? 1 /* Before */ : 0) | (offset < node.childNodes.length && node.childNodes[offset].contentEditable == "false" ? 2 /* After */ : 0);
7179
7193
  }
7180
7194
  class DecorationComparator$1 {
7181
7195
  constructor() {
@@ -7362,7 +7376,7 @@ function posAtCoords(view, coords, precise) {
7362
7376
  if (yOffset < 0) return 0;
7363
7377
  if (yOffset > docHeight) return view.state.doc.length;
7364
7378
  // Scan for a text block near the queried y position
7365
- for (let halfLine = view.defaultLineHeight / 2, bounced = false;;) {
7379
+ for (let halfLine = view.viewState.heightOracle.textHeight / 2, bounced = false;;) {
7366
7380
  block = view.elementAtHeight(yOffset);
7367
7381
  if (block.type == BlockType.Text) break;
7368
7382
  for (;;) {
@@ -7435,7 +7449,8 @@ function posAtCoords(view, coords, precise) {
7435
7449
  function posAtCoordsImprecise(view, contentRect, block, x, y) {
7436
7450
  let into = Math.round((x - contentRect.left) * view.defaultCharacterWidth);
7437
7451
  if (view.lineWrapping && block.height > view.defaultLineHeight * 1.5) {
7438
- let line = Math.floor((y - block.top) / view.defaultLineHeight);
7452
+ let textHeight = view.viewState.heightOracle.textHeight;
7453
+ let line = Math.floor((y - block.top - (view.defaultLineHeight - textHeight) * 0.5) / textHeight);
7439
7454
  into += line * view.viewState.heightOracle.lineLength;
7440
7455
  }
7441
7456
  let content = view.state.sliceDoc(block.from, block.to);
@@ -7463,9 +7478,16 @@ function isSuspiciousChromeCaretResult(node, offset, x) {
7463
7478
  let rect = node.nodeType == 1 ? node.getBoundingClientRect() : textRange(node, 0, Math.max(node.nodeValue.length, 1)).getBoundingClientRect();
7464
7479
  return x - rect.left > 5;
7465
7480
  }
7481
+ function blockAt(view, pos) {
7482
+ let line = view.lineBlockAt(pos);
7483
+ if (Array.isArray(line.type)) for (let l of line.type) {
7484
+ if (l.to > pos || l.to == pos && (l.to == line.to || l.type == BlockType.Text)) return l;
7485
+ }
7486
+ return line;
7487
+ }
7466
7488
  function moveToLineBoundary(view, start, forward, includeWrap) {
7467
- let line = view.state.doc.lineAt(start.head);
7468
- let coords = !includeWrap || !view.lineWrapping ? null : view.coordsAtPos(start.assoc < 0 && start.head > line.from ? start.head - 1 : start.head);
7489
+ let line = blockAt(view, start.head);
7490
+ let coords = !includeWrap || line.type != BlockType.Text || !(view.lineWrapping || line.widgetLineBreaks) ? null : view.coordsAtPos(start.assoc < 0 && start.head > line.from ? start.head - 1 : start.head);
7469
7491
  if (coords) {
7470
7492
  let editorRect = view.dom.getBoundingClientRect();
7471
7493
  let direction = view.textDirectionAt(line.from);
@@ -7475,9 +7497,7 @@ function moveToLineBoundary(view, start, forward, includeWrap) {
7475
7497
  });
7476
7498
  if (pos != null) return EditorSelection.cursor(pos, forward ? -1 : 1);
7477
7499
  }
7478
- let lineView = LineView.find(view.docView, start.head);
7479
- let end = lineView ? forward ? lineView.posAtEnd : lineView.posAtStart : forward ? line.to : line.from;
7480
- return EditorSelection.cursor(end, forward ? -1 : 1);
7500
+ return EditorSelection.cursor(forward ? line.to : line.from, forward ? -1 : 1);
7481
7501
  }
7482
7502
  function moveByChar(view, start, forward, by) {
7483
7503
  let line = view.state.doc.lineAt(start.head),
@@ -7529,7 +7549,7 @@ function moveVertically(view, start, forward, distance) {
7529
7549
  startY = (dir < 0 ? line.top : line.bottom) + docTop;
7530
7550
  }
7531
7551
  let resolvedGoal = rect.left + goal;
7532
- let dist = distance !== null && distance !== void 0 ? distance : view.defaultLineHeight >> 1;
7552
+ let dist = distance !== null && distance !== void 0 ? distance : view.viewState.heightOracle.textHeight >> 1;
7533
7553
  for (let extra = 0;; extra += 10) {
7534
7554
  let curY = startY + (dist + extra) * dir;
7535
7555
  let pos = posAtCoords(view, {
@@ -7561,10 +7581,6 @@ function skipAtoms(view, oldPos, pos) {
7561
7581
 
7562
7582
  // This will also be where dragging info and such goes
7563
7583
  class InputState {
7564
- setSelectionOrigin(origin) {
7565
- this.lastSelectionOrigin = origin;
7566
- this.lastSelectionTime = Date.now();
7567
- }
7568
7584
  constructor(view) {
7569
7585
  this.lastKeyCode = 0;
7570
7586
  this.lastKeyTime = 0;
@@ -7652,6 +7668,10 @@ class InputState {
7652
7668
  // issue where the composition vanishes when you press enter.
7653
7669
  if (browser.safari) view.contentDOM.addEventListener("input", () => null);
7654
7670
  }
7671
+ setSelectionOrigin(origin) {
7672
+ this.lastSelectionOrigin = origin;
7673
+ this.lastSelectionTime = Date.now();
7674
+ }
7655
7675
  ensureHandlers(view, plugins) {
7656
7676
  var _a;
7657
7677
  let handlers;
@@ -7799,7 +7819,6 @@ class MouseSelection {
7799
7819
  doc.addEventListener("mouseup", this.up = this.up.bind(this));
7800
7820
  this.extend = startEvent.shiftKey;
7801
7821
  this.multiple = view.state.facet(EditorState.allowMultipleSelections) && addsSelectionRange(view, startEvent);
7802
- this.dragMove = dragMovesSelection(view, startEvent);
7803
7822
  this.dragging = isInPrimarySelection(view, startEvent) && getClickType(startEvent) == 1 ? null : false;
7804
7823
  }
7805
7824
  start(event) {
@@ -8141,7 +8160,7 @@ function dropText(view, event, text, direct) {
8141
8160
  let {
8142
8161
  mouseSelection
8143
8162
  } = view.inputState;
8144
- let del = direct && mouseSelection && mouseSelection.dragging && mouseSelection.dragMove ? {
8163
+ let del = direct && mouseSelection && mouseSelection.dragging && dragMovesSelection(view, event) ? {
8145
8164
  from: mouseSelection.dragging.from,
8146
8165
  to: mouseSelection.dragging.to
8147
8166
  } : null;
@@ -8461,34 +8480,24 @@ class BlockInfo {
8461
8480
  */
8462
8481
  height,
8463
8482
  /**
8464
- @internal
8465
- */
8466
- children,
8467
- /**
8468
- @internal
8483
+ @internal Weird packed field that holds an array of children
8484
+ for composite blocks, a decoration for block widgets, and a
8485
+ number indicating the amount of widget-create line breaks for
8486
+ text blocks.
8469
8487
  */
8470
- deco) {
8488
+ _content) {
8471
8489
  this.from = from;
8472
8490
  this.length = length;
8473
8491
  this.top = top;
8474
8492
  this.height = height;
8475
- this.children = children;
8476
- this.deco = deco;
8493
+ this._content = _content;
8477
8494
  }
8478
8495
  /**
8479
8496
  The type of element this is. When querying lines, this may be
8480
8497
  an array of all the blocks that make up the line.
8481
8498
  */
8482
8499
  get type() {
8483
- var _a, _b, _c;
8484
- return (_c = (_a = this.children) !== null && _a !== void 0 ? _a : (_b = this.deco) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : BlockType.Text;
8485
- }
8486
- /**
8487
- If this is a widget block, this will return the widget
8488
- associated with it.
8489
- */
8490
- get widget() {
8491
- return this.deco && this.deco.widget;
8500
+ return typeof this._content == "number" ? BlockType.Text : Array.isArray(this._content) ? this._content : this._content.type;
8492
8501
  }
8493
8502
  /**
8494
8503
  The end of the element as a document position.
@@ -8503,11 +8512,25 @@ class BlockInfo {
8503
8512
  return this.top + this.height;
8504
8513
  }
8505
8514
  /**
8515
+ If this is a widget block, this will return the widget
8516
+ associated with it.
8517
+ */
8518
+ get widget() {
8519
+ return this._content instanceof PointDecoration ? this._content.widget : null;
8520
+ }
8521
+ /**
8522
+ If this is a textblock, this holds the number of line breaks
8523
+ that appear in widgets inside the block.
8524
+ */
8525
+ get widgetLineBreaks() {
8526
+ return typeof this._content == "number" ? this._content : 0;
8527
+ }
8528
+ /**
8506
8529
  @internal
8507
8530
  */
8508
8531
  join(other) {
8509
- let children = (this.children || [this]).concat(other.children || [other]);
8510
- return new BlockInfo(this.from, this.length + other.length, this.top, this.height + other.height, children, null);
8532
+ let content = (Array.isArray(this._content) ? this._content : [this]).concat(Array.isArray(other._content) ? other._content : [other]);
8533
+ return new BlockInfo(this.from, this.length + other.length, this.top, this.height + other.height, content);
8511
8534
  }
8512
8535
  }
8513
8536
  var QueryType = /*@__PURE__*/function (QueryType) {
@@ -8527,10 +8550,10 @@ class HeightMap {
8527
8550
  this.flags = flags;
8528
8551
  }
8529
8552
  get outdated() {
8530
- return (this.flags & 2 /* Flag.Outdated */) > 0;
8553
+ return (this.flags & 2 /* Outdated */) > 0;
8531
8554
  }
8532
8555
  set outdated(value) {
8533
- this.flags = (value ? 2 /* Flag.Outdated */ : 0) | this.flags & ~2 /* Flag.Outdated */;
8556
+ this.flags = (value ? 2 /* Outdated */ : 0) | this.flags & ~2 /* Outdated */;
8534
8557
  }
8535
8558
  setHeight(oracle, height) {
8536
8559
  if (this.height != height) {
@@ -8632,7 +8655,7 @@ class HeightMapBlock extends HeightMap {
8632
8655
  this.deco = deco;
8633
8656
  }
8634
8657
  blockAt(_height, _oracle, top, offset) {
8635
- return new BlockInfo(offset, this.length, top, this.height, null, this.deco);
8658
+ return new BlockInfo(offset, this.length, top, this.height, this.deco || 0);
8636
8659
  }
8637
8660
  lineAt(_value, _type, oracle, top, offset) {
8638
8661
  return this.blockAt(0, oracle, top, offset);
@@ -8656,11 +8679,15 @@ class HeightMapText extends HeightMapBlock {
8656
8679
  super(length, height, null);
8657
8680
  this.collapsed = 0; // Amount of collapsed content in the line
8658
8681
  this.widgetHeight = 0; // Maximum inline widget height
8682
+ this.breaks = 0; // Number of widget-introduced line breaks on the line
8659
8683
  }
8660
8684
 
8685
+ blockAt(_height, _oracle, top, offset) {
8686
+ return new BlockInfo(offset, this.length, top, this.height, this.breaks);
8687
+ }
8661
8688
  replace(_from, _to, nodes) {
8662
8689
  let node = nodes[0];
8663
- if (nodes.length == 1 && (node instanceof HeightMapText || node instanceof HeightMapGap && node.flags & 4 /* Flag.SingleLine */) && Math.abs(this.length - node.length) < 10) {
8690
+ if (nodes.length == 1 && (node instanceof HeightMapText || node instanceof HeightMapGap && node.flags & 4 /* SingleLine */) && Math.abs(this.length - node.length) < 10) {
8664
8691
  if (node instanceof HeightMapGap) node = new HeightMapText(node.length, this.height);else node.height = this.height;
8665
8692
  if (!this.outdated) node.outdated = false;
8666
8693
  return node;
@@ -8672,7 +8699,7 @@ class HeightMapText extends HeightMapBlock {
8672
8699
  let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
8673
8700
  let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
8674
8701
  let measured = arguments.length > 3 ? arguments[3] : undefined;
8675
- if (measured && measured.from <= offset && measured.more) this.setHeight(oracle, measured.heights[measured.index++]);else if (force || this.outdated) this.setHeight(oracle, Math.max(this.widgetHeight, oracle.heightForLine(this.length - this.collapsed)));
8702
+ if (measured && measured.from <= offset && measured.more) this.setHeight(oracle, measured.heights[measured.index++]);else if (force || this.outdated) this.setHeight(oracle, Math.max(this.widgetHeight, oracle.heightForLine(this.length - this.collapsed)) + this.breaks * oracle.lineHeight);
8676
8703
  this.outdated = false;
8677
8704
  return this;
8678
8705
  }
@@ -8716,14 +8743,14 @@ class HeightMapGap extends HeightMap {
8716
8743
  let line = oracle.doc.lineAt(guess),
8717
8744
  lineHeight = perLine + line.length * perChar;
8718
8745
  let lineTop = Math.max(top, height - lineHeight / 2);
8719
- return new BlockInfo(line.from, line.length, lineTop, lineHeight, null, null);
8746
+ return new BlockInfo(line.from, line.length, lineTop, lineHeight, 0);
8720
8747
  } else {
8721
8748
  let line = Math.max(0, Math.min(lastLine - firstLine, Math.floor((height - top) / perLine)));
8722
8749
  let {
8723
8750
  from,
8724
8751
  length
8725
8752
  } = oracle.doc.line(firstLine + line);
8726
- return new BlockInfo(from, length, top + perLine * line, perLine, null, null);
8753
+ return new BlockInfo(from, length, top + perLine * line, perLine, 0);
8727
8754
  }
8728
8755
  }
8729
8756
  lineAt(value, type, oracle, top, offset) {
@@ -8733,7 +8760,7 @@ class HeightMapGap extends HeightMap {
8733
8760
  from,
8734
8761
  to
8735
8762
  } = oracle.doc.lineAt(value);
8736
- return new BlockInfo(from, to - from, 0, 0, null, null);
8763
+ return new BlockInfo(from, to - from, 0, 0, 0);
8737
8764
  }
8738
8765
  let {
8739
8766
  firstLine,
@@ -8744,7 +8771,7 @@ class HeightMapGap extends HeightMap {
8744
8771
  lineHeight = perLine + line.length * perChar;
8745
8772
  let linesAbove = line.number - firstLine;
8746
8773
  let lineTop = top + perLine * linesAbove + perChar * (line.from - offset - linesAbove);
8747
- return new BlockInfo(line.from, line.length, Math.max(top, Math.min(lineTop, top + this.height - lineHeight)), lineHeight, null, null);
8774
+ return new BlockInfo(line.from, line.length, Math.max(top, Math.min(lineTop, top + this.height - lineHeight)), lineHeight, 0);
8748
8775
  }
8749
8776
  forEachLine(from, to, oracle, top, offset, f) {
8750
8777
  from = Math.max(from, offset);
@@ -8761,7 +8788,7 @@ class HeightMapGap extends HeightMap {
8761
8788
  lineTop += perLine * linesAbove + perChar * (from - offset - linesAbove);
8762
8789
  }
8763
8790
  let lineHeight = perLine + perChar * line.length;
8764
- f(new BlockInfo(line.from, line.length, lineTop, lineHeight, null, null));
8791
+ f(new BlockInfo(line.from, line.length, lineTop, lineHeight, 0));
8765
8792
  lineTop += lineHeight;
8766
8793
  pos = line.to + 1;
8767
8794
  }
@@ -8824,13 +8851,13 @@ class HeightMapGap extends HeightMap {
8824
8851
  }
8825
8852
  class HeightMapBranch extends HeightMap {
8826
8853
  constructor(left, brk, right) {
8827
- super(left.length + brk + right.length, left.height + right.height, brk | (left.outdated || right.outdated ? 2 /* Flag.Outdated */ : 0));
8854
+ super(left.length + brk + right.length, left.height + right.height, brk | (left.outdated || right.outdated ? 2 /* Outdated */ : 0));
8828
8855
  this.left = left;
8829
8856
  this.right = right;
8830
8857
  this.size = left.size + right.size;
8831
8858
  }
8832
8859
  get break() {
8833
- return this.flags & 1 /* Flag.Break */;
8860
+ return this.flags & 1 /* Break */;
8834
8861
  }
8835
8862
  blockAt(height, oracle, top, offset) {
8836
8863
  let mid = top + this.left.height;
@@ -8958,12 +8985,13 @@ class NodeBuilder {
8958
8985
  point(from, to, deco) {
8959
8986
  if (from < to || deco.heightRelevant) {
8960
8987
  let height = deco.widget ? deco.widget.estimatedHeight : 0;
8988
+ let breaks = deco.widget ? deco.widget.lineBreaks : 0;
8961
8989
  if (height < 0) height = this.oracle.lineHeight;
8962
8990
  let len = to - from;
8963
8991
  if (deco.block) {
8964
8992
  this.addBlock(new HeightMapBlock(len, height, deco));
8965
- } else if (len || height >= relevantWidgetHeight) {
8966
- this.addLineDeco(height, len);
8993
+ } else if (len || breaks || height >= relevantWidgetHeight) {
8994
+ this.addLineDeco(height, breaks, len);
8967
8995
  }
8968
8996
  } else if (to > from) {
8969
8997
  this.span(from, to);
@@ -8987,7 +9015,7 @@ class NodeBuilder {
8987
9015
  }
8988
9016
  blankContent(from, to) {
8989
9017
  let gap = new HeightMapGap(to - from);
8990
- if (this.oracle.doc.lineAt(from).to == to) gap.flags |= 4 /* Flag.SingleLine */;
9018
+ if (this.oracle.doc.lineAt(from).to == to) gap.flags |= 4 /* SingleLine */;
8991
9019
  return gap;
8992
9020
  }
8993
9021
  ensureLine() {
@@ -9007,11 +9035,12 @@ class NodeBuilder {
9007
9035
  this.writtenTo = this.pos = this.pos + block.length;
9008
9036
  if (type != BlockType.WidgetBefore) this.covering = block;
9009
9037
  }
9010
- addLineDeco(height, length) {
9038
+ addLineDeco(height, breaks, length) {
9011
9039
  let line = this.ensureLine();
9012
9040
  line.length += length;
9013
9041
  line.collapsed += length;
9014
9042
  line.widgetHeight = Math.max(line.widgetHeight, height);
9043
+ line.breaks += breaks;
9015
9044
  this.writtenTo = this.pos = this.pos + length;
9016
9045
  }
9017
9046
  finish(from) {
@@ -9157,6 +9186,14 @@ class ViewState {
9157
9186
  this.contentDOMHeight = 0;
9158
9187
  this.editorHeight = 0;
9159
9188
  this.editorWidth = 0;
9189
+ this.scrollTop = 0;
9190
+ this.scrolledToBottom = true;
9191
+ // The vertical position (document-relative) to which to anchor the
9192
+ // scroll position. -1 means anchor to the end of the document.
9193
+ this.scrollAnchorPos = 0;
9194
+ // The height at the anchor position. Set by the DOM update phase.
9195
+ // -1 means no height available.
9196
+ this.scrollAnchorHeight = -1;
9160
9197
  // See VP.MaxDOMHeight
9161
9198
  this.scaler = IdScaler;
9162
9199
  this.scrollTarget = null;
@@ -9209,7 +9246,7 @@ class ViewState {
9209
9246
  }
9210
9247
  }
9211
9248
  this.viewports = viewports.sort((a, b) => a.from - b.from);
9212
- this.scaler = this.heightMap.height <= 7000000 /* VP.MaxDOMHeight */ ? IdScaler : new BigScaler(this.heightOracle, this.heightMap, this.viewports);
9249
+ this.scaler = this.heightMap.height <= 7000000 /* MaxDOMHeight */ ? IdScaler : new BigScaler(this.heightOracle, this.heightMap, this.viewports);
9213
9250
  }
9214
9251
  updateViewportLines() {
9215
9252
  this.viewportLines = [];
@@ -9225,15 +9262,23 @@ class ViewState {
9225
9262
  let contentChanges = update.changedRanges;
9226
9263
  let heightChanges = ChangedRange.extendWithRanges(contentChanges, heightRelevantDecoChanges(prevDeco, this.stateDeco, update ? update.changes : ChangeSet.empty(this.state.doc.length)));
9227
9264
  let prevHeight = this.heightMap.height;
9265
+ let scrollAnchor = this.scrolledToBottom ? null : this.lineBlockAtHeight(this.scrollTop);
9228
9266
  this.heightMap = this.heightMap.applyChanges(this.stateDeco, update.startState.doc, this.heightOracle.setDoc(this.state.doc), heightChanges);
9229
- if (this.heightMap.height != prevHeight) update.flags |= 2 /* UpdateFlag.Height */;
9267
+ if (this.heightMap.height != prevHeight) update.flags |= 2 /* Height */;
9268
+ if (scrollAnchor) {
9269
+ this.scrollAnchorPos = update.changes.mapPos(scrollAnchor.from, -1);
9270
+ this.scrollAnchorHeight = scrollAnchor.top;
9271
+ } else {
9272
+ this.scrollAnchorPos = -1;
9273
+ this.scrollAnchorHeight = this.heightMap.height;
9274
+ }
9230
9275
  let viewport = heightChanges.length ? this.mapViewport(this.viewport, update.changes) : this.viewport;
9231
9276
  if (scrollTarget && (scrollTarget.range.head < viewport.from || scrollTarget.range.head > viewport.to) || !this.viewportIsAppropriate(viewport)) viewport = this.getViewport(0, scrollTarget);
9232
- let updateLines = !update.changes.empty || update.flags & 2 /* UpdateFlag.Height */ || viewport.from != this.viewport.from || viewport.to != this.viewport.to;
9277
+ let updateLines = !update.changes.empty || update.flags & 2 /* Height */ || viewport.from != this.viewport.from || viewport.to != this.viewport.to;
9233
9278
  this.viewport = viewport;
9234
9279
  this.updateForViewport();
9235
9280
  if (updateLines) this.updateViewportLines();
9236
- if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /* LG.Margin */ << 1) this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, update.changes)));
9281
+ if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /* Margin */ << 1) this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, update.changes)));
9237
9282
  update.flags |= this.computeVisibleRanges();
9238
9283
  if (scrollTarget) this.scrollTarget = scrollTarget;
9239
9284
  if (!this.mustEnforceCursorAssoc && update.selectionSet && update.view.lineWrapping && update.state.selection.main.empty && update.state.selection.main.assoc && !update.state.facet(nativeSelectionHidden)) this.mustEnforceCursorAssoc = true;
@@ -9257,14 +9302,20 @@ class ViewState {
9257
9302
  if (this.paddingTop != paddingTop || this.paddingBottom != paddingBottom) {
9258
9303
  this.paddingTop = paddingTop;
9259
9304
  this.paddingBottom = paddingBottom;
9260
- result |= 8 /* UpdateFlag.Geometry */ | 2 /* UpdateFlag.Height */;
9305
+ result |= 8 /* Geometry */ | 2 /* Height */;
9261
9306
  }
9262
9307
 
9263
9308
  if (this.editorWidth != view.scrollDOM.clientWidth) {
9264
9309
  if (oracle.lineWrapping) measureContent = true;
9265
9310
  this.editorWidth = view.scrollDOM.clientWidth;
9266
- result |= 8 /* UpdateFlag.Geometry */;
9311
+ result |= 8 /* Geometry */;
9267
9312
  }
9313
+
9314
+ if (this.scrollTop != view.scrollDOM.scrollTop) {
9315
+ this.scrollAnchorHeight = -1;
9316
+ this.scrollTop = view.scrollDOM.scrollTop;
9317
+ }
9318
+ this.scrolledToBottom = this.scrollTop > view.scrollDOM.scrollHeight - view.scrollDOM.clientHeight - 4;
9268
9319
  // Pixel viewport
9269
9320
  let pixelViewport = (this.printing ? fullPixelRange : visiblePixelRange)(dom, this.paddingTop);
9270
9321
  let dTop = pixelViewport.top - this.pixelViewport.top,
@@ -9280,7 +9331,7 @@ class ViewState {
9280
9331
  if (this.contentDOMWidth != contentWidth || this.editorHeight != view.scrollDOM.clientHeight) {
9281
9332
  this.contentDOMWidth = domRect.width;
9282
9333
  this.editorHeight = view.scrollDOM.clientHeight;
9283
- result |= 8 /* UpdateFlag.Geometry */;
9334
+ result |= 8 /* Geometry */;
9284
9335
  }
9285
9336
 
9286
9337
  if (measureContent) {
@@ -9295,7 +9346,7 @@ class ViewState {
9295
9346
  refresh = lineHeight > 0 && oracle.refresh(whiteSpace, lineHeight, charWidth, textHeight, contentWidth / charWidth, lineHeights);
9296
9347
  if (refresh) {
9297
9348
  view.docView.minWidth = 0;
9298
- result |= 8 /* UpdateFlag.Geometry */;
9349
+ result |= 8 /* Geometry */;
9299
9350
  }
9300
9351
  }
9301
9352
 
@@ -9305,14 +9356,14 @@ class ViewState {
9305
9356
  let heights = vp.from == this.viewport.from ? lineHeights : view.docView.measureVisibleLineHeights(vp);
9306
9357
  this.heightMap = (refresh ? HeightMap.empty().applyChanges(this.stateDeco, Text.empty, this.heightOracle, [new ChangedRange(0, 0, 0, view.state.doc.length)]) : this.heightMap).updateHeight(oracle, 0, refresh, new MeasuredHeights(vp.from, heights));
9307
9358
  }
9308
- if (oracle.heightChanged) result |= 2 /* UpdateFlag.Height */;
9359
+ if (oracle.heightChanged) result |= 2 /* Height */;
9309
9360
  }
9310
9361
 
9311
9362
  let viewportChange = !this.viewportIsAppropriate(this.viewport, bias) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
9312
9363
  if (viewportChange) this.viewport = this.getViewport(bias, this.scrollTarget);
9313
9364
  this.updateForViewport();
9314
- if (result & 2 /* UpdateFlag.Height */ || viewportChange) this.updateViewportLines();
9315
- if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /* LG.Margin */ << 1) this.updateLineGaps(this.ensureLineGaps(refresh ? [] : this.lineGaps, view));
9365
+ if (result & 2 /* Height */ || viewportChange) this.updateViewportLines();
9366
+ if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /* Margin */ << 1) this.updateLineGaps(this.ensureLineGaps(refresh ? [] : this.lineGaps, view));
9316
9367
  result |= this.computeVisibleRanges();
9317
9368
  if (this.mustEnforceCursorAssoc) {
9318
9369
  this.mustEnforceCursorAssoc = false;
@@ -9334,14 +9385,14 @@ class ViewState {
9334
9385
  // This will divide VP.Margin between the top and the
9335
9386
  // bottom, depending on the bias (the change in viewport position
9336
9387
  // since the last update). It'll hold a number between 0 and 1
9337
- let marginTop = 0.5 - Math.max(-0.5, Math.min(0.5, bias / 1000 /* VP.Margin */ / 2));
9388
+ let marginTop = 0.5 - Math.max(-0.5, Math.min(0.5, bias / 1000 /* Margin */ / 2));
9338
9389
  let map = this.heightMap,
9339
9390
  oracle = this.heightOracle;
9340
9391
  let {
9341
9392
  visibleTop,
9342
9393
  visibleBottom
9343
9394
  } = this;
9344
- let viewport = new Viewport(map.lineAt(visibleTop - marginTop * 1000 /* VP.Margin */, QueryType.ByHeight, oracle, 0, 0).from, map.lineAt(visibleBottom + (1 - marginTop) * 1000 /* VP.Margin */, QueryType.ByHeight, oracle, 0, 0).to);
9395
+ let viewport = new Viewport(map.lineAt(visibleTop - marginTop * 1000 /* Margin */, QueryType.ByHeight, oracle, 0, 0).from, map.lineAt(visibleBottom + (1 - marginTop) * 1000 /* Margin */, QueryType.ByHeight, oracle, 0, 0).to);
9345
9396
  // If scrollTarget is given, make sure the viewport includes that position
9346
9397
  if (scrollTarget) {
9347
9398
  let {
@@ -9352,7 +9403,7 @@ class ViewState {
9352
9403
  let block = map.lineAt(head, QueryType.ByPos, oracle, 0, 0),
9353
9404
  topPos;
9354
9405
  if (scrollTarget.y == "center") topPos = (block.top + block.bottom) / 2 - viewHeight / 2;else if (scrollTarget.y == "start" || scrollTarget.y == "nearest" && head < viewport.from) topPos = block.top;else topPos = block.bottom - viewHeight;
9355
- viewport = new Viewport(map.lineAt(topPos - 1000 /* VP.Margin */ / 2, QueryType.ByHeight, oracle, 0, 0).from, map.lineAt(topPos + viewHeight + 1000 /* VP.Margin */ / 2, QueryType.ByHeight, oracle, 0, 0).to);
9406
+ viewport = new Viewport(map.lineAt(topPos - 1000 /* Margin */ / 2, QueryType.ByHeight, oracle, 0, 0).from, map.lineAt(topPos + viewHeight + 1000 /* Margin */ / 2, QueryType.ByHeight, oracle, 0, 0).to);
9356
9407
  }
9357
9408
  }
9358
9409
  return viewport;
@@ -9381,7 +9432,7 @@ class ViewState {
9381
9432
  visibleTop,
9382
9433
  visibleBottom
9383
9434
  } = this;
9384
- return (from == 0 || top <= visibleTop - Math.max(10 /* VP.MinCoverMargin */, Math.min(-bias, 250 /* VP.MaxCoverMargin */))) && (to == this.state.doc.length || bottom >= visibleBottom + Math.max(10 /* VP.MinCoverMargin */, Math.min(bias, 250 /* VP.MaxCoverMargin */))) && top > visibleTop - 2 * 1000 /* VP.Margin */ && bottom < visibleBottom + 2 * 1000 /* VP.Margin */;
9435
+ return (from == 0 || top <= visibleTop - Math.max(10 /* MinCoverMargin */, Math.min(-bias, 250 /* MaxCoverMargin */))) && (to == this.state.doc.length || bottom >= visibleBottom + Math.max(10 /* MinCoverMargin */, Math.min(bias, 250 /* MaxCoverMargin */))) && top > visibleTop - 2 * 1000 /* Margin */ && bottom < visibleBottom + 2 * 1000 /* Margin */;
9385
9436
  }
9386
9437
 
9387
9438
  mapLineGaps(gaps, changes) {
@@ -9399,7 +9450,7 @@ class ViewState {
9399
9450
  // the artifacts this might produce from the user.
9400
9451
  ensureLineGaps(current, mayMeasure) {
9401
9452
  let wrapping = this.heightOracle.lineWrapping;
9402
- let margin = wrapping ? 10000 /* LG.MarginWrap */ : 2000 /* LG.Margin */,
9453
+ let margin = wrapping ? 10000 /* MarginWrap */ : 2000 /* Margin */,
9403
9454
  halfMargin = margin >> 1,
9404
9455
  doubleMargin = margin << 1;
9405
9456
  // The non-wrapping logic won't work at all in predominantly right-to-left text.
@@ -9412,8 +9463,8 @@ class ViewState {
9412
9463
  if (!sel.empty) avoid.push(sel.to);
9413
9464
  for (let pos of avoid) {
9414
9465
  if (pos > from && pos < to) {
9415
- addGap(from, pos - 10 /* LG.SelectionMargin */, line, structure);
9416
- addGap(pos + 10 /* LG.SelectionMargin */, to, line, structure);
9466
+ addGap(from, pos - 10 /* SelectionMargin */, line, structure);
9467
+ addGap(pos + 10 /* SelectionMargin */, to, line, structure);
9417
9468
  return;
9418
9469
  }
9419
9470
  }
@@ -9498,7 +9549,7 @@ class ViewState {
9498
9549
  }, 20);
9499
9550
  let changed = ranges.length != this.visibleRanges.length || this.visibleRanges.some((r, i) => r.from != ranges[i].from || r.to != ranges[i].to);
9500
9551
  this.visibleRanges = ranges;
9501
- return changed ? 4 /* UpdateFlag.Viewport */ : 0;
9552
+ return changed ? 4 /* Viewport */ : 0;
9502
9553
  }
9503
9554
  lineBlockAt(pos) {
9504
9555
  return pos >= this.viewport.from && pos <= this.viewport.to && this.viewportLines.find(b => b.from <= pos && b.to >= pos) || scaleBlock(this.heightMap.lineAt(pos, QueryType.ByPos, this.heightOracle, 0, 0), this.scaler);
@@ -9623,7 +9674,7 @@ class BigScaler {
9623
9674
  domBottom: 0
9624
9675
  };
9625
9676
  });
9626
- this.scale = (7000000 /* VP.MaxDOMHeight */ - vpHeight) / (heightMap.height - vpHeight);
9677
+ this.scale = (7000000 /* MaxDOMHeight */ - vpHeight) / (heightMap.height - vpHeight);
9627
9678
  for (let obj of this.viewports) {
9628
9679
  obj.domTop = domBase + (obj.top - base) * this.scale;
9629
9680
  domBase = obj.domBottom = obj.domTop + (obj.bottom - obj.top);
@@ -9653,7 +9704,7 @@ function scaleBlock(block, scaler) {
9653
9704
  if (scaler.scale == 1) return block;
9654
9705
  let bTop = scaler.toDOM(block.top),
9655
9706
  bBottom = scaler.toDOM(block.bottom);
9656
- return new BlockInfo(block.from, block.length, bTop, bBottom - bTop, block.children && block.children.map(b => scaleBlock(b, scaler)), block.deco);
9707
+ return new BlockInfo(block.from, block.length, bTop, bBottom - bTop, Array.isArray(block._content) ? block._content.map(b => scaleBlock(b, scaler)) : block._content);
9657
9708
  }
9658
9709
  const theme = /*@__PURE__*/Facet.define({
9659
9710
  combine: strs => strs.join(" ")
@@ -10517,7 +10568,7 @@ class DOMObserver {
10517
10568
  let cView = this.view.docView.nearest(rec.target);
10518
10569
  if (!cView || cView.ignoreMutation(rec)) return null;
10519
10570
  cView.markDirty(rec.type == "attributes");
10520
- if (rec.type == "attributes") cView.dirty |= 4 /* Dirty.Attrs */;
10571
+ if (rec.type == "attributes") cView.dirty |= 4 /* Attrs */;
10521
10572
  if (rec.type == "childList") {
10522
10573
  let childBefore = findChild(cView, rec.previousSibling || rec.target.previousSibling, -1);
10523
10574
  let childAfter = findChild(cView, rec.nextSibling || rec.target.nextSibling, 1);
@@ -10633,6 +10684,58 @@ line number gutter. It handles events and dispatches state
10633
10684
  transactions for editing actions.
10634
10685
  */
10635
10686
  class EditorView {
10687
+ /**
10688
+ Construct a new view. You'll want to either provide a `parent`
10689
+ option, or put `view.dom` into your document after creating a
10690
+ view, so that the user can see the editor.
10691
+ */
10692
+ constructor() {
10693
+ let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10694
+ this.plugins = [];
10695
+ this.pluginMap = new Map();
10696
+ this.editorAttrs = {};
10697
+ this.contentAttrs = {};
10698
+ this.bidiCache = [];
10699
+ this.destroyed = false;
10700
+ /**
10701
+ @internal
10702
+ */
10703
+ this.updateState = 2 /* Updating */;
10704
+ /**
10705
+ @internal
10706
+ */
10707
+ this.measureScheduled = -1;
10708
+ /**
10709
+ @internal
10710
+ */
10711
+ this.measureRequests = [];
10712
+ this.contentDOM = document.createElement("div");
10713
+ this.scrollDOM = document.createElement("div");
10714
+ this.scrollDOM.tabIndex = -1;
10715
+ this.scrollDOM.className = "cm-scroller";
10716
+ this.scrollDOM.appendChild(this.contentDOM);
10717
+ this.announceDOM = document.createElement("div");
10718
+ this.announceDOM.style.cssText = "position: fixed; top: -10000px";
10719
+ this.announceDOM.setAttribute("aria-live", "polite");
10720
+ this.dom = document.createElement("div");
10721
+ this.dom.appendChild(this.announceDOM);
10722
+ this.dom.appendChild(this.scrollDOM);
10723
+ this._dispatch = config.dispatch || (tr => this.update([tr]));
10724
+ this.dispatch = this.dispatch.bind(this);
10725
+ this._root = config.root || getRoot(config.parent) || document;
10726
+ this.viewState = new ViewState(config.state || EditorState.create(config));
10727
+ this.plugins = this.state.facet(viewPlugin).map(spec => new PluginInstance(spec));
10728
+ for (let plugin of this.plugins) plugin.update(this);
10729
+ this.observer = new DOMObserver(this);
10730
+ this.inputState = new InputState(this);
10731
+ this.inputState.ensureHandlers(this, this.plugins);
10732
+ this.docView = new DocView(this);
10733
+ this.mountStyles();
10734
+ this.updateAttrs();
10735
+ this.updateState = 0 /* Idle */;
10736
+ this.requestMeasure();
10737
+ if (config.parent) config.parent.appendChild(this.dom);
10738
+ }
10636
10739
  /**
10637
10740
  The current editor state.
10638
10741
  */
@@ -10696,58 +10799,6 @@ class EditorView {
10696
10799
  get win() {
10697
10800
  return this.dom.ownerDocument.defaultView || window;
10698
10801
  }
10699
- /**
10700
- Construct a new view. You'll want to either provide a `parent`
10701
- option, or put `view.dom` into your document after creating a
10702
- view, so that the user can see the editor.
10703
- */
10704
- constructor() {
10705
- let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10706
- this.plugins = [];
10707
- this.pluginMap = new Map();
10708
- this.editorAttrs = {};
10709
- this.contentAttrs = {};
10710
- this.bidiCache = [];
10711
- this.destroyed = false;
10712
- /**
10713
- @internal
10714
- */
10715
- this.updateState = 2 /* UpdateState.Updating */;
10716
- /**
10717
- @internal
10718
- */
10719
- this.measureScheduled = -1;
10720
- /**
10721
- @internal
10722
- */
10723
- this.measureRequests = [];
10724
- this.contentDOM = document.createElement("div");
10725
- this.scrollDOM = document.createElement("div");
10726
- this.scrollDOM.tabIndex = -1;
10727
- this.scrollDOM.className = "cm-scroller";
10728
- this.scrollDOM.appendChild(this.contentDOM);
10729
- this.announceDOM = document.createElement("div");
10730
- this.announceDOM.style.cssText = "position: fixed; top: -10000px";
10731
- this.announceDOM.setAttribute("aria-live", "polite");
10732
- this.dom = document.createElement("div");
10733
- this.dom.appendChild(this.announceDOM);
10734
- this.dom.appendChild(this.scrollDOM);
10735
- this._dispatch = config.dispatch || (tr => this.update([tr]));
10736
- this.dispatch = this.dispatch.bind(this);
10737
- this._root = config.root || getRoot(config.parent) || document;
10738
- this.viewState = new ViewState(config.state || EditorState.create(config));
10739
- this.plugins = this.state.facet(viewPlugin).map(spec => new PluginInstance(spec));
10740
- for (let plugin of this.plugins) plugin.update(this);
10741
- this.observer = new DOMObserver(this);
10742
- this.inputState = new InputState(this);
10743
- this.inputState.ensureHandlers(this, this.plugins);
10744
- this.docView = new DocView(this);
10745
- this.mountStyles();
10746
- this.updateAttrs();
10747
- this.updateState = 0 /* UpdateState.Idle */;
10748
- this.requestMeasure();
10749
- if (config.parent) config.parent.appendChild(this.dom);
10750
- }
10751
10802
  dispatch() {
10752
10803
  let tr = arguments.length == 1 && (arguments.length <= 0 ? undefined : arguments[0]) instanceof Transaction ? arguments.length <= 0 ? undefined : arguments[0] : this.state.update(...arguments);
10753
10804
  this._dispatch(tr, this);
@@ -10761,7 +10812,7 @@ class EditorView {
10761
10812
  as a primitive.
10762
10813
  */
10763
10814
  update(transactions) {
10764
- if (this.updateState != 0 /* UpdateState.Idle */) throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
10815
+ if (this.updateState != 0 /* Idle */) throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
10765
10816
  let redrawn = false,
10766
10817
  attrsChanged = false,
10767
10818
  update;
@@ -10780,13 +10831,13 @@ class EditorView {
10780
10831
  if (transactions.some(tr => tr.annotation(isFocusChange))) {
10781
10832
  this.inputState.notifiedFocused = focus;
10782
10833
  // If a focus-change transaction is being dispatched, set this update flag.
10783
- focusFlag = 1 /* UpdateFlag.Focus */;
10834
+ focusFlag = 1 /* Focus */;
10784
10835
  } else if (focus != this.inputState.notifiedFocused) {
10785
10836
  this.inputState.notifiedFocused = focus;
10786
10837
  // Schedule a separate focus transaction if necessary, otherwise
10787
10838
  // add a flag to this update
10788
10839
  dispatchFocus = focusChangeTransaction(state, focus);
10789
- if (!dispatchFocus) focusFlag = 1 /* UpdateFlag.Focus */;
10840
+ if (!dispatchFocus) focusFlag = 1 /* Focus */;
10790
10841
  }
10791
10842
  // If there was a pending DOM change, eagerly read it and try to
10792
10843
  // apply it after the given transactions.
@@ -10807,7 +10858,7 @@ class EditorView {
10807
10858
  update.flags |= focusFlag;
10808
10859
  let scrollTarget = this.viewState.scrollTarget;
10809
10860
  try {
10810
- this.updateState = 2 /* UpdateState.Updating */;
10861
+ this.updateState = 2 /* Updating */;
10811
10862
  for (let tr of transactions) {
10812
10863
  if (scrollTarget) scrollTarget = scrollTarget.map(tr.changes);
10813
10864
  if (tr.scrollIntoView) {
@@ -10830,7 +10881,7 @@ class EditorView {
10830
10881
  this.showAnnouncements(transactions);
10831
10882
  this.docView.updateSelection(redrawn, transactions.some(tr => tr.isUserEvent("select.pointer")));
10832
10883
  } finally {
10833
- this.updateState = 0 /* UpdateState.Idle */;
10884
+ this.updateState = 0 /* Idle */;
10834
10885
  }
10835
10886
 
10836
10887
  if (update.startState.facet(theme) != update.state.facet(theme)) this.viewState.mustMeasureContent = true;
@@ -10851,12 +10902,12 @@ class EditorView {
10851
10902
  [`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
10852
10903
  */
10853
10904
  setState(newState) {
10854
- if (this.updateState != 0 /* UpdateState.Idle */) throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
10905
+ if (this.updateState != 0 /* Idle */) throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
10855
10906
  if (this.destroyed) {
10856
10907
  this.viewState.state = newState;
10857
10908
  return;
10858
10909
  }
10859
- this.updateState = 2 /* UpdateState.Updating */;
10910
+ this.updateState = 2 /* Updating */;
10860
10911
  let hadFocus = this.hasFocus;
10861
10912
  try {
10862
10913
  for (let plugin of this.plugins) plugin.destroy(this);
@@ -10870,7 +10921,7 @@ class EditorView {
10870
10921
  this.updateAttrs();
10871
10922
  this.bidiCache = [];
10872
10923
  } finally {
10873
- this.updateState = 0 /* UpdateState.Idle */;
10924
+ this.updateState = 0 /* Idle */;
10874
10925
  }
10875
10926
 
10876
10927
  if (hadFocus) this.focus();
@@ -10910,17 +10961,29 @@ class EditorView {
10910
10961
  this.measureScheduled = 0; // Prevent requestMeasure calls from scheduling another animation frame
10911
10962
  if (flush) this.observer.forceFlush();
10912
10963
  let updated = null;
10964
+ let sDOM = this.scrollDOM,
10965
+ {
10966
+ scrollTop
10967
+ } = sDOM;
10913
10968
  let {
10914
- scrollHeight,
10915
- scrollTop,
10916
- clientHeight
10917
- } = this.scrollDOM;
10918
- let refHeight = scrollTop > scrollHeight - clientHeight - 4 ? scrollHeight : scrollTop;
10969
+ scrollAnchorPos,
10970
+ scrollAnchorHeight
10971
+ } = this.viewState;
10972
+ this.viewState.scrollAnchorHeight = -1;
10973
+ if (scrollAnchorHeight < 0 || scrollTop != this.viewState.scrollTop) {
10974
+ if (scrollTop > sDOM.scrollHeight - sDOM.clientHeight - 4) {
10975
+ scrollAnchorPos = -1;
10976
+ scrollAnchorHeight = this.viewState.heightMap.height;
10977
+ } else {
10978
+ let block = this.viewState.lineBlockAtHeight(scrollTop);
10979
+ scrollAnchorPos = block.from;
10980
+ scrollAnchorHeight = block.top;
10981
+ }
10982
+ }
10919
10983
  try {
10920
10984
  for (let i = 0;; i++) {
10921
- this.updateState = 1 /* UpdateState.Measuring */;
10985
+ this.updateState = 1 /* Measuring */;
10922
10986
  let oldViewport = this.viewport;
10923
- let refBlock = this.viewState.lineBlockAtHeight(refHeight);
10924
10987
  let changed = this.viewState.measure(this);
10925
10988
  if (!changed && !this.measureRequests.length && this.viewState.scrollTarget == null) break;
10926
10989
  if (i > 5) {
@@ -10929,7 +10992,7 @@ class EditorView {
10929
10992
  }
10930
10993
  let measuring = [];
10931
10994
  // Only run measure requests in this cycle when the viewport didn't change
10932
- if (!(changed & 4 /* UpdateFlag.Viewport */)) [this.measureRequests, measuring] = [measuring, this.measureRequests];
10995
+ if (!(changed & 4 /* Viewport */)) [this.measureRequests, measuring] = [measuring, this.measureRequests];
10933
10996
  let measured = measuring.map(m => {
10934
10997
  try {
10935
10998
  return m.read(this);
@@ -10943,7 +11006,7 @@ class EditorView {
10943
11006
  scrolled = false;
10944
11007
  update.flags |= changed;
10945
11008
  if (!updated) updated = update;else updated.flags |= changed;
10946
- this.updateState = 2 /* UpdateState.Updating */;
11009
+ this.updateState = 2 /* Updating */;
10947
11010
  if (!update.empty) {
10948
11011
  this.updatePlugins(update);
10949
11012
  this.inputState.update(update);
@@ -10963,19 +11026,21 @@ class EditorView {
10963
11026
  this.docView.scrollIntoView(this.viewState.scrollTarget);
10964
11027
  this.viewState.scrollTarget = null;
10965
11028
  scrolled = true;
10966
- } else {
10967
- let diff = this.viewState.lineBlockAt(refBlock.from).top - refBlock.top;
11029
+ } else if (scrollAnchorHeight > -1) {
11030
+ let newAnchorHeight = scrollAnchorPos < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(scrollAnchorPos).top;
11031
+ let diff = newAnchorHeight - scrollAnchorHeight;
10968
11032
  if (diff > 1 || diff < -1) {
10969
- this.scrollDOM.scrollTop += diff;
11033
+ sDOM.scrollTop = scrollTop + diff;
10970
11034
  scrolled = true;
10971
11035
  }
10972
11036
  }
10973
11037
  }
10974
11038
  if (redrawn) this.docView.updateSelection(true);
10975
11039
  if (this.viewport.from == oldViewport.from && this.viewport.to == oldViewport.to && !scrolled && this.measureRequests.length == 0) break;
11040
+ scrollAnchorHeight = -1;
10976
11041
  }
10977
11042
  } finally {
10978
- this.updateState = 0 /* UpdateState.Idle */;
11043
+ this.updateState = 0 /* Idle */;
10979
11044
  this.measureScheduled = -1;
10980
11045
  }
10981
11046
  if (updated && !updated.empty) for (let listener of this.state.facet(updateListener)) listener(updated);
@@ -11026,8 +11091,8 @@ class EditorView {
11026
11091
  StyleModule.mount(this.root, this.styleModules.concat(baseTheme$1$1).reverse());
11027
11092
  }
11028
11093
  readMeasured() {
11029
- if (this.updateState == 2 /* UpdateState.Updating */) throw new Error("Reading the editor layout isn't allowed during an update");
11030
- if (this.updateState == 0 /* UpdateState.Idle */ && this.measureScheduled > -1) this.measure(false);
11094
+ if (this.updateState == 2 /* Updating */) throw new Error("Reading the editor layout isn't allowed during an update");
11095
+ if (this.updateState == 0 /* Idle */ && this.measureScheduled > -1) this.measure(false);
11031
11096
  }
11032
11097
  /**
11033
11098
  Schedule a layout measurement, optionally providing callbacks to
@@ -11797,13 +11862,6 @@ function wrappedLine(view, pos, inside) {
11797
11862
  type: BlockType.Text
11798
11863
  };
11799
11864
  }
11800
- function blockAt(view, pos) {
11801
- let line = view.lineBlockAt(pos);
11802
- if (Array.isArray(line.type)) for (let l of line.type) {
11803
- if (l.to > pos || l.to == pos && (l.to == line.to || l.type == BlockType.Text)) return l;
11804
- }
11805
- return line;
11806
- }
11807
11865
  function rectanglesForRange(view, className, range) {
11808
11866
  if (range.to <= view.viewport.from || range.from >= view.viewport.to) return [];
11809
11867
  let from = Math.max(range.from, view.viewport.from),
@@ -11820,21 +11878,19 @@ function rectanglesForRange(view, className, range) {
11820
11878
  endBlock = blockAt(view, to);
11821
11879
  let visualStart = startBlock.type == BlockType.Text ? startBlock : null;
11822
11880
  let visualEnd = endBlock.type == BlockType.Text ? endBlock : null;
11823
- if (view.lineWrapping) {
11824
- if (visualStart) visualStart = wrappedLine(view, from, visualStart);
11825
- if (visualEnd) visualEnd = wrappedLine(view, to, visualEnd);
11826
- }
11881
+ if (visualStart && (view.lineWrapping || startBlock.widgetLineBreaks)) visualStart = wrappedLine(view, from, visualStart);
11882
+ if (visualEnd && (view.lineWrapping || endBlock.widgetLineBreaks)) visualEnd = wrappedLine(view, to, visualEnd);
11827
11883
  if (visualStart && visualEnd && visualStart.from == visualEnd.from) {
11828
11884
  return pieces(drawForLine(range.from, range.to, visualStart));
11829
11885
  } else {
11830
11886
  let top = visualStart ? drawForLine(range.from, null, visualStart) : drawForWidget(startBlock, false);
11831
11887
  let bottom = visualEnd ? drawForLine(null, range.to, visualEnd) : drawForWidget(endBlock, true);
11832
11888
  let between = [];
11833
- if ((visualStart || startBlock).to < (visualEnd || endBlock).from - (visualStart && visualEnd ? 1 : 0)) between.push(piece(leftSide, top.bottom, rightSide, bottom.top));else if (top.bottom < bottom.top && view.elementAtHeight((top.bottom + bottom.top) / 2).type == BlockType.Text) top.bottom = bottom.top = (top.bottom + bottom.top) / 2;
11889
+ if ((visualStart || startBlock).to < (visualEnd || endBlock).from - (visualStart && visualEnd ? 1 : 0) || startBlock.widgetLineBreaks > 1 && top.bottom + view.defaultLineHeight / 2 < bottom.top) between.push(piece(leftSide, top.bottom, rightSide, bottom.top));else if (top.bottom < bottom.top && view.elementAtHeight((top.bottom + bottom.top) / 2).type == BlockType.Text) top.bottom = bottom.top = (top.bottom + bottom.top) / 2;
11834
11890
  return pieces(top).concat(between).concat(pieces(bottom));
11835
11891
  }
11836
11892
  function piece(left, top, right, bottom) {
11837
- return new RectangleMarker(className, left - base.left, top - base.top - 0.01 /* C.Epsilon */, right - left, bottom - top + 0.01 /* C.Epsilon */);
11893
+ return new RectangleMarker(className, left - base.left, top - base.top - 0.01 /* Epsilon */, right - left, bottom - top + 0.01 /* Epsilon */);
11838
11894
  }
11839
11895
 
11840
11896
  function pieces(_ref6) {
@@ -12794,12 +12850,12 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class {
12794
12850
  continue;
12795
12851
  }
12796
12852
  let arrow = tooltip.arrow ? tView.dom.querySelector(".cm-tooltip-arrow") : null;
12797
- let arrowHeight = arrow ? 7 /* Arrow.Size */ : 0;
12853
+ let arrowHeight = arrow ? 7 /* Size */ : 0;
12798
12854
  let width = size.right - size.left,
12799
12855
  height = (_a = knownHeight.get(tView)) !== null && _a !== void 0 ? _a : size.bottom - size.top;
12800
12856
  let offset = tView.offset || noOffset,
12801
12857
  ltr = this.view.textDirection == Direction.LTR;
12802
- let left = size.width > space.right - space.left ? ltr ? space.left : space.right - size.width : ltr ? Math.min(pos.left - (arrow ? 14 /* Arrow.Offset */ : 0) + offset.x, space.right - width) : Math.max(space.left, pos.left - width + (arrow ? 14 /* Arrow.Offset */ : 0) - offset.x);
12858
+ let left = size.width > space.right - space.left ? ltr ? space.left : space.right - size.width : ltr ? Math.min(pos.left - (arrow ? 14 /* Offset */ : 0) + offset.x, space.right - width) : Math.max(space.left, pos.left - width + (arrow ? 14 /* Offset */ : 0) - offset.x);
12803
12859
  let above = !!tooltip.above;
12804
12860
  if (!tooltip.strictSide && (above ? pos.top - (size.bottom - size.top) - offset.y < space.top : pos.bottom + (size.bottom - size.top) + offset.y > space.bottom) && above == space.bottom - pos.bottom > pos.top - space.top) above = !above;
12805
12861
  let spaceVert = (above ? pos.top - space.top : space.bottom - pos.bottom) - arrowHeight;
@@ -12823,7 +12879,7 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class {
12823
12879
  dom.style.top = top + "px";
12824
12880
  dom.style.left = left + "px";
12825
12881
  }
12826
- if (arrow) arrow.style.left = `${pos.left + (ltr ? offset.x : -offset.x) - (left + 14 /* Arrow.Offset */ - 7 /* Arrow.Size */)}px`;
12882
+ if (arrow) arrow.style.left = `${pos.left + (ltr ? offset.x : -offset.x) - (left + 14 /* Offset */ - 7 /* Size */)}px`;
12827
12883
  if (tView.overlap !== true) others.push({
12828
12884
  left,
12829
12885
  top,
@@ -12868,8 +12924,8 @@ const baseTheme$2 = /*@__PURE__*/EditorView.baseTheme({
12868
12924
  color: "white"
12869
12925
  },
12870
12926
  ".cm-tooltip-arrow": {
12871
- height: `${7 /* Arrow.Size */}px`,
12872
- width: `${7 /* Arrow.Size */ * 2}px`,
12927
+ height: `${7 /* Size */}px`,
12928
+ width: `${7 /* Size */ * 2}px`,
12873
12929
  position: "absolute",
12874
12930
  zIndex: -1,
12875
12931
  overflow: "hidden",
@@ -12878,26 +12934,26 @@ const baseTheme$2 = /*@__PURE__*/EditorView.baseTheme({
12878
12934
  position: "absolute",
12879
12935
  width: 0,
12880
12936
  height: 0,
12881
- borderLeft: `${7 /* Arrow.Size */}px solid transparent`,
12882
- borderRight: `${7 /* Arrow.Size */}px solid transparent`
12937
+ borderLeft: `${7 /* Size */}px solid transparent`,
12938
+ borderRight: `${7 /* Size */}px solid transparent`
12883
12939
  },
12884
12940
  ".cm-tooltip-above &": {
12885
- bottom: `-${7 /* Arrow.Size */}px`,
12941
+ bottom: `-${7 /* Size */}px`,
12886
12942
  "&:before": {
12887
- borderTop: `${7 /* Arrow.Size */}px solid #bbb`
12943
+ borderTop: `${7 /* Size */}px solid #bbb`
12888
12944
  },
12889
12945
  "&:after": {
12890
- borderTop: `${7 /* Arrow.Size */}px solid #f5f5f5`,
12946
+ borderTop: `${7 /* Size */}px solid #f5f5f5`,
12891
12947
  bottom: "1px"
12892
12948
  }
12893
12949
  },
12894
12950
  ".cm-tooltip-below &": {
12895
- top: `-${7 /* Arrow.Size */}px`,
12951
+ top: `-${7 /* Size */}px`,
12896
12952
  "&:before": {
12897
- borderBottom: `${7 /* Arrow.Size */}px solid #bbb`
12953
+ borderBottom: `${7 /* Size */}px solid #bbb`
12898
12954
  },
12899
12955
  "&:after": {
12900
- borderBottom: `${7 /* Arrow.Size */}px solid #f5f5f5`,
12956
+ borderBottom: `${7 /* Size */}px solid #f5f5f5`,
12901
12957
  top: "1px"
12902
12958
  }
12903
12959
  }
@@ -12925,10 +12981,6 @@ const showTooltip = /*@__PURE__*/Facet.define({
12925
12981
  });
12926
12982
  const showHoverTooltip = /*@__PURE__*/Facet.define();
12927
12983
  class HoverTooltipHost {
12928
- // Needs to be static so that host tooltip instances always match
12929
- static create(view) {
12930
- return new HoverTooltipHost(view);
12931
- }
12932
12984
  constructor(view) {
12933
12985
  this.view = view;
12934
12986
  this.mounted = false;
@@ -12936,6 +12988,10 @@ class HoverTooltipHost {
12936
12988
  this.dom.classList.add("cm-tooltip-hover");
12937
12989
  this.manager = new TooltipViewManager(view, showHoverTooltip, t => this.createHostedView(t));
12938
12990
  }
12991
+ // Needs to be static so that host tooltip instances always match
12992
+ static create(view) {
12993
+ return new HoverTooltipHost(view);
12994
+ }
12939
12995
  createHostedView(tooltip) {
12940
12996
  let hostedView = tooltip.create(this.view);
12941
12997
  hostedView.dom.classList.add("cm-tooltip-section");
@@ -13054,7 +13110,7 @@ class HoverPlugin {
13054
13110
  pos
13055
13111
  } = tooltip || this.pending,
13056
13112
  end = (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.end) !== null && _a !== void 0 ? _a : pos;
13057
- if (pos == end ? this.view.posAtCoords(this.lastMove) != pos : !isOverRange(this.view, pos, end, event.clientX, event.clientY, 6 /* Hover.MaxDist */)) {
13113
+ if (pos == end ? this.view.posAtCoords(this.lastMove) != pos : !isOverRange(this.view, pos, end, event.clientX, event.clientY, 6 /* MaxDist */)) {
13058
13114
  this.view.dispatch({
13059
13115
  effects: this.setHover.of(null)
13060
13116
  });
@@ -13132,7 +13188,7 @@ function hoverTooltip(source) {
13132
13188
  },
13133
13189
  provide: f => showHoverTooltip.from(f)
13134
13190
  });
13135
- return [hoverState, ViewPlugin.define(view => new HoverPlugin(view, source, hoverState, setHover, options.hoverTime || 300 /* Hover.Time */)), showHoverTooltipHost];
13191
+ return [hoverState, ViewPlugin.define(view => new HoverPlugin(view, source, hoverState, setHover, options.hoverTime || 300 /* Time */)), showHoverTooltipHost];
13136
13192
  }
13137
13193
  /**
13138
13194
  Get the active tooltip view for a given tooltip, if available.
@@ -18535,4 +18591,4 @@ function createTokenType(extra, tagStr) {
18535
18591
  return type.id;
18536
18592
  }
18537
18593
 
18538
- export { rectangularSelection as $, Annotation as A, gutter as B, Compartment as C, Direction as D, EditorView as E, Facet as F, RangeSet as G, showTooltip as H, IndentContext as I, GutterMarker as J, lineNumbers as K, highlightActiveLineGutter as L, highlightSpecialChars as M, NodeProp as N, foldGutter as O, Prec as P, drawSelection as Q, RangeSetBuilder as R, StateField as S, Transaction as T, dropCursor as U, ViewPlugin as V, WidgetType as W, indentOnInput as X, syntaxHighlighting as Y, defaultHighlightStyle as Z, bracketMatching as _, EditorState as a, crosshairCursor as a0, highlightActiveLine as a1, foldKeymap as a2, styleTags as a3, tags as a4, LanguageSupport as a5, LRLanguage as a6, indentNodeProp as a7, continuedIndent as a8, flatIndent as a9, delimitedIndent as aa, foldNodeProp as ab, foldInside as ac, sublanguageProp as ad, IterMode as ae, defineLanguageFacet as af, NodeWeakMap as ag, parseMixed as ah, bracketMatchingHandle as ai, getTooltip as aj, MapMode as ak, RangeValue as al, HighlightStyle as am, Parser as an, NodeSet as ao, NodeType as ap, DefaultBufferLength as aq, Tree as ar, Tag as as, Language as at, languageDataProp as au, foldService as av, LanguageDescription as aw, ParseContext as ax, EditorSelection as b, combineConfig as c, ChangeSet as d, ChangeDesc as e, Text as f, getIndentation as g, indentUnit as h, indentString as i, countColumn as j, keymap as k, getIndentUnit as l, StateEffect as m, matchBrackets as n, findClusterBreak as o, Decoration as p, codePointAt as q, codePointSize as r, syntaxTree as s, getPanel as t, CharCategory as u, fromCodePoint as v, showPanel as w, runScopeHandlers as x, hoverTooltip as y, logException as z };
18594
+ export { RangeSet as $, Annotation as A, highlightSpecialChars as B, Compartment as C, Direction as D, EditorView as E, Facet as F, foldGutter as G, drawSelection as H, IndentContext as I, dropCursor as J, indentOnInput as K, syntaxHighlighting as L, defaultHighlightStyle as M, NodeProp as N, bracketMatching as O, Prec as P, rectangularSelection as Q, RangeSetBuilder as R, StateField as S, Transaction as T, crosshairCursor as U, ViewPlugin as V, highlightActiveLine as W, foldKeymap as X, hoverTooltip as Y, logException as Z, gutter as _, EditorState as a, showTooltip as a0, WidgetType as a1, GutterMarker as a2, styleTags as a3, tags as a4, LanguageSupport as a5, LRLanguage as a6, indentNodeProp as a7, continuedIndent as a8, flatIndent as a9, delimitedIndent as aa, foldNodeProp as ab, foldInside as ac, sublanguageProp as ad, IterMode as ae, defineLanguageFacet as af, NodeWeakMap as ag, parseMixed as ah, bracketMatchingHandle as ai, getTooltip as aj, MapMode as ak, RangeValue as al, HighlightStyle as am, Parser as an, NodeSet as ao, NodeType as ap, DefaultBufferLength as aq, Tree as ar, Tag as as, Language as at, languageDataProp as au, foldService as av, LanguageDescription as aw, ParseContext as ax, EditorSelection as b, combineConfig as c, ChangeSet as d, ChangeDesc as e, Text as f, getIndentation as g, indentUnit as h, indentString as i, countColumn as j, keymap as k, getIndentUnit as l, StateEffect as m, matchBrackets as n, findClusterBreak as o, Decoration as p, codePointAt as q, codePointSize as r, syntaxTree as s, getPanel as t, CharCategory as u, fromCodePoint as v, showPanel as w, runScopeHandlers as x, lineNumbers as y, highlightActiveLineGutter as z };