@onereach/ui-components 6.2.0-beta.3289.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.
- package/dist/bundled/{v3/_baseAssignValue-2250dbc9.js → v2/_baseAssignValue-22e630c1.js} +1 -1
- package/dist/bundled/v2/{_baseIsEqual-fe2002b6.js → _baseIsEqual-a1cc156c.js} +5 -5
- package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +1 -1
- package/dist/bundled/v2/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +1 -1
- package/dist/bundled/v2/components/OrCode/OrCode.js +3 -3
- package/dist/bundled/v2/components/OrCode/index.js +5 -3
- package/dist/bundled/v2/components/OrCode/lang.js +5 -3
- package/dist/bundled/v2/components/OrCode/libs.js +5 -3
- package/dist/bundled/v2/components/OrCode/theme.js +1 -1
- package/dist/bundled/v2/components/OrCodeV3/OrCode.js +46 -30
- package/dist/bundled/v2/components/OrCodeV3/OrCode.vue.d.ts +4 -3
- package/dist/bundled/v2/components/OrCodeV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrCodeV3/index.js +3 -0
- package/dist/bundled/v2/components/OrCodeV3/libs.d.ts +3 -0
- package/dist/bundled/v2/components/OrCodeV3/libs.js +3 -0
- package/dist/bundled/v2/components/OrCollapse/OrCollapse.js +1 -1
- package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +2 -2
- package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +3 -3
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +3 -3
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +2 -2
- package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +4 -4
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +3 -3
- package/dist/bundled/v2/components/OrFloating/OrFloating.js +1 -1
- package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
- package/dist/bundled/v2/components/OrInput/OrInput.js +1 -1
- package/dist/bundled/v2/components/OrList/OrList.js +8 -8
- package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +1 -1
- package/dist/bundled/v2/components/OrModal/OrModal.js +1347 -3
- package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
- package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +1 -1
- package/dist/bundled/v2/components/OrPassword/OrPassword.js +1 -1
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +2 -2
- package/dist/bundled/v2/components/OrProgress/OrProgress.js +1 -1
- package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +2 -2
- package/dist/bundled/v2/components/OrRadio/OrRadio.js +2 -2
- package/dist/bundled/v2/components/OrSearch/OrSearch.js +1 -1
- package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +1 -1
- package/dist/bundled/v2/components/OrSelect/OrSelect.js +7 -7
- package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +1 -1
- package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +1 -1
- package/dist/bundled/v2/components/OrSkeletonText/OrSkeletonText.js +1 -1
- package/dist/bundled/v2/components/OrSkeletonTextV3/OrSkeletonText.js +1 -1
- package/dist/bundled/v2/components/OrSlider/OrSlider.js +2 -2
- package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +1 -1
- package/dist/bundled/v2/components/OrTextarea/OrTextarea.js +1 -1
- package/dist/bundled/v2/components/OrTextbox/OrTextbox.js +1 -1
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +2 -2
- package/dist/bundled/v2/components/OrToast/Timer.js +1 -1
- package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +1 -1
- package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +1 -1
- package/dist/bundled/v2/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v2/components/OrTreeV3/OrTree.js +1 -1
- package/dist/bundled/v2/components/index.d.ts +0 -1
- package/dist/bundled/v2/components/index.js +6 -5
- package/dist/bundled/{v3/dom-cec392f3.js → v2/dom-bb55b42a.js} +2 -2
- package/dist/bundled/v2/{eq-44ea4d70.js → eq-95cd2573.js} +1 -1
- package/dist/bundled/{v3/get-34aa21f4.js → v2/get-ab1b7d93.js} +3 -3
- package/dist/bundled/v2/hooks/useOverflow.js +2 -2
- package/dist/bundled/v2/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +1 -1
- package/dist/bundled/v2/{index-2b20f5f5.js → index-048e41ad.js} +2 -2
- package/dist/bundled/v2/{index-0c287ab6.js → index-0789b976.js} +3 -3
- package/dist/bundled/v2/index-0ad0f605.js +826 -0
- package/dist/bundled/{v3/index-de4975a3.js → v2/index-379ec85d.js} +10 -842
- package/dist/bundled/v2/index-5e5d18d5.js +759 -0
- package/dist/bundled/v2/index-7211e1c5.js +361 -0
- package/dist/bundled/{v3/index-749f3444.js → v2/index-82718479.js} +1 -1
- package/dist/bundled/v2/{index-06f6bbe4.js → index-8a1b5b9c.js} +1 -1
- package/dist/bundled/v2/index-9e0bdde8.js +94 -0
- package/dist/bundled/v2/{index-3cae2d25.js → index-b261a47e.js} +462 -294
- package/dist/bundled/v2/index-c321391a.js +1892 -0
- package/dist/bundled/v2/index-d02cdc81.js +1598 -0
- package/dist/bundled/{v3/index-3e178101.js → v2/index-ea7a689d.js} +32 -471
- package/dist/bundled/v2/index.js +8 -7
- package/dist/bundled/{v3/isArrayLike-e7fb5cae.js → v2/isArrayLike-e46b8eac.js} +1 -1
- package/dist/bundled/v2/{isEqual-7a8e6106.js → isEqual-44382965.js} +1 -1
- package/dist/bundled/{v3/isObject-b7415fc1.js → v2/isObject-fe8b81fd.js} +1 -1
- package/dist/bundled/{v3/range-82efa3d4.js → v2/range-6f26eda4.js} +4 -4
- package/dist/bundled/v2/{round-567ede34.js → round-f34440f4.js} +4 -4
- package/dist/bundled/v2/{toFinite-bc59ffb0.js → toFinite-74227610.js} +1 -1
- package/dist/bundled/v2/{toInteger-9fa0151c.js → toInteger-2fd112a9.js} +1 -1
- package/dist/bundled/v2/{toString-b6e4472a.js → toString-f3196832.js} +1 -1
- package/dist/bundled/v2/utils/functions/dom.js +2 -2
- package/dist/bundled/v2/utils/index.js +1 -1
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-10c2add0.js → OrAvatar.vue_vue_type_script_lang-95fe92f9.js} +1 -1
- package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-aca902f2.js → OrBottomSheet.vue_vue_type_script_lang-33bfe3c4.js} +2 -2
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-db6595f6.js → OrButton.vue_vue_type_script_lang-85f1cb3f.js} +1 -1
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-0fb2b270.js → OrButton.vue_vue_type_script_lang-9d4ac135.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-bf9018d5.js → OrCardCollection.vue_vue_type_script_lang-0ba13713.js} +3 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-02606ec6.js → OrCardCollection.vue_vue_type_script_lang-fe769106.js} +3 -3
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-de28fcaf.js → OrCheckbox.vue_vue_type_script_lang-576b5f5d.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-2d4980de.js → OrCheckboxGroup.vue_vue_type_script_lang-c05088ee.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-8d9ed718.js → OrCheckboxTree.vue_vue_type_script_lang-bd0fa916.js} +2 -2
- package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-cacd81e5.js → OrChip.vue_vue_type_script_lang-8ccf3d2d.js} +1 -1
- package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-e1f37564.js → OrChips.vue_vue_type_script_lang-70be98b5.js} +1 -1
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-2300b956.js → OrCode.vue_vue_type_script_lang-1df17839.js} +5 -5
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-52b0ab4c.js → OrCode.vue_vue_type_script_lang-ad985f8f.js} +48 -32
- package/dist/bundled/v3/{OrCollapse.vue_vue_type_script_lang-be1c8c66.js → OrCollapse.vue_vue_type_script_lang-69503c45.js} +1 -1
- package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-95d92da0.js → OrColorPicker.vue_vue_type_script_lang-153ef60d.js} +3 -3
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-19922dd5.js → OrConfirm.vue_vue_type_script_lang-808367f7.js} +6 -6
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-4e9966f2.js → OrConfirm.vue_vue_type_script_lang-cf909881.js} +6 -6
- package/dist/bundled/v3/{OrContextMenu.vue_vue_type_script_lang-f40c0d92.js → OrContextMenu.vue_vue_type_script_lang-b4e0569b.js} +1 -1
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-04273abb.js → OrDatePicker.vue_vue_type_script_lang-b1130337.js} +4 -4
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-66b3611e.js → OrDateTimePicker.vue_vue_type_script_lang-37b1996e.js} +5 -5
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-73b5c809.js → OrDateTimePicker.vue_vue_type_script_lang-98f80113.js} +7 -7
- package/dist/bundled/v3/{OrDateTimePickerMonthSelect-2ff0e8f9.js → OrDateTimePickerMonthSelect-7fcfccdf.js} +3 -3
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-135da975.js → OrDateTimePickerPopoverHeader-78fe6852.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePickerTimeSelect-fe701e75.js → OrDateTimePickerTimeSelect-56bff361.js} +1 -1
- package/dist/bundled/v3/{OrFloating.vue_vue_type_script_lang-38aa1d83.js → OrFloating.vue_vue_type_script_lang-d579c010.js} +1 -1
- package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-f3cbff23.js → OrIcon.vue_vue_type_script_lang-23dad121.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-64e7b6ab.js → OrIconButton.vue_vue_type_script_lang-20210ebe.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-f6bf7dda.js → OrIconButton.vue_vue_type_script_lang-85c7ef74.js} +2 -2
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-0bdbf730.js → OrInlineInput.vue_vue_type_script_lang-e78cacec.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-72c9e44e.js → OrInlineTextEdit.vue_vue_type_script_lang-d7f24fd6.js} +4 -4
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-81430067.js → OrInlineTextarea.vue_vue_type_script_lang-e69604e1.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-39d1a293.js → OrInput.vue_vue_type_script_lang-4c9af1b9.js} +2 -2
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-515ff78a.js → OrInput.vue_vue_type_script_lang-863d3195.js} +2 -2
- package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-bc49c1ff.js → OrList.vue_vue_type_script_lang-cb637c9e.js} +11 -11
- package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-3d17e3d2.js → OrListOfInputs.vue_vue_type_script_lang-31f604eb.js} +4 -4
- package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-0ea76e45.js → OrLoader.vue_vue_type_script_lang-b0347c70.js} +1 -1
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-edc12857.js → OrMenu.vue_vue_type_script_lang-80d3a47b.js} +1 -1
- package/dist/bundled/v3/{useFocusTrap-2302b843.js → OrModal.vue_vue_type_script_lang-22ca96e3.js} +100 -4
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-d2339f74.js → OrModal.vue_vue_type_script_lang-fe9b0d62.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-81d7cfef.js → OrNotification.vue_vue_type_script_lang-17ae96e3.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-8dafacd3.js → OrNotification.vue_vue_type_script_lang-bb93ca64.js} +1 -1
- package/dist/bundled/v3/{OrNumberInput.vue_vue_type_script_lang-b832e611.js → OrNumberInput.vue_vue_type_script_lang-4cc194fc.js} +1 -1
- package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-0c84fa14.js → OrOverflowMenu.vue_vue_type_script_lang-ab2d6d33.js} +5 -5
- package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-2b256188.js → OrOverlay.vue_vue_type_script_lang-7e9b1817.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-91dec212.js → OrPagination.vue_vue_type_script_lang-6e3a561d.js} +2 -2
- package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-9228b54e.js → OrPassword.vue_vue_type_script_lang-fc8438a8.js} +3 -3
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-2fba84de.js → OrPopover.vue_vue_type_script_lang-b6dba09f.js} +3 -3
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-56b4a5da.js → OrProgress.vue_vue_type_script_lang-78c933d7.js} +2 -2
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-c4bd7133.js → OrProgress.vue_vue_type_script_lang-a99362ae.js} +1 -1
- package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-a4f043e9.js → OrRadio.vue_vue_type_script_lang-3a551734.js} +2 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-6a34ea7a.js → OrSearch.vue_vue_type_script_lang-981f3cf0.js} +3 -3
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-47c2a5b0.js → OrSearch.vue_vue_type_script_lang-9e5da97d.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-0edae1cf.js → OrSelect.vue_vue_type_script_lang-d496bc7b.js} +11 -11
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-8b59bb49.js → OrSelect.vue_vue_type_script_lang-f651614d.js} +5 -5
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-cb96511d.js → OrSidebar.vue_vue_type_script_lang-3ea9752f.js} +2 -2
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-bd864765.js → OrSidebar.vue_vue_type_script_lang-f5d46ede.js} +1 -1
- package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-502607ef.js → OrSkeletonText.vue_vue_type_script_lang-26b3cfd1.js} +1 -1
- package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-cfe360bb.js → OrSkeletonText.vue_vue_type_script_lang-c2a5ab96.js} +1 -1
- package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-79cca9e2.js → OrSlider.vue_vue_type_script_lang-ef8699ca.js} +3 -3
- package/dist/bundled/v3/{OrSorting.vue_vue_type_script_lang-8ea37e10.js → OrSorting.vue_vue_type_script_lang-7496f136.js} +2 -2
- package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-33639493.js → OrStepper.vue_vue_type_script_lang-c7f9582b.js} +1 -1
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-fe6a5512.js → OrSwitch.vue_vue_type_script_lang-51b857e2.js} +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-97da5baa.js → OrTabs.vue_vue_type_script_lang-2e57804a.js} +2 -2
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-b62c0b79.js → OrTag.vue_vue_type_script_lang-0a36cba8.js} +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-62e1f5a7.js → OrTag.vue_vue_type_script_lang-b66887dd.js} +1 -1
- package/dist/bundled/v3/{OrTagInput.vue_vue_type_script_lang-bdbe85c7.js → OrTagInput.vue_vue_type_script_lang-a00eb885.js} +2 -2
- package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-cb8c3c31.js → OrTags.vue_vue_type_script_lang-938b34b7.js} +3 -3
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-5624556c.js → OrTextarea.vue_vue_type_script_lang-325050eb.js} +2 -2
- package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-d0db6077.js → OrTextbox.vue_vue_type_script_lang-5c706917.js} +3 -3
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-25e5dd01.js → OrTimePicker.vue_vue_type_script_lang-8c297fdd.js} +4 -4
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-ad659b6a.js → OrToastContainer.vue_vue_type_script_lang-07b75b00.js} +1 -1
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-9a3e66a2.js → OrToastContainer.vue_vue_type_script_lang-8d3ed93a.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-c0cc67c5.js → OrTooltip.vue_vue_type_script_lang-81dbde5d.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-288c978f.js → OrTooltip.vue_vue_type_script_lang-b201e580.js} +1 -1
- package/dist/bundled/v3/{OrTree.vue_vue_type_script_lang-ce5b0577.js → OrTree.vue_vue_type_script_lang-bd439beb.js} +2 -2
- package/dist/bundled/{v2/_baseAssignValue-2250dbc9.js → v3/_baseAssignValue-22e630c1.js} +1 -1
- package/dist/bundled/v3/{_baseIsEqual-fe2002b6.js → _baseIsEqual-a1cc156c.js} +5 -5
- package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +2 -2
- package/dist/bundled/v3/components/OrAvatar/index.js +1 -1
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
- package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
- package/dist/bundled/v3/components/OrBottomSheetV3/index.js +1 -1
- package/dist/bundled/v3/components/OrButtonV2/OrButton.js +2 -2
- package/dist/bundled/v3/components/OrButtonV2/index.js +2 -2
- package/dist/bundled/v3/components/OrButtonV3/OrButton.js +2 -2
- package/dist/bundled/v3/components/OrButtonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +2 -2
- package/dist/bundled/v3/components/OrCardCollection/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +2 -2
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +2 -2
- package/dist/bundled/v3/components/OrCheckbox/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrChip/OrChip.js +2 -2
- package/dist/bundled/v3/components/OrChip/index.js +1 -1
- package/dist/bundled/v3/components/OrChips/OrChips.js +2 -2
- package/dist/bundled/v3/components/OrChips/index.js +2 -2
- package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCode/index.js +6 -4
- package/dist/bundled/v3/components/OrCode/lang.js +5 -3
- package/dist/bundled/v3/components/OrCode/libs.js +5 -3
- package/dist/bundled/v3/components/OrCode/theme.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +4 -3
- package/dist/bundled/v3/components/OrCodeV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrCodeV3/index.js +4 -1
- package/dist/bundled/v3/components/OrCodeV3/libs.d.ts +3 -0
- package/dist/bundled/v3/components/OrCodeV3/libs.js +3 -0
- package/dist/bundled/v3/components/OrCollapse/OrCollapse.js +2 -2
- package/dist/bundled/v3/components/OrCollapse/index.js +1 -1
- package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +2 -2
- package/dist/bundled/v3/components/OrColorPicker/index.js +1 -1
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +2 -2
- package/dist/bundled/v3/components/OrConfirm/index.js +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +2 -2
- package/dist/bundled/v3/components/OrConfirmV3/index.js +1 -1
- package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.js +2 -2
- package/dist/bundled/v3/components/OrContextMenuV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +2 -2
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrDateTimePicker/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.js +2 -2
- package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +1 -1
- package/dist/bundled/v3/components/OrFloating/OrFloating.js +2 -2
- package/dist/bundled/v3/components/OrFloating/index.js +1 -1
- package/dist/bundled/v3/components/OrIcon/OrIcon.js +2 -2
- package/dist/bundled/v3/components/OrIcon/index.js +1 -1
- package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +2 -2
- package/dist/bundled/v3/components/OrIconButtonV2/index.js +1 -1
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +2 -2
- package/dist/bundled/v3/components/OrIconButtonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +2 -2
- package/dist/bundled/v3/components/OrInlineInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
- package/dist/bundled/v3/components/OrInlineTextEdit/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
- package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInput/OrInput.js +2 -2
- package/dist/bundled/v3/components/OrInput/index.js +1 -1
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +2 -2
- package/dist/bundled/v3/components/OrInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrList/OrList.js +2 -2
- package/dist/bundled/v3/components/OrList/index.js +1 -1
- package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +2 -2
- package/dist/bundled/v3/components/OrListOfInputs/index.js +1 -1
- package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +2 -2
- package/dist/bundled/v3/components/OrLoaderV3/index.js +1 -1
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +2 -2
- package/dist/bundled/v3/components/OrMenuV3/index.js +1 -1
- package/dist/bundled/v3/components/OrModal/OrModal.js +2 -2
- package/dist/bundled/v3/components/OrModal/index.js +1 -1
- package/dist/bundled/v3/components/OrModalV3/OrModal.js +2 -2
- package/dist/bundled/v3/components/OrModalV3/index.js +1 -1
- package/dist/bundled/v3/components/OrNotification/OrNotification.js +2 -2
- package/dist/bundled/v3/components/OrNotification/index.js +1 -1
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +2 -2
- package/dist/bundled/v3/components/OrNotificationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.js +2 -2
- package/dist/bundled/v3/components/OrNumberInput/index.js +1 -1
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
- package/dist/bundled/v3/components/OrOverflowMenu/index.js +1 -1
- package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +2 -2
- package/dist/bundled/v3/components/OrOverlayV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +2 -2
- package/dist/bundled/v3/components/OrPaginationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPassword/OrPassword.js +2 -2
- package/dist/bundled/v3/components/OrPassword/index.js +1 -1
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +2 -2
- package/dist/bundled/v3/components/OrPopoverV3/index.js +1 -1
- package/dist/bundled/v3/components/OrProgress/OrProgress.js +2 -2
- package/dist/bundled/v3/components/OrProgress/index.js +1 -1
- package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +2 -2
- package/dist/bundled/v3/components/OrProgressV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRadio/OrRadio.js +2 -2
- package/dist/bundled/v3/components/OrRadio/index.js +1 -1
- package/dist/bundled/v3/components/OrSearch/OrSearch.js +2 -2
- package/dist/bundled/v3/components/OrSearch/index.js +1 -1
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +2 -2
- package/dist/bundled/v3/components/OrSearchV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSelect/OrSelect.js +2 -2
- package/dist/bundled/v3/components/OrSelect/index.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +2 -2
- package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +2 -2
- package/dist/bundled/v3/components/OrSidebar/index.js +1 -1
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +2 -2
- package/dist/bundled/v3/components/OrSidebarV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeleton/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.js +2 -2
- package/dist/bundled/v3/components/OrSkeletonText/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.js +2 -2
- package/dist/bundled/v3/components/OrSkeletonTextV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeletonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSlider/OrSlider.js +2 -2
- package/dist/bundled/v3/components/OrSlider/index.js +1 -1
- package/dist/bundled/v3/components/OrSortingV3/OrSorting.js +2 -2
- package/dist/bundled/v3/components/OrSortingV3/index.js +1 -1
- package/dist/bundled/v3/components/OrStepper/OrStepper.js +2 -2
- package/dist/bundled/v3/components/OrStepper/index.js +1 -1
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +2 -2
- package/dist/bundled/v3/components/OrSwitchV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +2 -2
- package/dist/bundled/v3/components/OrTabsV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTag/OrTag.js +2 -2
- package/dist/bundled/v3/components/OrTag/index.js +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +2 -2
- package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagV3/OrTag.js +2 -2
- package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagsV3/OrTags.js +2 -2
- package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTextarea/OrTextarea.js +2 -2
- package/dist/bundled/v3/components/OrTextarea/index.js +1 -1
- package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +2 -2
- package/dist/bundled/v3/components/OrTextbox/index.js +1 -1
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrToast/OrToast.js +2 -2
- package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToast/index.js +1 -1
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +2 -2
- package/dist/bundled/v3/components/OrToastContainer/index.js +1 -1
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +2 -2
- package/dist/bundled/v3/components/OrToastContainerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/OrToast.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +2 -2
- package/dist/bundled/v3/components/OrTooltip/index.js +1 -1
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +2 -2
- package/dist/bundled/v3/components/OrTooltipV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTreeV3/OrTree.js +2 -2
- package/dist/bundled/v3/components/OrTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/index.d.ts +0 -1
- package/dist/bundled/v3/components/index.js +79 -78
- package/dist/bundled/{v2/dom-cec392f3.js → v3/dom-bb55b42a.js} +2 -2
- package/dist/bundled/v3/{eq-44ea4d70.js → eq-95cd2573.js} +1 -1
- package/dist/bundled/{v2/get-34aa21f4.js → v3/get-ab1b7d93.js} +3 -3
- package/dist/bundled/v3/hooks/useOverflow.js +2 -2
- package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +1 -1
- package/dist/bundled/v3/index-168d8a72.js +826 -0
- package/dist/bundled/v3/{index-0a01982b.js → index-2db1212e.js} +2 -2
- package/dist/bundled/{v2/index-de4975a3.js → v3/index-3074ab3c.js} +10 -842
- package/dist/bundled/v3/index-3de4069f.js +361 -0
- package/dist/bundled/{v2/index-dac0fb7c.js → v3/index-51eb57bd.js} +1 -1
- package/dist/bundled/v3/index-540ed5cb.js +1892 -0
- package/dist/bundled/v3/{index-40b35d94.js → index-5e8e7a46.js} +1 -1
- package/dist/bundled/v3/{index-3cae2d25.js → index-73699920.js} +462 -294
- package/dist/bundled/v3/index-a59e89b4.js +94 -0
- package/dist/bundled/v3/index-c661340a.js +759 -0
- package/dist/bundled/v3/index-ce11b31b.js +1598 -0
- package/dist/bundled/v3/{index-0c287ab6.js → index-e0aaa8dc.js} +3 -3
- package/dist/bundled/{v2/index-3e178101.js → v3/index-fdffd536.js} +32 -471
- package/dist/bundled/v3/index.js +81 -81
- package/dist/bundled/{v2/isArrayLike-e7fb5cae.js → v3/isArrayLike-e46b8eac.js} +1 -1
- package/dist/bundled/v3/{isEqual-7a8e6106.js → isEqual-44382965.js} +1 -1
- package/dist/bundled/{v2/isObject-b7415fc1.js → v3/isObject-fe8b81fd.js} +1 -1
- package/dist/bundled/{v2/range-82efa3d4.js → v3/range-6f26eda4.js} +4 -4
- package/dist/bundled/v3/{round-567ede34.js → round-f34440f4.js} +4 -4
- package/dist/bundled/v3/{toFinite-bc59ffb0.js → toFinite-74227610.js} +1 -1
- package/dist/bundled/v3/{toInteger-9fa0151c.js → toInteger-2fd112a9.js} +1 -1
- package/dist/bundled/v3/{toString-b6e4472a.js → toString-f3196832.js} +1 -1
- package/dist/bundled/v3/utils/functions/dom.js +2 -2
- package/dist/bundled/v3/utils/index.js +1 -1
- package/dist/esm/v2/{OrCardCollection-c27ae76f.js → OrCardCollection-63ab1dc4.js} +3 -3
- package/dist/esm/v2/{OrCode-4501e2df.js → OrCode-adb9790d.js} +50 -36
- package/dist/esm/v2/{OrConfirm-4841e1eb.js → OrConfirm-f92dc7b5.js} +1 -1
- package/dist/esm/v2/{OrContextMenu-01efdb43.js → OrContextMenu-abf0c884.js} +2 -2
- package/dist/esm/v2/{OrDatePicker-528b55ec.js → OrDatePicker-c93e57ae.js} +3 -3
- package/dist/esm/v2/{OrDateTimePicker-80bd401a.js → OrDateTimePicker-0bbe653c.js} +1 -1
- package/dist/esm/v2/{OrDateTimePicker.vue_rollup-plugin-vue_script-8e987b8d.js → OrDateTimePicker.vue_rollup-plugin-vue_script-353b70fe.js} +3 -3
- package/dist/esm/v2/{OrDateTimePickerPopoverHeader-835e4e49.js → OrDateTimePickerPopoverHeader-6a40de37.js} +3 -3
- package/dist/esm/v2/{OrIconButton-6eda233c.js → OrIconButton-996aba66.js} +2 -2
- package/dist/esm/v2/{OrInlineInput-9f88fff9.js → OrInlineInput-c3329db5.js} +1 -1
- package/dist/esm/v2/{OrInlineTextarea-03e8b8a6.js → OrInlineTextarea-e9de4f1e.js} +1 -1
- package/dist/esm/v2/{OrInput-54abe165.js → OrInput-0d01816c.js} +1 -1
- package/dist/esm/v2/{OrMenu-c2c6473f.js → OrMenu-c7b05c91.js} +1 -1
- package/dist/esm/v2/{OrModal-8ea08182.js → OrModal-c6c922fd.js} +1 -1
- package/dist/esm/v2/{OrNotification-9875c55d.js → OrNotification-c119fcff.js} +1 -1
- package/dist/esm/v2/{OrPagination-c5058980.js → OrPagination-3f1b7a65.js} +2 -2
- package/dist/esm/v2/{OrPopover-f6114169.js → OrPopover-58fefa76.js} +1 -1
- package/dist/esm/v2/{OrSearch-8a834099.js → OrSearch-175c25d3.js} +1 -1
- package/dist/esm/v2/{OrSelect-cd37db8d.js → OrSelect-85acd45f.js} +4 -4
- package/dist/esm/v2/{OrSidebar-a5608742.js → OrSidebar-055f2c89.js} +1 -1
- package/dist/esm/v2/{OrSidebarCollapseButton-c999d09a.js → OrSidebarCollapseButton-12d111c5.js} +1 -1
- package/dist/esm/v2/{OrSorting-82557def.js → OrSorting-b350c4d3.js} +2 -2
- package/dist/esm/v2/{OrTabs-92ccb30f.js → OrTabs-f736863c.js} +2 -2
- package/dist/esm/v2/{OrTag-15cd89e8.js → OrTag-8ec63b23.js} +1 -1
- package/dist/esm/v2/{OrTagInput-f443f295.js → OrTagInput-7088d62f.js} +2 -2
- package/dist/esm/v2/{OrTags-b34c628e.js → OrTags-5ad71efd.js} +2 -2
- package/dist/esm/v2/{OrTimePicker-e711a256.js → OrTimePicker-3d65dc1b.js} +4 -4
- package/dist/esm/v2/{OrTooltip-a4e679bb.js → OrTooltip-17f8a7ff.js} +1 -1
- package/dist/esm/v2/components/index.d.ts +0 -1
- package/dist/esm/v2/components/index.js +30 -54
- package/dist/esm/v2/components/or-card-collection-v3/index.js +8 -8
- package/dist/esm/v2/components/or-code-v3/OrCode.vue.d.ts +4 -3
- package/dist/esm/v2/components/or-code-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-code-v3/index.js +11 -14
- package/dist/esm/v2/components/or-code-v3/libs.d.ts +3 -0
- package/dist/esm/v2/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v2/components/or-context-menu-v3/index.js +3 -3
- package/dist/esm/v2/components/or-date-picker-v3/index.js +6 -6
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +7 -7
- package/dist/esm/v2/components/or-icon-button-v3/index.js +3 -3
- package/dist/esm/v2/components/or-inline-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/esm/v2/components/or-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-menu-v3/index.js +2 -2
- package/dist/esm/v2/components/or-modal-v3/index.js +4 -4
- package/dist/esm/v2/components/or-notification-v3/index.js +4 -4
- package/dist/esm/v2/components/or-pagination-v3/index.js +3 -3
- package/dist/esm/v2/components/or-popover-v3/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +5 -5
- package/dist/esm/v2/components/or-select-v3/index.js +6 -6
- package/dist/esm/v2/components/or-sidebar-v3/index.js +5 -5
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +4 -4
- package/dist/esm/v2/components/or-sorting-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tabs-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tag-input-v3/index.js +6 -6
- package/dist/esm/v2/components/or-tag-v3/index.js +4 -4
- package/dist/esm/v2/components/or-tags-v3/index.js +5 -5
- package/dist/esm/v2/components/or-time-picker-v3/index.js +7 -7
- package/dist/esm/v2/components/or-toast-v3/index.js +4 -4
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +4 -4
- package/dist/esm/v2/components/or-tooltip-v3/index.js +2 -2
- package/dist/esm/v2/index.js +30 -54
- package/dist/esm/v2/{types-635157b1.js → types-b3ec7224.js} +1 -1
- package/dist/esm/v3/{OrCardCollection-bddf72ef.js → OrCardCollection-2b5f1d79.js} +3 -3
- package/dist/esm/v3/{OrCode-a63c3a7b.js → OrCode-5457417e.js} +50 -36
- package/dist/esm/v3/{OrConfirm-d304e9a4.js → OrConfirm-bf771b4d.js} +1 -1
- package/dist/esm/v3/{OrContextMenu-bf1e07ae.js → OrContextMenu-2d8d26e9.js} +2 -2
- package/dist/esm/v3/{OrDatePicker-87aef206.js → OrDatePicker-88b59005.js} +3 -3
- package/dist/esm/v3/{OrDateTimePicker-738f9cd3.js → OrDateTimePicker-f9e46f7e.js} +3 -3
- package/dist/esm/v3/{OrDateTimePickerPopoverHeader-03ae7d09.js → OrDateTimePickerPopoverHeader-d3058267.js} +3 -3
- package/dist/esm/v3/{OrIconButton-a69c7775.js → OrIconButton-c72e1a04.js} +2 -2
- package/dist/esm/v3/{OrInlineInput-246d88ca.js → OrInlineInput-19a4ac87.js} +1 -1
- package/dist/esm/v3/{OrInlineTextarea-c9febb84.js → OrInlineTextarea-0853564b.js} +1 -1
- package/dist/esm/v3/{OrInput-e12b0489.js → OrInput-7729da3b.js} +1 -1
- package/dist/esm/v3/{OrMenu-9a82f18f.js → OrMenu-3bcc528b.js} +1 -1
- package/dist/esm/v3/{OrModal-fc3bb76e.js → OrModal-fb37e638.js} +1 -1
- package/dist/esm/v3/{OrNotification-c8cd9f3d.js → OrNotification-5d385b61.js} +1 -1
- package/dist/esm/v3/{OrPagination-cc0b041a.js → OrPagination-d7acbb6b.js} +2 -2
- package/dist/esm/v3/{OrPopover-7b2af064.js → OrPopover-2132e8b9.js} +1 -1
- package/dist/esm/v3/{OrSearch-bc259374.js → OrSearch-16664742.js} +1 -1
- package/dist/esm/v3/{OrSelect-a7d3c84d.js → OrSelect-9001a22a.js} +4 -4
- package/dist/esm/v3/{OrSidebar-8837a93e.js → OrSidebar-83432ba3.js} +1 -1
- package/dist/esm/v3/{OrSidebarCollapseButton-f44951ac.js → OrSidebarCollapseButton-463aa3a0.js} +1 -1
- package/dist/esm/v3/{OrSorting-6baec1ab.js → OrSorting-aa200e88.js} +2 -2
- package/dist/esm/v3/{OrTabs-2ab1aefa.js → OrTabs-63ce33ae.js} +2 -2
- package/dist/esm/v3/{OrTag-2a3d7293.js → OrTag-5d7c0e75.js} +1 -1
- package/dist/esm/v3/{OrTagInput-ccb72239.js → OrTagInput-649f9b50.js} +2 -2
- package/dist/esm/v3/{OrTags-69e90412.js → OrTags-cb152033.js} +2 -2
- package/dist/esm/v3/{OrTimePicker-a3870a62.js → OrTimePicker-f942db00.js} +4 -4
- package/dist/esm/v3/{OrTooltip-5bf6890a.js → OrTooltip-ad6e08ab.js} +1 -1
- package/dist/esm/v3/components/index.d.ts +0 -1
- package/dist/esm/v3/components/index.js +29 -53
- package/dist/esm/v3/components/or-card-collection-v3/index.js +8 -8
- package/dist/esm/v3/components/or-code-v3/OrCode.vue.d.ts +4 -3
- package/dist/esm/v3/components/or-code-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-code-v3/index.js +11 -14
- package/dist/esm/v3/components/or-code-v3/libs.d.ts +3 -0
- package/dist/esm/v3/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v3/components/or-context-menu-v3/index.js +3 -3
- package/dist/esm/v3/components/or-date-picker-v3/index.js +6 -6
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +6 -6
- package/dist/esm/v3/components/or-icon-button-v3/index.js +3 -3
- package/dist/esm/v3/components/or-inline-input-v3/index.js +4 -4
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/esm/v3/components/or-input-v3/index.js +4 -4
- package/dist/esm/v3/components/or-menu-v3/index.js +2 -2
- package/dist/esm/v3/components/or-modal-v3/index.js +4 -4
- package/dist/esm/v3/components/or-notification-v3/index.js +4 -4
- package/dist/esm/v3/components/or-pagination-v3/index.js +3 -3
- package/dist/esm/v3/components/or-popover-v3/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +5 -5
- package/dist/esm/v3/components/or-select-v3/index.js +6 -6
- package/dist/esm/v3/components/or-sidebar-v3/index.js +5 -5
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +4 -4
- package/dist/esm/v3/components/or-sorting-v3/index.js +3 -3
- package/dist/esm/v3/components/or-tabs-v3/index.js +3 -3
- package/dist/esm/v3/components/or-tag-input-v3/index.js +6 -6
- package/dist/esm/v3/components/or-tag-v3/index.js +4 -4
- package/dist/esm/v3/components/or-tags-v3/index.js +5 -5
- package/dist/esm/v3/components/or-time-picker-v3/index.js +7 -7
- package/dist/esm/v3/components/or-toast-v3/index.js +4 -4
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +4 -4
- package/dist/esm/v3/components/or-tooltip-v3/index.js +2 -2
- package/dist/esm/v3/index.js +29 -53
- package/dist/esm/v3/{types-c4c1e2cc.js → types-777d6e58.js} +1 -1
- package/package.json +6 -22
- package/src/components/index.ts +0 -1
- package/src/components/or-code-v3/OrCode.vue +64 -50
- package/src/components/or-code-v3/index.ts +1 -0
- package/src/components/or-code-v3/libs.ts +6 -0
- package/src/components/or-popover-v3/OrPopover.vue +1 -1
- package/dist/bundled/v2/_commonjsHelpers-1789f0cf.js +0 -7
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -11640
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -194
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +0 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +0 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +0 -5
- package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +0 -7
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +0 -6
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +0 -38
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -42
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -183
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -17
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -199
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +0 -2
- package/dist/bundled/v2/index-1b2cfcc1.js +0 -9715
- package/dist/bundled/v2/index-666dfe59.js +0 -4048
- package/dist/bundled/v2/index-9444e0d2.js +0 -115
- package/dist/bundled/v2/index-f671afe5.js +0 -7127
- package/dist/bundled/v2/markdown-119394e1.js +0 -15365
- package/dist/bundled/v2/useFocusTrap-d1b2c0b4.js +0 -1349
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-f1e9175d.js +0 -101
- package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-b01b8ae3.js +0 -11380
- package/dist/bundled/v3/_commonjsHelpers-1789f0cf.js +0 -7
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +0 -202
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +0 -194
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +0 -2
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +0 -2
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +0 -5
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +0 -7
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +0 -6
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +0 -38
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +0 -42
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +0 -183
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +0 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +0 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +0 -17
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +0 -199
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +0 -19
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +0 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +0 -3
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +0 -2
- package/dist/bundled/v3/index-1b2cfcc1.js +0 -9715
- package/dist/bundled/v3/index-666dfe59.js +0 -4048
- package/dist/bundled/v3/index-9444e0d2.js +0 -115
- package/dist/bundled/v3/index-f671afe5.js +0 -7127
- package/dist/bundled/v3/markdown-119394e1.js +0 -15365
- package/dist/esm/v2/OrRichTextEditor-6fb5d647.js +0 -981
- package/dist/esm/v2/codemirrorView-020fe885.js +0 -357
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -194
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +0 -2
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +0 -67
- package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +0 -5
- package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -6
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -9
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -17
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
- package/dist/esm/v3/OrRichTextEditor-d21645c2.js +0 -913
- package/dist/esm/v3/codemirrorView-020fe885.js +0 -357
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +0 -194
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +0 -2
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +0 -65
- package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +0 -5
- package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -6
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +0 -3
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +0 -27
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +0 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +0 -9
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +0 -17
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +0 -19
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +0 -3
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +0 -745
- package/src/components/or-rich-text-editor-v3/index.ts +0 -2
- package/src/components/or-rich-text-editor-v3/props.ts +0 -6
- package/src/components/or-rich-text-editor-v3/styles.ts +0 -53
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +0 -40
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +0 -254
- package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +0 -1
- package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +0 -238
- package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +0 -22
- package/src/components/or-rich-text-editor-v3/utils/markdown.ts +0 -172
- /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-c329e727.js → OrDateTimePickerMonthSelect-5c7d6cc7.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-146c2f16.js → OrDateTimePickerPopoverHeader-922f203c.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-7286977a.js → OrDateTimePickerTimeSelect-fc9d4e29.js} +0 -0
- /package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-94976ae9.js → OrExpansionPanel.vue_vue_type_script_lang-e09daea9.js} +0 -0
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { k as keyName, b as base, s as shift } from './index-9444e0d2.js';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
The data structure for documents. @nonabstract
|
|
5
3
|
*/
|
|
6
4
|
class Text {
|
|
7
|
-
/**
|
|
8
|
-
@internal
|
|
9
|
-
*/
|
|
10
|
-
constructor() {}
|
|
11
5
|
/**
|
|
12
6
|
Get the line description around the given position.
|
|
13
7
|
*/
|
|
@@ -102,7 +96,8 @@ class Text {
|
|
|
102
96
|
return new LineCursor(inner);
|
|
103
97
|
}
|
|
104
98
|
/**
|
|
105
|
-
|
|
99
|
+
Return the document as a string, using newline characters to
|
|
100
|
+
separate lines.
|
|
106
101
|
*/
|
|
107
102
|
toString() {
|
|
108
103
|
return this.sliceString(0);
|
|
@@ -117,6 +112,10 @@ class Text {
|
|
|
117
112
|
return lines;
|
|
118
113
|
}
|
|
119
114
|
/**
|
|
115
|
+
@internal
|
|
116
|
+
*/
|
|
117
|
+
constructor() {}
|
|
118
|
+
/**
|
|
120
119
|
Create a `Text` instance for the given array of lines.
|
|
121
120
|
*/
|
|
122
121
|
static of(text) {
|
|
@@ -2152,7 +2151,10 @@ class StateEffect {
|
|
|
2152
2151
|
}
|
|
2153
2152
|
/**
|
|
2154
2153
|
Define a new effect type. The type parameter indicates the type
|
|
2155
|
-
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.
|
|
2156
2158
|
*/
|
|
2157
2159
|
static define() {
|
|
2158
2160
|
let spec = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -3289,8 +3291,7 @@ class RangeSet {
|
|
|
3289
3291
|
static compare(oldSets, newSets,
|
|
3290
3292
|
/**
|
|
3291
3293
|
This indicates how the underlying data changed between these
|
|
3292
|
-
ranges, and is needed to synchronize the iteration.
|
|
3293
|
-
`to` are coordinates in the _new_ space, after these changes.
|
|
3294
|
+
ranges, and is needed to synchronize the iteration.
|
|
3294
3295
|
*/
|
|
3295
3296
|
textDiff, comparator) {
|
|
3296
3297
|
let minPointSize = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
|
|
@@ -3385,6 +3386,18 @@ A range set builder is a data structure that helps build up a
|
|
|
3385
3386
|
an array of [`Range`](https://codemirror.net/6/docs/ref/#state.Range) objects.
|
|
3386
3387
|
*/
|
|
3387
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
|
+
}
|
|
3388
3401
|
/**
|
|
3389
3402
|
Create an empty builder.
|
|
3390
3403
|
*/
|
|
@@ -3402,18 +3415,6 @@ class RangeSetBuilder {
|
|
|
3402
3415
|
this.setMaxPoint = -1;
|
|
3403
3416
|
this.nextLayer = null;
|
|
3404
3417
|
}
|
|
3405
|
-
finishChunk(newArrays) {
|
|
3406
|
-
this.chunks.push(new Chunk(this.from, this.to, this.value, this.maxPoint));
|
|
3407
|
-
this.chunkPos.push(this.chunkStart);
|
|
3408
|
-
this.chunkStart = -1;
|
|
3409
|
-
this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint);
|
|
3410
|
-
this.maxPoint = -1;
|
|
3411
|
-
if (newArrays) {
|
|
3412
|
-
this.from = [];
|
|
3413
|
-
this.to = [];
|
|
3414
|
-
this.value = [];
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
3418
|
/**
|
|
3418
3419
|
Add a range. Ranges should be added in sorted (by `from` and
|
|
3419
3420
|
`value.startSide`) order.
|
|
@@ -3747,7 +3748,7 @@ function compare(a, startA, b, startB, length, comparator) {
|
|
|
3747
3748
|
let end = diff < 0 ? a.to + dPos : b.to,
|
|
3748
3749
|
clipEnd = Math.min(end, endB);
|
|
3749
3750
|
if (a.point || b.point) {
|
|
3750
|
-
if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) && sameValues(a.activeForPoint(a.to
|
|
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);
|
|
3751
3752
|
} else {
|
|
3752
3753
|
if (clipEnd > pos && !sameValues(a.active, b.active)) comparator.compareRange(pos, clipEnd, a.active, b.active);
|
|
3753
3754
|
}
|
|
@@ -3976,6 +3977,120 @@ class StyleSet {
|
|
|
3976
3977
|
// example to create a media query you can do `{"@media screen and
|
|
3977
3978
|
// (min-width: 400px)": {...}}`.
|
|
3978
3979
|
|
|
3980
|
+
var base = {
|
|
3981
|
+
8: "Backspace",
|
|
3982
|
+
9: "Tab",
|
|
3983
|
+
10: "Enter",
|
|
3984
|
+
12: "NumLock",
|
|
3985
|
+
13: "Enter",
|
|
3986
|
+
16: "Shift",
|
|
3987
|
+
17: "Control",
|
|
3988
|
+
18: "Alt",
|
|
3989
|
+
20: "CapsLock",
|
|
3990
|
+
27: "Escape",
|
|
3991
|
+
32: " ",
|
|
3992
|
+
33: "PageUp",
|
|
3993
|
+
34: "PageDown",
|
|
3994
|
+
35: "End",
|
|
3995
|
+
36: "Home",
|
|
3996
|
+
37: "ArrowLeft",
|
|
3997
|
+
38: "ArrowUp",
|
|
3998
|
+
39: "ArrowRight",
|
|
3999
|
+
40: "ArrowDown",
|
|
4000
|
+
44: "PrintScreen",
|
|
4001
|
+
45: "Insert",
|
|
4002
|
+
46: "Delete",
|
|
4003
|
+
59: ";",
|
|
4004
|
+
61: "=",
|
|
4005
|
+
91: "Meta",
|
|
4006
|
+
92: "Meta",
|
|
4007
|
+
106: "*",
|
|
4008
|
+
107: "+",
|
|
4009
|
+
108: ",",
|
|
4010
|
+
109: "-",
|
|
4011
|
+
110: ".",
|
|
4012
|
+
111: "/",
|
|
4013
|
+
144: "NumLock",
|
|
4014
|
+
145: "ScrollLock",
|
|
4015
|
+
160: "Shift",
|
|
4016
|
+
161: "Shift",
|
|
4017
|
+
162: "Control",
|
|
4018
|
+
163: "Control",
|
|
4019
|
+
164: "Alt",
|
|
4020
|
+
165: "Alt",
|
|
4021
|
+
173: "-",
|
|
4022
|
+
186: ";",
|
|
4023
|
+
187: "=",
|
|
4024
|
+
188: ",",
|
|
4025
|
+
189: "-",
|
|
4026
|
+
190: ".",
|
|
4027
|
+
191: "/",
|
|
4028
|
+
192: "`",
|
|
4029
|
+
219: "[",
|
|
4030
|
+
220: "\\",
|
|
4031
|
+
221: "]",
|
|
4032
|
+
222: "'"
|
|
4033
|
+
};
|
|
4034
|
+
var shift = {
|
|
4035
|
+
48: ")",
|
|
4036
|
+
49: "!",
|
|
4037
|
+
50: "@",
|
|
4038
|
+
51: "#",
|
|
4039
|
+
52: "$",
|
|
4040
|
+
53: "%",
|
|
4041
|
+
54: "^",
|
|
4042
|
+
55: "&",
|
|
4043
|
+
56: "*",
|
|
4044
|
+
57: "(",
|
|
4045
|
+
59: ":",
|
|
4046
|
+
61: "+",
|
|
4047
|
+
173: "_",
|
|
4048
|
+
186: ":",
|
|
4049
|
+
187: "+",
|
|
4050
|
+
188: "<",
|
|
4051
|
+
189: "_",
|
|
4052
|
+
190: ">",
|
|
4053
|
+
191: "?",
|
|
4054
|
+
192: "~",
|
|
4055
|
+
219: "{",
|
|
4056
|
+
220: "|",
|
|
4057
|
+
221: "}",
|
|
4058
|
+
222: "\""
|
|
4059
|
+
};
|
|
4060
|
+
var chrome$1 = typeof navigator != "undefined" && /Chrome\/(\d+)/.exec(navigator.userAgent);
|
|
4061
|
+
typeof navigator != "undefined" && /Gecko\/\d+/.test(navigator.userAgent);
|
|
4062
|
+
var mac = typeof navigator != "undefined" && /Mac/.test(navigator.platform);
|
|
4063
|
+
var ie$1 = typeof navigator != "undefined" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
|
|
4064
|
+
var brokenModifierNames = mac || chrome$1 && +chrome$1[1] < 57;
|
|
4065
|
+
|
|
4066
|
+
// Fill in the digit keys
|
|
4067
|
+
for (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i);
|
|
4068
|
+
|
|
4069
|
+
// The function keys
|
|
4070
|
+
for (var i = 1; i <= 24; i++) base[i + 111] = "F" + i;
|
|
4071
|
+
|
|
4072
|
+
// And the alphabetic keys
|
|
4073
|
+
for (var i = 65; i <= 90; i++) {
|
|
4074
|
+
base[i] = String.fromCharCode(i + 32);
|
|
4075
|
+
shift[i] = String.fromCharCode(i);
|
|
4076
|
+
}
|
|
4077
|
+
|
|
4078
|
+
// For each code that doesn't have a shift-equivalent, copy the base name
|
|
4079
|
+
for (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code];
|
|
4080
|
+
function keyName(event) {
|
|
4081
|
+
var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) || ie$1 && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
|
|
4082
|
+
var name = !ignoreKey && event.key || (event.shiftKey ? shift : base)[event.keyCode] || event.key || "Unidentified";
|
|
4083
|
+
// Edge sometimes produces wrong names (Issue #3)
|
|
4084
|
+
if (name == "Esc") name = "Escape";
|
|
4085
|
+
if (name == "Del") name = "Delete";
|
|
4086
|
+
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/
|
|
4087
|
+
if (name == "Left") name = "ArrowLeft";
|
|
4088
|
+
if (name == "Up") name = "ArrowUp";
|
|
4089
|
+
if (name == "Right") name = "ArrowRight";
|
|
4090
|
+
if (name == "Down") name = "ArrowDown";
|
|
4091
|
+
return name;
|
|
4092
|
+
}
|
|
4093
|
+
|
|
3979
4094
|
function getSelection(root) {
|
|
3980
4095
|
let target;
|
|
3981
4096
|
// Browsers differ on whether shadow roots have a getSelection
|
|
@@ -4295,7 +4410,7 @@ class ContentView {
|
|
|
4295
4410
|
constructor() {
|
|
4296
4411
|
this.parent = null;
|
|
4297
4412
|
this.dom = null;
|
|
4298
|
-
this.dirty = 2 /*
|
|
4413
|
+
this.dirty = 2 /* Node */;
|
|
4299
4414
|
}
|
|
4300
4415
|
|
|
4301
4416
|
get overrideDOMText() {
|
|
@@ -4319,7 +4434,7 @@ class ContentView {
|
|
|
4319
4434
|
return this.posBefore(view) + view.length;
|
|
4320
4435
|
}
|
|
4321
4436
|
sync(view, track) {
|
|
4322
|
-
if (this.dirty & 2 /*
|
|
4437
|
+
if (this.dirty & 2 /* Node */) {
|
|
4323
4438
|
let parent = this.dom;
|
|
4324
4439
|
let prev = null,
|
|
4325
4440
|
next;
|
|
@@ -4330,7 +4445,7 @@ class ContentView {
|
|
|
4330
4445
|
if (!contentView || !contentView.parent && contentView.canReuseDOM(child)) child.reuseDOM(next);
|
|
4331
4446
|
}
|
|
4332
4447
|
child.sync(view, track);
|
|
4333
|
-
child.dirty = 0 /*
|
|
4448
|
+
child.dirty = 0 /* Not */;
|
|
4334
4449
|
}
|
|
4335
4450
|
|
|
4336
4451
|
next = prev ? prev.nextSibling : parent.firstChild;
|
|
@@ -4345,10 +4460,10 @@ class ContentView {
|
|
|
4345
4460
|
next = prev ? prev.nextSibling : parent.firstChild;
|
|
4346
4461
|
if (next && track && track.node == parent) track.written = true;
|
|
4347
4462
|
while (next) next = rm$1(next);
|
|
4348
|
-
} else if (this.dirty & 1 /*
|
|
4463
|
+
} else if (this.dirty & 1 /* Child */) {
|
|
4349
4464
|
for (let child of this.children) if (child.dirty) {
|
|
4350
4465
|
child.sync(view, track);
|
|
4351
|
-
child.dirty = 0 /*
|
|
4466
|
+
child.dirty = 0 /* Not */;
|
|
4352
4467
|
}
|
|
4353
4468
|
}
|
|
4354
4469
|
}
|
|
@@ -4410,14 +4525,14 @@ class ContentView {
|
|
|
4410
4525
|
}
|
|
4411
4526
|
markDirty() {
|
|
4412
4527
|
let andParent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
4413
|
-
this.dirty |= 2 /*
|
|
4528
|
+
this.dirty |= 2 /* Node */;
|
|
4414
4529
|
this.markParentsDirty(andParent);
|
|
4415
4530
|
}
|
|
4416
4531
|
markParentsDirty(childList) {
|
|
4417
4532
|
for (let parent = this.parent; parent; parent = parent.parent) {
|
|
4418
|
-
if (childList) parent.dirty |= 2 /*
|
|
4419
|
-
if (parent.dirty & 1 /*
|
|
4420
|
-
parent.dirty |= 1 /*
|
|
4533
|
+
if (childList) parent.dirty |= 2 /* Node */;
|
|
4534
|
+
if (parent.dirty & 1 /* Child */) return;
|
|
4535
|
+
parent.dirty |= 1 /* Child */;
|
|
4421
4536
|
childList = false;
|
|
4422
4537
|
}
|
|
4423
4538
|
}
|
|
@@ -4712,12 +4827,12 @@ class MarkView extends ContentView {
|
|
|
4712
4827
|
reuseDOM(node) {
|
|
4713
4828
|
if (node.nodeName == this.mark.tagName.toUpperCase()) {
|
|
4714
4829
|
this.setDOM(node);
|
|
4715
|
-
this.dirty |= 4 /*
|
|
4830
|
+
this.dirty |= 4 /* Attrs */ | 2 /* Node */;
|
|
4716
4831
|
}
|
|
4717
4832
|
}
|
|
4718
4833
|
|
|
4719
4834
|
sync(view, track) {
|
|
4720
|
-
if (!this.dom) this.setDOM(this.setAttrs(document.createElement(this.mark.tagName)));else if (this.dirty & 4 /*
|
|
4835
|
+
if (!this.dom) this.setDOM(this.setAttrs(document.createElement(this.mark.tagName)));else if (this.dirty & 4 /* Attrs */) this.setAttrs(this.dom);
|
|
4721
4836
|
super.sync(view, track);
|
|
4722
4837
|
}
|
|
4723
4838
|
merge(from, to, source, _hasStart, openStart, openEnd) {
|
|
@@ -4782,9 +4897,6 @@ function textCoords(text, pos, side) {
|
|
|
4782
4897
|
}
|
|
4783
4898
|
// Also used for collapsed ranges that don't have a placeholder widget!
|
|
4784
4899
|
class WidgetView extends ContentView {
|
|
4785
|
-
static create(widget, length, side) {
|
|
4786
|
-
return new (widget.customView || WidgetView)(widget, length, side);
|
|
4787
|
-
}
|
|
4788
4900
|
constructor(widget, length, side) {
|
|
4789
4901
|
super();
|
|
4790
4902
|
this.widget = widget;
|
|
@@ -4792,6 +4904,9 @@ class WidgetView extends ContentView {
|
|
|
4792
4904
|
this.side = side;
|
|
4793
4905
|
this.prevWidget = null;
|
|
4794
4906
|
}
|
|
4907
|
+
static create(widget, length, side) {
|
|
4908
|
+
return new (widget.customView || WidgetView)(widget, length, side);
|
|
4909
|
+
}
|
|
4795
4910
|
split(from) {
|
|
4796
4911
|
let result = WidgetView.create(this.widget, this.length - from, this.side);
|
|
4797
4912
|
this.length -= from;
|
|
@@ -4852,11 +4967,12 @@ class WidgetView extends ContentView {
|
|
|
4852
4967
|
let rects = this.dom.getClientRects(),
|
|
4853
4968
|
rect = null;
|
|
4854
4969
|
if (!rects.length) return null;
|
|
4855
|
-
|
|
4970
|
+
let fromBack = this.side ? this.side < 0 : pos > 0;
|
|
4971
|
+
for (let i = fromBack ? rects.length - 1 : 0;; i += fromBack ? -1 : 1) {
|
|
4856
4972
|
rect = rects[i];
|
|
4857
4973
|
if (pos > 0 ? i == 0 : i == rects.length - 1 || rect.top < rect.bottom) break;
|
|
4858
4974
|
}
|
|
4859
|
-
return
|
|
4975
|
+
return flattenRect(rect, !fromBack);
|
|
4860
4976
|
}
|
|
4861
4977
|
get isEditable() {
|
|
4862
4978
|
return false;
|
|
@@ -5200,6 +5316,15 @@ class WidgetType {
|
|
|
5200
5316
|
return -1;
|
|
5201
5317
|
}
|
|
5202
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
|
+
/**
|
|
5203
5328
|
Can be used to configure which kinds of events inside the widget
|
|
5204
5329
|
should be ignored by the editor. The default is to ignore all
|
|
5205
5330
|
events.
|
|
@@ -5312,9 +5437,9 @@ class Decoration extends RangeValue {
|
|
|
5312
5437
|
given position.
|
|
5313
5438
|
*/
|
|
5314
5439
|
static widget(spec) {
|
|
5315
|
-
let side = spec.side || 0,
|
|
5440
|
+
let side = Math.max(-10000, Math.min(10000, spec.side || 0)),
|
|
5316
5441
|
block = !!spec.block;
|
|
5317
|
-
side += block ? side > 0 ? 300000000 /*
|
|
5442
|
+
side += block && !spec.inlineOrder ? side > 0 ? 300000000 /* BlockAfter */ : -400000000 /* BlockBefore */ : side > 0 ? 100000000 /* InlineAfter */ : -100000000 /* InlineBefore */;
|
|
5318
5443
|
return new PointDecoration(spec, side, side, block, spec.widget || null, false);
|
|
5319
5444
|
}
|
|
5320
5445
|
/**
|
|
@@ -5326,15 +5451,15 @@ class Decoration extends RangeValue {
|
|
|
5326
5451
|
startSide,
|
|
5327
5452
|
endSide;
|
|
5328
5453
|
if (spec.isBlockGap) {
|
|
5329
|
-
startSide = -500000000 /*
|
|
5330
|
-
endSide = 400000000 /*
|
|
5454
|
+
startSide = -500000000 /* GapStart */;
|
|
5455
|
+
endSide = 400000000 /* GapEnd */;
|
|
5331
5456
|
} else {
|
|
5332
5457
|
let {
|
|
5333
5458
|
start,
|
|
5334
5459
|
end
|
|
5335
5460
|
} = getInclusive(spec, block);
|
|
5336
|
-
startSide = (start ? block ? -300000000 /*
|
|
5337
|
-
endSide = (end ? block ? 200000000 /*
|
|
5461
|
+
startSide = (start ? block ? -300000000 /* BlockIncStart */ : -1 /* InlineIncStart */ : 500000000 /* NonIncStart */) - 1;
|
|
5462
|
+
endSide = (end ? block ? 200000000 /* BlockIncEnd */ : 1 /* InlineIncEnd */ : -600000000 /* NonIncEnd */) + 1;
|
|
5338
5463
|
}
|
|
5339
5464
|
return new PointDecoration(spec, startSide, endSide, block, spec.widget || null, true);
|
|
5340
5465
|
}
|
|
@@ -5371,7 +5496,7 @@ class MarkDecoration extends Decoration {
|
|
|
5371
5496
|
start,
|
|
5372
5497
|
end
|
|
5373
5498
|
} = getInclusive(spec);
|
|
5374
|
-
super(start ? -1 /*
|
|
5499
|
+
super(start ? -1 /* InlineIncStart */ : 500000000 /* NonIncStart */, end ? 1 /* InlineIncEnd */ : -600000000 /* NonIncEnd */, null, spec);
|
|
5375
5500
|
this.tagName = spec.tagName || "span";
|
|
5376
5501
|
this.class = spec.class || "";
|
|
5377
5502
|
this.attrs = spec.attributes || null;
|
|
@@ -5388,7 +5513,7 @@ class MarkDecoration extends Decoration {
|
|
|
5388
5513
|
MarkDecoration.prototype.point = false;
|
|
5389
5514
|
class LineDecoration extends Decoration {
|
|
5390
5515
|
constructor(spec) {
|
|
5391
|
-
super(-200000000 /*
|
|
5516
|
+
super(-200000000 /* Line */, -200000000 /* Line */, null, spec);
|
|
5392
5517
|
}
|
|
5393
5518
|
eq(other) {
|
|
5394
5519
|
return other instanceof LineDecoration && this.spec.class == other.spec.class && attrsEq(this.spec.attributes, other.spec.attributes);
|
|
@@ -5413,7 +5538,7 @@ class PointDecoration extends Decoration {
|
|
|
5413
5538
|
return this.startSide < this.endSide ? BlockType.WidgetRange : this.startSide <= 0 ? BlockType.WidgetBefore : BlockType.WidgetAfter;
|
|
5414
5539
|
}
|
|
5415
5540
|
get heightRelevant() {
|
|
5416
|
-
return this.block || !!this.widget && this.widget.estimatedHeight >= 5;
|
|
5541
|
+
return this.block || !!this.widget && (this.widget.estimatedHeight >= 5 || this.widget.lineBreaks > 0);
|
|
5417
5542
|
}
|
|
5418
5543
|
eq(other) {
|
|
5419
5544
|
return other instanceof PointDecoration && widgetsEq(this.widget, other.widget) && this.block == other.block && this.startSide == other.startSide && this.endSide == other.endSide;
|
|
@@ -5522,7 +5647,7 @@ class LineView extends ContentView {
|
|
|
5522
5647
|
reuseDOM(node) {
|
|
5523
5648
|
if (node.nodeName == "DIV") {
|
|
5524
5649
|
this.setDOM(node);
|
|
5525
|
-
this.dirty |= 4 /*
|
|
5650
|
+
this.dirty |= 4 /* Attrs */ | 2 /* Node */;
|
|
5526
5651
|
}
|
|
5527
5652
|
}
|
|
5528
5653
|
|
|
@@ -5532,7 +5657,7 @@ class LineView extends ContentView {
|
|
|
5532
5657
|
this.setDOM(document.createElement("div"));
|
|
5533
5658
|
this.dom.className = "cm-line";
|
|
5534
5659
|
this.prevAttrs = this.attrs ? null : undefined;
|
|
5535
|
-
} else if (this.dirty & 4 /*
|
|
5660
|
+
} else if (this.dirty & 4 /* Attrs */) {
|
|
5536
5661
|
clearAttributes(this.dom);
|
|
5537
5662
|
this.dom.className = "cm-line";
|
|
5538
5663
|
this.prevAttrs = this.attrs ? null : undefined;
|
|
@@ -5690,7 +5815,7 @@ class ContentBuilder {
|
|
|
5690
5815
|
this.content = [];
|
|
5691
5816
|
this.curLine = null;
|
|
5692
5817
|
this.breakAtStart = 0;
|
|
5693
|
-
this.pendingBuffer = 0 /*
|
|
5818
|
+
this.pendingBuffer = 0 /* No */;
|
|
5694
5819
|
this.bufferMarks = [];
|
|
5695
5820
|
// Set to false directly after a widget that covers the position after it
|
|
5696
5821
|
this.atCursorPos = true;
|
|
@@ -5717,7 +5842,7 @@ class ContentBuilder {
|
|
|
5717
5842
|
let active = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.bufferMarks;
|
|
5718
5843
|
if (this.pendingBuffer) {
|
|
5719
5844
|
this.curLine.append(wrapMarks(new WidgetBufferView(-1), active), active.length);
|
|
5720
|
-
this.pendingBuffer = 0 /*
|
|
5845
|
+
this.pendingBuffer = 0 /* No */;
|
|
5721
5846
|
}
|
|
5722
5847
|
}
|
|
5723
5848
|
|
|
@@ -5727,7 +5852,7 @@ class ContentBuilder {
|
|
|
5727
5852
|
this.content.push(view);
|
|
5728
5853
|
}
|
|
5729
5854
|
finish(openEnd) {
|
|
5730
|
-
if (this.pendingBuffer && openEnd <= this.bufferMarks.length) this.flushBuffer();else this.pendingBuffer = 0 /*
|
|
5855
|
+
if (this.pendingBuffer && openEnd <= this.bufferMarks.length) this.flushBuffer();else this.pendingBuffer = 0 /* No */;
|
|
5731
5856
|
if (!this.posCovered()) this.getLine();
|
|
5732
5857
|
}
|
|
5733
5858
|
buildText(length, active, openStart) {
|
|
@@ -5753,7 +5878,7 @@ class ContentBuilder {
|
|
|
5753
5878
|
this.textOff = 0;
|
|
5754
5879
|
}
|
|
5755
5880
|
}
|
|
5756
|
-
let take = Math.min(this.text.length - this.textOff, length, 512 /*
|
|
5881
|
+
let take = Math.min(this.text.length - this.textOff, length, 512 /* Chunk */);
|
|
5757
5882
|
this.flushBuffer(active.slice(active.length - openStart));
|
|
5758
5883
|
this.getLine().append(wrapMarks(new TextView(this.text.slice(this.textOff, this.textOff + take)), active), openStart);
|
|
5759
5884
|
this.atCursorPos = true;
|
|
@@ -5785,7 +5910,7 @@ class ContentBuilder {
|
|
|
5785
5910
|
let cursorBefore = this.atCursorPos && !view.isEditable && openStart <= active.length && (from < to || deco.startSide > 0);
|
|
5786
5911
|
let cursorAfter = !view.isEditable && (from < to || openStart > active.length || deco.startSide <= 0);
|
|
5787
5912
|
let line = this.getLine();
|
|
5788
|
-
if (this.pendingBuffer == 2 /*
|
|
5913
|
+
if (this.pendingBuffer == 2 /* IfCursor */ && !cursorBefore && !view.isEditable) this.pendingBuffer = 0 /* No */;
|
|
5789
5914
|
this.flushBuffer(active);
|
|
5790
5915
|
if (cursorBefore) {
|
|
5791
5916
|
line.append(wrapMarks(new WidgetBufferView(1), active), openStart);
|
|
@@ -5793,7 +5918,7 @@ class ContentBuilder {
|
|
|
5793
5918
|
}
|
|
5794
5919
|
line.append(wrapMarks(view, active), openStart);
|
|
5795
5920
|
this.atCursorPos = cursorAfter;
|
|
5796
|
-
this.pendingBuffer = !cursorAfter ? 0 /*
|
|
5921
|
+
this.pendingBuffer = !cursorAfter ? 0 /* No */ : from < to || openStart > active.length ? 1 /* Yes */ : 2 /* IfCursor */;
|
|
5797
5922
|
if (this.pendingBuffer) this.bufferMarks = active.slice();
|
|
5798
5923
|
}
|
|
5799
5924
|
} else if (this.doc.lineAt(this.pos).from == this.pos) {
|
|
@@ -6118,27 +6243,27 @@ class ViewUpdate {
|
|
|
6118
6243
|
update.
|
|
6119
6244
|
*/
|
|
6120
6245
|
get viewportChanged() {
|
|
6121
|
-
return (this.flags & 4 /*
|
|
6246
|
+
return (this.flags & 4 /* Viewport */) > 0;
|
|
6122
6247
|
}
|
|
6123
6248
|
/**
|
|
6124
6249
|
Indicates whether the height of a block element in the editor
|
|
6125
6250
|
changed in this update.
|
|
6126
6251
|
*/
|
|
6127
6252
|
get heightChanged() {
|
|
6128
|
-
return (this.flags & 2 /*
|
|
6253
|
+
return (this.flags & 2 /* Height */) > 0;
|
|
6129
6254
|
}
|
|
6130
6255
|
/**
|
|
6131
6256
|
Returns true when the document was modified or the size of the
|
|
6132
6257
|
editor, or elements within the editor, changed.
|
|
6133
6258
|
*/
|
|
6134
6259
|
get geometryChanged() {
|
|
6135
|
-
return this.docChanged || (this.flags & (8 /*
|
|
6260
|
+
return this.docChanged || (this.flags & (8 /* Geometry */ | 2 /* Height */)) > 0;
|
|
6136
6261
|
}
|
|
6137
6262
|
/**
|
|
6138
6263
|
True when this update indicates a focus change.
|
|
6139
6264
|
*/
|
|
6140
6265
|
get focusChanged() {
|
|
6141
|
-
return (this.flags & 1 /*
|
|
6266
|
+
return (this.flags & 1 /* Focus */) > 0;
|
|
6142
6267
|
}
|
|
6143
6268
|
/**
|
|
6144
6269
|
Whether the document changed in this update.
|
|
@@ -6200,7 +6325,7 @@ for (let p of ["()", "[]", "{}"]) {
|
|
|
6200
6325
|
Brackets[r] = -l;
|
|
6201
6326
|
}
|
|
6202
6327
|
function charType(ch) {
|
|
6203
|
-
return ch <= 0xf7 ? LowTypes[ch] : 0x590 <= ch && ch <= 0x5f4 ? 2 /*
|
|
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 */;
|
|
6204
6329
|
}
|
|
6205
6330
|
|
|
6206
6331
|
const BidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;
|
|
@@ -6209,12 +6334,6 @@ Represents a contiguous range of text that has a single direction
|
|
|
6209
6334
|
(as in left-to-right or right-to-left).
|
|
6210
6335
|
*/
|
|
6211
6336
|
class BidiSpan {
|
|
6212
|
-
/**
|
|
6213
|
-
The direction of this span.
|
|
6214
|
-
*/
|
|
6215
|
-
get dir() {
|
|
6216
|
-
return this.level % 2 ? RTL : LTR;
|
|
6217
|
-
}
|
|
6218
6337
|
/**
|
|
6219
6338
|
@internal
|
|
6220
6339
|
*/
|
|
@@ -6240,6 +6359,12 @@ class BidiSpan {
|
|
|
6240
6359
|
this.level = level;
|
|
6241
6360
|
}
|
|
6242
6361
|
/**
|
|
6362
|
+
The direction of this span.
|
|
6363
|
+
*/
|
|
6364
|
+
get dir() {
|
|
6365
|
+
return this.level % 2 ? RTL : LTR;
|
|
6366
|
+
}
|
|
6367
|
+
/**
|
|
6243
6368
|
@internal
|
|
6244
6369
|
*/
|
|
6245
6370
|
side(end, dir) {
|
|
@@ -6268,9 +6393,9 @@ class BidiSpan {
|
|
|
6268
6393
|
const types = [];
|
|
6269
6394
|
function computeOrder(line, direction) {
|
|
6270
6395
|
let len = line.length,
|
|
6271
|
-
outerType = direction == LTR ? 1 /*
|
|
6272
|
-
oppositeType = direction == LTR ? 2 /*
|
|
6273
|
-
if (!line || outerType == 1 /*
|
|
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);
|
|
6274
6399
|
// W1. Examine each non-spacing mark (NSM) in the level run, and
|
|
6275
6400
|
// change the type of the NSM to the type of the previous
|
|
6276
6401
|
// character. If the NSM is at the start of the level run, it will
|
|
@@ -6283,9 +6408,9 @@ function computeOrder(line, direction) {
|
|
|
6283
6408
|
// (Left after this: L, R, EN, AN, ET, CS, NI)
|
|
6284
6409
|
for (let i = 0, prev = outerType, prevStrong = outerType; i < len; i++) {
|
|
6285
6410
|
let type = charType(line.charCodeAt(i));
|
|
6286
|
-
if (type == 512 /*
|
|
6287
|
-
types[i] = type == 4 /*
|
|
6288
|
-
if (type & 7 /*
|
|
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;
|
|
6289
6414
|
prev = type;
|
|
6290
6415
|
}
|
|
6291
6416
|
// W5. A sequence of European terminators adjacent to European
|
|
@@ -6298,20 +6423,20 @@ function computeOrder(line, direction) {
|
|
|
6298
6423
|
// (Left after this: L, R, EN+AN, NI)
|
|
6299
6424
|
for (let i = 0, prev = outerType, prevStrong = outerType; i < len; i++) {
|
|
6300
6425
|
let type = types[i];
|
|
6301
|
-
if (type == 128 /*
|
|
6302
|
-
if (i < len - 1 && prev == types[i + 1] && prev & 24 /*
|
|
6303
|
-
} else if (type == 64 /*
|
|
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 */) {
|
|
6304
6429
|
let end = i + 1;
|
|
6305
|
-
while (end < len && types[end] == 64 /*
|
|
6306
|
-
let replace = i && prev == 8 /*
|
|
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 */;
|
|
6307
6432
|
for (let j = i; j < end; j++) types[j] = replace;
|
|
6308
6433
|
i = end - 1;
|
|
6309
|
-
} else if (type == 8 /*
|
|
6310
|
-
types[i] = 1 /*
|
|
6434
|
+
} else if (type == 8 /* EN */ && prevStrong == 1 /* L */) {
|
|
6435
|
+
types[i] = 1 /* L */;
|
|
6311
6436
|
}
|
|
6312
6437
|
|
|
6313
6438
|
prev = type;
|
|
6314
|
-
if (type & 7 /*
|
|
6439
|
+
if (type & 7 /* Strong */) prevStrong = type;
|
|
6315
6440
|
}
|
|
6316
6441
|
// N0. Process bracket pairs in an isolating run sequence
|
|
6317
6442
|
// sequentially in the logical order of the text positions of the
|
|
@@ -6326,30 +6451,30 @@ function computeOrder(line, direction) {
|
|
|
6326
6451
|
for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
|
|
6327
6452
|
if (BracketStack[sJ + 1] == -br) {
|
|
6328
6453
|
let flags = BracketStack[sJ + 2];
|
|
6329
|
-
let type = flags & 2 /*
|
|
6454
|
+
let type = flags & 2 /* EmbedInside */ ? outerType : !(flags & 4 /* OppositeInside */) ? 0 : flags & 1 /* OppositeBefore */ ? oppositeType : outerType;
|
|
6330
6455
|
if (type) types[i] = types[BracketStack[sJ]] = type;
|
|
6331
6456
|
sI = sJ;
|
|
6332
6457
|
break;
|
|
6333
6458
|
}
|
|
6334
6459
|
}
|
|
6335
|
-
} else if (BracketStack.length == 189 /*
|
|
6460
|
+
} else if (BracketStack.length == 189 /* MaxDepth */) {
|
|
6336
6461
|
break;
|
|
6337
6462
|
} else {
|
|
6338
6463
|
BracketStack[sI++] = i;
|
|
6339
6464
|
BracketStack[sI++] = ch;
|
|
6340
6465
|
BracketStack[sI++] = context;
|
|
6341
6466
|
}
|
|
6342
|
-
} else if ((type = types[i]) == 2 /*
|
|
6467
|
+
} else if ((type = types[i]) == 2 /* R */ || type == 1 /* L */) {
|
|
6343
6468
|
let embed = type == outerType;
|
|
6344
|
-
context = embed ? 0 : 1 /*
|
|
6469
|
+
context = embed ? 0 : 1 /* OppositeBefore */;
|
|
6345
6470
|
for (let sJ = sI - 3; sJ >= 0; sJ -= 3) {
|
|
6346
6471
|
let cur = BracketStack[sJ + 2];
|
|
6347
|
-
if (cur & 2 /*
|
|
6472
|
+
if (cur & 2 /* EmbedInside */) break;
|
|
6348
6473
|
if (embed) {
|
|
6349
|
-
BracketStack[sJ + 2] |= 2 /*
|
|
6474
|
+
BracketStack[sJ + 2] |= 2 /* EmbedInside */;
|
|
6350
6475
|
} else {
|
|
6351
|
-
if (cur & 4 /*
|
|
6352
|
-
BracketStack[sJ + 2] |= 4 /*
|
|
6476
|
+
if (cur & 4 /* OppositeInside */) break;
|
|
6477
|
+
BracketStack[sJ + 2] |= 4 /* OppositeInside */;
|
|
6353
6478
|
}
|
|
6354
6479
|
}
|
|
6355
6480
|
}
|
|
@@ -6362,12 +6487,12 @@ function computeOrder(line, direction) {
|
|
|
6362
6487
|
// N2. Any remaining neutrals take the embedding direction.
|
|
6363
6488
|
// (Left after this: L, R, EN+AN)
|
|
6364
6489
|
for (let i = 0; i < len; i++) {
|
|
6365
|
-
if (types[i] == 256 /*
|
|
6490
|
+
if (types[i] == 256 /* NI */) {
|
|
6366
6491
|
let end = i + 1;
|
|
6367
|
-
while (end < len && types[end] == 256 /*
|
|
6368
|
-
let beforeL = (i ? types[i - 1] : outerType) == 1 /*
|
|
6369
|
-
let afterL = (end < len ? types[end] : outerType) == 1 /*
|
|
6370
|
-
let replace = beforeL == afterL ? beforeL ? 1 /*
|
|
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;
|
|
6371
6496
|
for (let j = i; j < end; j++) types[j] = replace;
|
|
6372
6497
|
i = end - 1;
|
|
6373
6498
|
}
|
|
@@ -6378,16 +6503,16 @@ function computeOrder(line, direction) {
|
|
|
6378
6503
|
// explicit embedding into account, we can build up the order on
|
|
6379
6504
|
// the fly, without following the level-based algorithm.
|
|
6380
6505
|
let order = [];
|
|
6381
|
-
if (outerType == 1 /*
|
|
6506
|
+
if (outerType == 1 /* L */) {
|
|
6382
6507
|
for (let i = 0; i < len;) {
|
|
6383
6508
|
let start = i,
|
|
6384
|
-
rtl = types[i++] != 1 /*
|
|
6385
|
-
while (i < len && rtl == (types[i] != 1 /*
|
|
6509
|
+
rtl = types[i++] != 1 /* L */;
|
|
6510
|
+
while (i < len && rtl == (types[i] != 1 /* L */)) i++;
|
|
6386
6511
|
if (rtl) {
|
|
6387
6512
|
for (let j = i; j > start;) {
|
|
6388
6513
|
let end = j,
|
|
6389
|
-
l = types[--j] != 2 /*
|
|
6390
|
-
while (j > start && l == (types[j - 1] != 2 /*
|
|
6514
|
+
l = types[--j] != 2 /* R */;
|
|
6515
|
+
while (j > start && l == (types[j - 1] != 2 /* R */)) j--;
|
|
6391
6516
|
order.push(new BidiSpan(j, end, l ? 2 : 1));
|
|
6392
6517
|
}
|
|
6393
6518
|
} else {
|
|
@@ -6397,8 +6522,8 @@ function computeOrder(line, direction) {
|
|
|
6397
6522
|
} else {
|
|
6398
6523
|
for (let i = 0; i < len;) {
|
|
6399
6524
|
let start = i,
|
|
6400
|
-
rtl = types[i++] == 2 /*
|
|
6401
|
-
while (i < len && rtl == (types[i] == 2 /*
|
|
6525
|
+
rtl = types[i++] == 2 /* R */;
|
|
6526
|
+
while (i < len && rtl == (types[i] == 2 /* R */)) i++;
|
|
6402
6527
|
order.push(new BidiSpan(start, i, rtl ? 1 : 2));
|
|
6403
6528
|
}
|
|
6404
6529
|
}
|
|
@@ -6528,9 +6653,6 @@ class DOMPoint {
|
|
|
6528
6653
|
}
|
|
6529
6654
|
}
|
|
6530
6655
|
class DocView extends ContentView {
|
|
6531
|
-
get length() {
|
|
6532
|
-
return this.view.state.doc.length;
|
|
6533
|
-
}
|
|
6534
6656
|
constructor(view) {
|
|
6535
6657
|
super();
|
|
6536
6658
|
this.view = view;
|
|
@@ -6561,10 +6683,10 @@ class DocView extends ContentView {
|
|
|
6561
6683
|
this.updateDeco();
|
|
6562
6684
|
this.updateInner([new ChangedRange(0, 0, 0, view.state.doc.length)], 0);
|
|
6563
6685
|
}
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
//
|
|
6686
|
+
get length() {
|
|
6687
|
+
return this.view.state.doc.length;
|
|
6688
|
+
}
|
|
6689
|
+
// Update the document view to a given state.
|
|
6568
6690
|
update(update) {
|
|
6569
6691
|
let changedRanges = update.changedRanges;
|
|
6570
6692
|
if (this.minWidth > 0 && changedRanges.length) {
|
|
@@ -6592,7 +6714,7 @@ class DocView extends ContentView {
|
|
|
6592
6714
|
deco = this.updateDeco();
|
|
6593
6715
|
let decoDiff = findChangedDeco(prevDeco, deco, update.changes);
|
|
6594
6716
|
changedRanges = ChangedRange.extendWithRanges(changedRanges, decoDiff);
|
|
6595
|
-
if (this.dirty == 0 /*
|
|
6717
|
+
if (this.dirty == 0 /* Not */ && changedRanges.length == 0) {
|
|
6596
6718
|
return false;
|
|
6597
6719
|
} else {
|
|
6598
6720
|
this.updateInner(changedRanges, update.startState.doc.length);
|
|
@@ -6624,7 +6746,7 @@ class DocView extends ContentView {
|
|
|
6624
6746
|
written: false
|
|
6625
6747
|
} : undefined;
|
|
6626
6748
|
this.sync(this.view, track);
|
|
6627
|
-
this.dirty = 0 /*
|
|
6749
|
+
this.dirty = 0 /* Not */;
|
|
6628
6750
|
if (track && (track.written || observer.selectionRange.focusNode != track.node)) this.forceSelection = true;
|
|
6629
6751
|
this.dom.style.height = "";
|
|
6630
6752
|
});
|
|
@@ -6702,9 +6824,9 @@ class DocView extends ContentView {
|
|
|
6702
6824
|
// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1612076
|
|
6703
6825
|
if (browser.gecko) {
|
|
6704
6826
|
let nextTo = nextToUneditable(anchor.node, anchor.offset);
|
|
6705
|
-
if (nextTo && nextTo != (1 /*
|
|
6706
|
-
let text = nearbyTextNode(anchor.node, anchor.offset, nextTo == 1 /*
|
|
6707
|
-
if (text) anchor = new DOMPos(text, nextTo == 1 /*
|
|
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);
|
|
6708
6830
|
}
|
|
6709
6831
|
}
|
|
6710
6832
|
rawSel.collapse(anchor.node, anchor.offset);
|
|
@@ -7006,7 +7128,11 @@ function computeCompositionDeco(view, changes) {
|
|
|
7006
7128
|
let {
|
|
7007
7129
|
state
|
|
7008
7130
|
} = view,
|
|
7009
|
-
|
|
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;
|
|
7010
7136
|
if (text.indexOf(LineBreakPlaceholder) > -1) return Decoration.none; // Don't try to preserve multi-line compositions
|
|
7011
7137
|
if (newTo - newFrom < text.length) {
|
|
7012
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;
|
|
@@ -7063,7 +7189,7 @@ function nearbyTextNode(startNode, startOffset, side) {
|
|
|
7063
7189
|
}
|
|
7064
7190
|
function nextToUneditable(node, offset) {
|
|
7065
7191
|
if (node.nodeType != 1) return 0;
|
|
7066
|
-
return (offset && node.childNodes[offset - 1].contentEditable == "false" ? 1 /*
|
|
7192
|
+
return (offset && node.childNodes[offset - 1].contentEditable == "false" ? 1 /* Before */ : 0) | (offset < node.childNodes.length && node.childNodes[offset].contentEditable == "false" ? 2 /* After */ : 0);
|
|
7067
7193
|
}
|
|
7068
7194
|
class DecorationComparator$1 {
|
|
7069
7195
|
constructor() {
|
|
@@ -7250,7 +7376,7 @@ function posAtCoords(view, coords, precise) {
|
|
|
7250
7376
|
if (yOffset < 0) return 0;
|
|
7251
7377
|
if (yOffset > docHeight) return view.state.doc.length;
|
|
7252
7378
|
// Scan for a text block near the queried y position
|
|
7253
|
-
for (let halfLine = view.
|
|
7379
|
+
for (let halfLine = view.viewState.heightOracle.textHeight / 2, bounced = false;;) {
|
|
7254
7380
|
block = view.elementAtHeight(yOffset);
|
|
7255
7381
|
if (block.type == BlockType.Text) break;
|
|
7256
7382
|
for (;;) {
|
|
@@ -7323,7 +7449,8 @@ function posAtCoords(view, coords, precise) {
|
|
|
7323
7449
|
function posAtCoordsImprecise(view, contentRect, block, x, y) {
|
|
7324
7450
|
let into = Math.round((x - contentRect.left) * view.defaultCharacterWidth);
|
|
7325
7451
|
if (view.lineWrapping && block.height > view.defaultLineHeight * 1.5) {
|
|
7326
|
-
let
|
|
7452
|
+
let textHeight = view.viewState.heightOracle.textHeight;
|
|
7453
|
+
let line = Math.floor((y - block.top - (view.defaultLineHeight - textHeight) * 0.5) / textHeight);
|
|
7327
7454
|
into += line * view.viewState.heightOracle.lineLength;
|
|
7328
7455
|
}
|
|
7329
7456
|
let content = view.state.sliceDoc(block.from, block.to);
|
|
@@ -7351,9 +7478,16 @@ function isSuspiciousChromeCaretResult(node, offset, x) {
|
|
|
7351
7478
|
let rect = node.nodeType == 1 ? node.getBoundingClientRect() : textRange(node, 0, Math.max(node.nodeValue.length, 1)).getBoundingClientRect();
|
|
7352
7479
|
return x - rect.left > 5;
|
|
7353
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
|
+
}
|
|
7354
7488
|
function moveToLineBoundary(view, start, forward, includeWrap) {
|
|
7355
|
-
let line = view
|
|
7356
|
-
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);
|
|
7357
7491
|
if (coords) {
|
|
7358
7492
|
let editorRect = view.dom.getBoundingClientRect();
|
|
7359
7493
|
let direction = view.textDirectionAt(line.from);
|
|
@@ -7363,9 +7497,7 @@ function moveToLineBoundary(view, start, forward, includeWrap) {
|
|
|
7363
7497
|
});
|
|
7364
7498
|
if (pos != null) return EditorSelection.cursor(pos, forward ? -1 : 1);
|
|
7365
7499
|
}
|
|
7366
|
-
|
|
7367
|
-
let end = lineView ? forward ? lineView.posAtEnd : lineView.posAtStart : forward ? line.to : line.from;
|
|
7368
|
-
return EditorSelection.cursor(end, forward ? -1 : 1);
|
|
7500
|
+
return EditorSelection.cursor(forward ? line.to : line.from, forward ? -1 : 1);
|
|
7369
7501
|
}
|
|
7370
7502
|
function moveByChar(view, start, forward, by) {
|
|
7371
7503
|
let line = view.state.doc.lineAt(start.head),
|
|
@@ -7417,7 +7549,7 @@ function moveVertically(view, start, forward, distance) {
|
|
|
7417
7549
|
startY = (dir < 0 ? line.top : line.bottom) + docTop;
|
|
7418
7550
|
}
|
|
7419
7551
|
let resolvedGoal = rect.left + goal;
|
|
7420
|
-
let dist = distance !== null && distance !== void 0 ? distance : view.
|
|
7552
|
+
let dist = distance !== null && distance !== void 0 ? distance : view.viewState.heightOracle.textHeight >> 1;
|
|
7421
7553
|
for (let extra = 0;; extra += 10) {
|
|
7422
7554
|
let curY = startY + (dist + extra) * dir;
|
|
7423
7555
|
let pos = posAtCoords(view, {
|
|
@@ -7449,10 +7581,6 @@ function skipAtoms(view, oldPos, pos) {
|
|
|
7449
7581
|
|
|
7450
7582
|
// This will also be where dragging info and such goes
|
|
7451
7583
|
class InputState {
|
|
7452
|
-
setSelectionOrigin(origin) {
|
|
7453
|
-
this.lastSelectionOrigin = origin;
|
|
7454
|
-
this.lastSelectionTime = Date.now();
|
|
7455
|
-
}
|
|
7456
7584
|
constructor(view) {
|
|
7457
7585
|
this.lastKeyCode = 0;
|
|
7458
7586
|
this.lastKeyTime = 0;
|
|
@@ -7540,6 +7668,10 @@ class InputState {
|
|
|
7540
7668
|
// issue where the composition vanishes when you press enter.
|
|
7541
7669
|
if (browser.safari) view.contentDOM.addEventListener("input", () => null);
|
|
7542
7670
|
}
|
|
7671
|
+
setSelectionOrigin(origin) {
|
|
7672
|
+
this.lastSelectionOrigin = origin;
|
|
7673
|
+
this.lastSelectionTime = Date.now();
|
|
7674
|
+
}
|
|
7543
7675
|
ensureHandlers(view, plugins) {
|
|
7544
7676
|
var _a;
|
|
7545
7677
|
let handlers;
|
|
@@ -7687,7 +7819,6 @@ class MouseSelection {
|
|
|
7687
7819
|
doc.addEventListener("mouseup", this.up = this.up.bind(this));
|
|
7688
7820
|
this.extend = startEvent.shiftKey;
|
|
7689
7821
|
this.multiple = view.state.facet(EditorState.allowMultipleSelections) && addsSelectionRange(view, startEvent);
|
|
7690
|
-
this.dragMove = dragMovesSelection(view, startEvent);
|
|
7691
7822
|
this.dragging = isInPrimarySelection(view, startEvent) && getClickType(startEvent) == 1 ? null : false;
|
|
7692
7823
|
}
|
|
7693
7824
|
start(event) {
|
|
@@ -8029,7 +8160,7 @@ function dropText(view, event, text, direct) {
|
|
|
8029
8160
|
let {
|
|
8030
8161
|
mouseSelection
|
|
8031
8162
|
} = view.inputState;
|
|
8032
|
-
let del = direct && mouseSelection && mouseSelection.dragging &&
|
|
8163
|
+
let del = direct && mouseSelection && mouseSelection.dragging && dragMovesSelection(view, event) ? {
|
|
8033
8164
|
from: mouseSelection.dragging.from,
|
|
8034
8165
|
to: mouseSelection.dragging.to
|
|
8035
8166
|
} : null;
|
|
@@ -8349,34 +8480,24 @@ class BlockInfo {
|
|
|
8349
8480
|
*/
|
|
8350
8481
|
height,
|
|
8351
8482
|
/**
|
|
8352
|
-
@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.
|
|
8353
8487
|
*/
|
|
8354
|
-
|
|
8355
|
-
/**
|
|
8356
|
-
@internal
|
|
8357
|
-
*/
|
|
8358
|
-
deco) {
|
|
8488
|
+
_content) {
|
|
8359
8489
|
this.from = from;
|
|
8360
8490
|
this.length = length;
|
|
8361
8491
|
this.top = top;
|
|
8362
8492
|
this.height = height;
|
|
8363
|
-
this.
|
|
8364
|
-
this.deco = deco;
|
|
8493
|
+
this._content = _content;
|
|
8365
8494
|
}
|
|
8366
8495
|
/**
|
|
8367
8496
|
The type of element this is. When querying lines, this may be
|
|
8368
8497
|
an array of all the blocks that make up the line.
|
|
8369
8498
|
*/
|
|
8370
8499
|
get type() {
|
|
8371
|
-
|
|
8372
|
-
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;
|
|
8373
|
-
}
|
|
8374
|
-
/**
|
|
8375
|
-
If this is a widget block, this will return the widget
|
|
8376
|
-
associated with it.
|
|
8377
|
-
*/
|
|
8378
|
-
get widget() {
|
|
8379
|
-
return this.deco && this.deco.widget;
|
|
8500
|
+
return typeof this._content == "number" ? BlockType.Text : Array.isArray(this._content) ? this._content : this._content.type;
|
|
8380
8501
|
}
|
|
8381
8502
|
/**
|
|
8382
8503
|
The end of the element as a document position.
|
|
@@ -8391,11 +8512,25 @@ class BlockInfo {
|
|
|
8391
8512
|
return this.top + this.height;
|
|
8392
8513
|
}
|
|
8393
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
|
+
/**
|
|
8394
8529
|
@internal
|
|
8395
8530
|
*/
|
|
8396
8531
|
join(other) {
|
|
8397
|
-
let
|
|
8398
|
-
return new BlockInfo(this.from, this.length + other.length, this.top, this.height + other.height,
|
|
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);
|
|
8399
8534
|
}
|
|
8400
8535
|
}
|
|
8401
8536
|
var QueryType = /*@__PURE__*/function (QueryType) {
|
|
@@ -8415,10 +8550,10 @@ class HeightMap {
|
|
|
8415
8550
|
this.flags = flags;
|
|
8416
8551
|
}
|
|
8417
8552
|
get outdated() {
|
|
8418
|
-
return (this.flags & 2 /*
|
|
8553
|
+
return (this.flags & 2 /* Outdated */) > 0;
|
|
8419
8554
|
}
|
|
8420
8555
|
set outdated(value) {
|
|
8421
|
-
this.flags = (value ? 2 /*
|
|
8556
|
+
this.flags = (value ? 2 /* Outdated */ : 0) | this.flags & ~2 /* Outdated */;
|
|
8422
8557
|
}
|
|
8423
8558
|
setHeight(oracle, height) {
|
|
8424
8559
|
if (this.height != height) {
|
|
@@ -8520,7 +8655,7 @@ class HeightMapBlock extends HeightMap {
|
|
|
8520
8655
|
this.deco = deco;
|
|
8521
8656
|
}
|
|
8522
8657
|
blockAt(_height, _oracle, top, offset) {
|
|
8523
|
-
return new BlockInfo(offset, this.length, top, this.height,
|
|
8658
|
+
return new BlockInfo(offset, this.length, top, this.height, this.deco || 0);
|
|
8524
8659
|
}
|
|
8525
8660
|
lineAt(_value, _type, oracle, top, offset) {
|
|
8526
8661
|
return this.blockAt(0, oracle, top, offset);
|
|
@@ -8544,11 +8679,15 @@ class HeightMapText extends HeightMapBlock {
|
|
|
8544
8679
|
super(length, height, null);
|
|
8545
8680
|
this.collapsed = 0; // Amount of collapsed content in the line
|
|
8546
8681
|
this.widgetHeight = 0; // Maximum inline widget height
|
|
8682
|
+
this.breaks = 0; // Number of widget-introduced line breaks on the line
|
|
8547
8683
|
}
|
|
8548
8684
|
|
|
8685
|
+
blockAt(_height, _oracle, top, offset) {
|
|
8686
|
+
return new BlockInfo(offset, this.length, top, this.height, this.breaks);
|
|
8687
|
+
}
|
|
8549
8688
|
replace(_from, _to, nodes) {
|
|
8550
8689
|
let node = nodes[0];
|
|
8551
|
-
if (nodes.length == 1 && (node instanceof HeightMapText || node instanceof HeightMapGap && node.flags & 4 /*
|
|
8690
|
+
if (nodes.length == 1 && (node instanceof HeightMapText || node instanceof HeightMapGap && node.flags & 4 /* SingleLine */) && Math.abs(this.length - node.length) < 10) {
|
|
8552
8691
|
if (node instanceof HeightMapGap) node = new HeightMapText(node.length, this.height);else node.height = this.height;
|
|
8553
8692
|
if (!this.outdated) node.outdated = false;
|
|
8554
8693
|
return node;
|
|
@@ -8560,7 +8699,7 @@ class HeightMapText extends HeightMapBlock {
|
|
|
8560
8699
|
let offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
8561
8700
|
let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8562
8701
|
let measured = arguments.length > 3 ? arguments[3] : undefined;
|
|
8563
|
-
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);
|
|
8564
8703
|
this.outdated = false;
|
|
8565
8704
|
return this;
|
|
8566
8705
|
}
|
|
@@ -8604,14 +8743,14 @@ class HeightMapGap extends HeightMap {
|
|
|
8604
8743
|
let line = oracle.doc.lineAt(guess),
|
|
8605
8744
|
lineHeight = perLine + line.length * perChar;
|
|
8606
8745
|
let lineTop = Math.max(top, height - lineHeight / 2);
|
|
8607
|
-
return new BlockInfo(line.from, line.length, lineTop, lineHeight,
|
|
8746
|
+
return new BlockInfo(line.from, line.length, lineTop, lineHeight, 0);
|
|
8608
8747
|
} else {
|
|
8609
8748
|
let line = Math.max(0, Math.min(lastLine - firstLine, Math.floor((height - top) / perLine)));
|
|
8610
8749
|
let {
|
|
8611
8750
|
from,
|
|
8612
8751
|
length
|
|
8613
8752
|
} = oracle.doc.line(firstLine + line);
|
|
8614
|
-
return new BlockInfo(from, length, top + perLine * line, perLine,
|
|
8753
|
+
return new BlockInfo(from, length, top + perLine * line, perLine, 0);
|
|
8615
8754
|
}
|
|
8616
8755
|
}
|
|
8617
8756
|
lineAt(value, type, oracle, top, offset) {
|
|
@@ -8621,7 +8760,7 @@ class HeightMapGap extends HeightMap {
|
|
|
8621
8760
|
from,
|
|
8622
8761
|
to
|
|
8623
8762
|
} = oracle.doc.lineAt(value);
|
|
8624
|
-
return new BlockInfo(from, to - from, 0, 0,
|
|
8763
|
+
return new BlockInfo(from, to - from, 0, 0, 0);
|
|
8625
8764
|
}
|
|
8626
8765
|
let {
|
|
8627
8766
|
firstLine,
|
|
@@ -8632,7 +8771,7 @@ class HeightMapGap extends HeightMap {
|
|
|
8632
8771
|
lineHeight = perLine + line.length * perChar;
|
|
8633
8772
|
let linesAbove = line.number - firstLine;
|
|
8634
8773
|
let lineTop = top + perLine * linesAbove + perChar * (line.from - offset - linesAbove);
|
|
8635
|
-
return new BlockInfo(line.from, line.length, Math.max(top, Math.min(lineTop, top + this.height - lineHeight)), lineHeight,
|
|
8774
|
+
return new BlockInfo(line.from, line.length, Math.max(top, Math.min(lineTop, top + this.height - lineHeight)), lineHeight, 0);
|
|
8636
8775
|
}
|
|
8637
8776
|
forEachLine(from, to, oracle, top, offset, f) {
|
|
8638
8777
|
from = Math.max(from, offset);
|
|
@@ -8649,7 +8788,7 @@ class HeightMapGap extends HeightMap {
|
|
|
8649
8788
|
lineTop += perLine * linesAbove + perChar * (from - offset - linesAbove);
|
|
8650
8789
|
}
|
|
8651
8790
|
let lineHeight = perLine + perChar * line.length;
|
|
8652
|
-
f(new BlockInfo(line.from, line.length, lineTop, lineHeight,
|
|
8791
|
+
f(new BlockInfo(line.from, line.length, lineTop, lineHeight, 0));
|
|
8653
8792
|
lineTop += lineHeight;
|
|
8654
8793
|
pos = line.to + 1;
|
|
8655
8794
|
}
|
|
@@ -8712,13 +8851,13 @@ class HeightMapGap extends HeightMap {
|
|
|
8712
8851
|
}
|
|
8713
8852
|
class HeightMapBranch extends HeightMap {
|
|
8714
8853
|
constructor(left, brk, right) {
|
|
8715
|
-
super(left.length + brk + right.length, left.height + right.height, brk | (left.outdated || right.outdated ? 2 /*
|
|
8854
|
+
super(left.length + brk + right.length, left.height + right.height, brk | (left.outdated || right.outdated ? 2 /* Outdated */ : 0));
|
|
8716
8855
|
this.left = left;
|
|
8717
8856
|
this.right = right;
|
|
8718
8857
|
this.size = left.size + right.size;
|
|
8719
8858
|
}
|
|
8720
8859
|
get break() {
|
|
8721
|
-
return this.flags & 1 /*
|
|
8860
|
+
return this.flags & 1 /* Break */;
|
|
8722
8861
|
}
|
|
8723
8862
|
blockAt(height, oracle, top, offset) {
|
|
8724
8863
|
let mid = top + this.left.height;
|
|
@@ -8846,12 +8985,13 @@ class NodeBuilder {
|
|
|
8846
8985
|
point(from, to, deco) {
|
|
8847
8986
|
if (from < to || deco.heightRelevant) {
|
|
8848
8987
|
let height = deco.widget ? deco.widget.estimatedHeight : 0;
|
|
8988
|
+
let breaks = deco.widget ? deco.widget.lineBreaks : 0;
|
|
8849
8989
|
if (height < 0) height = this.oracle.lineHeight;
|
|
8850
8990
|
let len = to - from;
|
|
8851
8991
|
if (deco.block) {
|
|
8852
8992
|
this.addBlock(new HeightMapBlock(len, height, deco));
|
|
8853
|
-
} else if (len || height >= relevantWidgetHeight) {
|
|
8854
|
-
this.addLineDeco(height, len);
|
|
8993
|
+
} else if (len || breaks || height >= relevantWidgetHeight) {
|
|
8994
|
+
this.addLineDeco(height, breaks, len);
|
|
8855
8995
|
}
|
|
8856
8996
|
} else if (to > from) {
|
|
8857
8997
|
this.span(from, to);
|
|
@@ -8875,7 +9015,7 @@ class NodeBuilder {
|
|
|
8875
9015
|
}
|
|
8876
9016
|
blankContent(from, to) {
|
|
8877
9017
|
let gap = new HeightMapGap(to - from);
|
|
8878
|
-
if (this.oracle.doc.lineAt(from).to == to) gap.flags |= 4 /*
|
|
9018
|
+
if (this.oracle.doc.lineAt(from).to == to) gap.flags |= 4 /* SingleLine */;
|
|
8879
9019
|
return gap;
|
|
8880
9020
|
}
|
|
8881
9021
|
ensureLine() {
|
|
@@ -8895,11 +9035,12 @@ class NodeBuilder {
|
|
|
8895
9035
|
this.writtenTo = this.pos = this.pos + block.length;
|
|
8896
9036
|
if (type != BlockType.WidgetBefore) this.covering = block;
|
|
8897
9037
|
}
|
|
8898
|
-
addLineDeco(height, length) {
|
|
9038
|
+
addLineDeco(height, breaks, length) {
|
|
8899
9039
|
let line = this.ensureLine();
|
|
8900
9040
|
line.length += length;
|
|
8901
9041
|
line.collapsed += length;
|
|
8902
9042
|
line.widgetHeight = Math.max(line.widgetHeight, height);
|
|
9043
|
+
line.breaks += breaks;
|
|
8903
9044
|
this.writtenTo = this.pos = this.pos + length;
|
|
8904
9045
|
}
|
|
8905
9046
|
finish(from) {
|
|
@@ -9045,6 +9186,14 @@ class ViewState {
|
|
|
9045
9186
|
this.contentDOMHeight = 0;
|
|
9046
9187
|
this.editorHeight = 0;
|
|
9047
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;
|
|
9048
9197
|
// See VP.MaxDOMHeight
|
|
9049
9198
|
this.scaler = IdScaler;
|
|
9050
9199
|
this.scrollTarget = null;
|
|
@@ -9097,7 +9246,7 @@ class ViewState {
|
|
|
9097
9246
|
}
|
|
9098
9247
|
}
|
|
9099
9248
|
this.viewports = viewports.sort((a, b) => a.from - b.from);
|
|
9100
|
-
this.scaler = this.heightMap.height <= 7000000 /*
|
|
9249
|
+
this.scaler = this.heightMap.height <= 7000000 /* MaxDOMHeight */ ? IdScaler : new BigScaler(this.heightOracle, this.heightMap, this.viewports);
|
|
9101
9250
|
}
|
|
9102
9251
|
updateViewportLines() {
|
|
9103
9252
|
this.viewportLines = [];
|
|
@@ -9113,15 +9262,23 @@ class ViewState {
|
|
|
9113
9262
|
let contentChanges = update.changedRanges;
|
|
9114
9263
|
let heightChanges = ChangedRange.extendWithRanges(contentChanges, heightRelevantDecoChanges(prevDeco, this.stateDeco, update ? update.changes : ChangeSet.empty(this.state.doc.length)));
|
|
9115
9264
|
let prevHeight = this.heightMap.height;
|
|
9265
|
+
let scrollAnchor = this.scrolledToBottom ? null : this.lineBlockAtHeight(this.scrollTop);
|
|
9116
9266
|
this.heightMap = this.heightMap.applyChanges(this.stateDeco, update.startState.doc, this.heightOracle.setDoc(this.state.doc), heightChanges);
|
|
9117
|
-
if (this.heightMap.height != prevHeight) update.flags |= 2 /*
|
|
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
|
+
}
|
|
9118
9275
|
let viewport = heightChanges.length ? this.mapViewport(this.viewport, update.changes) : this.viewport;
|
|
9119
9276
|
if (scrollTarget && (scrollTarget.range.head < viewport.from || scrollTarget.range.head > viewport.to) || !this.viewportIsAppropriate(viewport)) viewport = this.getViewport(0, scrollTarget);
|
|
9120
|
-
let updateLines = !update.changes.empty || update.flags & 2 /*
|
|
9277
|
+
let updateLines = !update.changes.empty || update.flags & 2 /* Height */ || viewport.from != this.viewport.from || viewport.to != this.viewport.to;
|
|
9121
9278
|
this.viewport = viewport;
|
|
9122
9279
|
this.updateForViewport();
|
|
9123
9280
|
if (updateLines) this.updateViewportLines();
|
|
9124
|
-
if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /*
|
|
9281
|
+
if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /* Margin */ << 1) this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps, update.changes)));
|
|
9125
9282
|
update.flags |= this.computeVisibleRanges();
|
|
9126
9283
|
if (scrollTarget) this.scrollTarget = scrollTarget;
|
|
9127
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;
|
|
@@ -9145,14 +9302,20 @@ class ViewState {
|
|
|
9145
9302
|
if (this.paddingTop != paddingTop || this.paddingBottom != paddingBottom) {
|
|
9146
9303
|
this.paddingTop = paddingTop;
|
|
9147
9304
|
this.paddingBottom = paddingBottom;
|
|
9148
|
-
result |= 8 /*
|
|
9305
|
+
result |= 8 /* Geometry */ | 2 /* Height */;
|
|
9149
9306
|
}
|
|
9150
9307
|
|
|
9151
9308
|
if (this.editorWidth != view.scrollDOM.clientWidth) {
|
|
9152
9309
|
if (oracle.lineWrapping) measureContent = true;
|
|
9153
9310
|
this.editorWidth = view.scrollDOM.clientWidth;
|
|
9154
|
-
result |= 8 /*
|
|
9311
|
+
result |= 8 /* Geometry */;
|
|
9155
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;
|
|
9156
9319
|
// Pixel viewport
|
|
9157
9320
|
let pixelViewport = (this.printing ? fullPixelRange : visiblePixelRange)(dom, this.paddingTop);
|
|
9158
9321
|
let dTop = pixelViewport.top - this.pixelViewport.top,
|
|
@@ -9168,7 +9331,7 @@ class ViewState {
|
|
|
9168
9331
|
if (this.contentDOMWidth != contentWidth || this.editorHeight != view.scrollDOM.clientHeight) {
|
|
9169
9332
|
this.contentDOMWidth = domRect.width;
|
|
9170
9333
|
this.editorHeight = view.scrollDOM.clientHeight;
|
|
9171
|
-
result |= 8 /*
|
|
9334
|
+
result |= 8 /* Geometry */;
|
|
9172
9335
|
}
|
|
9173
9336
|
|
|
9174
9337
|
if (measureContent) {
|
|
@@ -9183,7 +9346,7 @@ class ViewState {
|
|
|
9183
9346
|
refresh = lineHeight > 0 && oracle.refresh(whiteSpace, lineHeight, charWidth, textHeight, contentWidth / charWidth, lineHeights);
|
|
9184
9347
|
if (refresh) {
|
|
9185
9348
|
view.docView.minWidth = 0;
|
|
9186
|
-
result |= 8 /*
|
|
9349
|
+
result |= 8 /* Geometry */;
|
|
9187
9350
|
}
|
|
9188
9351
|
}
|
|
9189
9352
|
|
|
@@ -9193,14 +9356,14 @@ class ViewState {
|
|
|
9193
9356
|
let heights = vp.from == this.viewport.from ? lineHeights : view.docView.measureVisibleLineHeights(vp);
|
|
9194
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));
|
|
9195
9358
|
}
|
|
9196
|
-
if (oracle.heightChanged) result |= 2 /*
|
|
9359
|
+
if (oracle.heightChanged) result |= 2 /* Height */;
|
|
9197
9360
|
}
|
|
9198
9361
|
|
|
9199
9362
|
let viewportChange = !this.viewportIsAppropriate(this.viewport, bias) || this.scrollTarget && (this.scrollTarget.range.head < this.viewport.from || this.scrollTarget.range.head > this.viewport.to);
|
|
9200
9363
|
if (viewportChange) this.viewport = this.getViewport(bias, this.scrollTarget);
|
|
9201
9364
|
this.updateForViewport();
|
|
9202
|
-
if (result & 2 /*
|
|
9203
|
-
if (this.lineGaps.length || this.viewport.to - this.viewport.from > 2000 /*
|
|
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));
|
|
9204
9367
|
result |= this.computeVisibleRanges();
|
|
9205
9368
|
if (this.mustEnforceCursorAssoc) {
|
|
9206
9369
|
this.mustEnforceCursorAssoc = false;
|
|
@@ -9222,14 +9385,14 @@ class ViewState {
|
|
|
9222
9385
|
// This will divide VP.Margin between the top and the
|
|
9223
9386
|
// bottom, depending on the bias (the change in viewport position
|
|
9224
9387
|
// since the last update). It'll hold a number between 0 and 1
|
|
9225
|
-
let marginTop = 0.5 - Math.max(-0.5, Math.min(0.5, bias / 1000 /*
|
|
9388
|
+
let marginTop = 0.5 - Math.max(-0.5, Math.min(0.5, bias / 1000 /* Margin */ / 2));
|
|
9226
9389
|
let map = this.heightMap,
|
|
9227
9390
|
oracle = this.heightOracle;
|
|
9228
9391
|
let {
|
|
9229
9392
|
visibleTop,
|
|
9230
9393
|
visibleBottom
|
|
9231
9394
|
} = this;
|
|
9232
|
-
let viewport = new Viewport(map.lineAt(visibleTop - marginTop * 1000 /*
|
|
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);
|
|
9233
9396
|
// If scrollTarget is given, make sure the viewport includes that position
|
|
9234
9397
|
if (scrollTarget) {
|
|
9235
9398
|
let {
|
|
@@ -9240,7 +9403,7 @@ class ViewState {
|
|
|
9240
9403
|
let block = map.lineAt(head, QueryType.ByPos, oracle, 0, 0),
|
|
9241
9404
|
topPos;
|
|
9242
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;
|
|
9243
|
-
viewport = new Viewport(map.lineAt(topPos - 1000 /*
|
|
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);
|
|
9244
9407
|
}
|
|
9245
9408
|
}
|
|
9246
9409
|
return viewport;
|
|
@@ -9269,7 +9432,7 @@ class ViewState {
|
|
|
9269
9432
|
visibleTop,
|
|
9270
9433
|
visibleBottom
|
|
9271
9434
|
} = this;
|
|
9272
|
-
return (from == 0 || top <= visibleTop - Math.max(10 /*
|
|
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 */;
|
|
9273
9436
|
}
|
|
9274
9437
|
|
|
9275
9438
|
mapLineGaps(gaps, changes) {
|
|
@@ -9287,7 +9450,7 @@ class ViewState {
|
|
|
9287
9450
|
// the artifacts this might produce from the user.
|
|
9288
9451
|
ensureLineGaps(current, mayMeasure) {
|
|
9289
9452
|
let wrapping = this.heightOracle.lineWrapping;
|
|
9290
|
-
let margin = wrapping ? 10000 /*
|
|
9453
|
+
let margin = wrapping ? 10000 /* MarginWrap */ : 2000 /* Margin */,
|
|
9291
9454
|
halfMargin = margin >> 1,
|
|
9292
9455
|
doubleMargin = margin << 1;
|
|
9293
9456
|
// The non-wrapping logic won't work at all in predominantly right-to-left text.
|
|
@@ -9300,8 +9463,8 @@ class ViewState {
|
|
|
9300
9463
|
if (!sel.empty) avoid.push(sel.to);
|
|
9301
9464
|
for (let pos of avoid) {
|
|
9302
9465
|
if (pos > from && pos < to) {
|
|
9303
|
-
addGap(from, pos - 10 /*
|
|
9304
|
-
addGap(pos + 10 /*
|
|
9466
|
+
addGap(from, pos - 10 /* SelectionMargin */, line, structure);
|
|
9467
|
+
addGap(pos + 10 /* SelectionMargin */, to, line, structure);
|
|
9305
9468
|
return;
|
|
9306
9469
|
}
|
|
9307
9470
|
}
|
|
@@ -9386,7 +9549,7 @@ class ViewState {
|
|
|
9386
9549
|
}, 20);
|
|
9387
9550
|
let changed = ranges.length != this.visibleRanges.length || this.visibleRanges.some((r, i) => r.from != ranges[i].from || r.to != ranges[i].to);
|
|
9388
9551
|
this.visibleRanges = ranges;
|
|
9389
|
-
return changed ? 4 /*
|
|
9552
|
+
return changed ? 4 /* Viewport */ : 0;
|
|
9390
9553
|
}
|
|
9391
9554
|
lineBlockAt(pos) {
|
|
9392
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);
|
|
@@ -9511,7 +9674,7 @@ class BigScaler {
|
|
|
9511
9674
|
domBottom: 0
|
|
9512
9675
|
};
|
|
9513
9676
|
});
|
|
9514
|
-
this.scale = (7000000 /*
|
|
9677
|
+
this.scale = (7000000 /* MaxDOMHeight */ - vpHeight) / (heightMap.height - vpHeight);
|
|
9515
9678
|
for (let obj of this.viewports) {
|
|
9516
9679
|
obj.domTop = domBase + (obj.top - base) * this.scale;
|
|
9517
9680
|
domBase = obj.domBottom = obj.domTop + (obj.bottom - obj.top);
|
|
@@ -9541,7 +9704,7 @@ function scaleBlock(block, scaler) {
|
|
|
9541
9704
|
if (scaler.scale == 1) return block;
|
|
9542
9705
|
let bTop = scaler.toDOM(block.top),
|
|
9543
9706
|
bBottom = scaler.toDOM(block.bottom);
|
|
9544
|
-
return new BlockInfo(block.from, block.length, bTop, bBottom - bTop, block.
|
|
9707
|
+
return new BlockInfo(block.from, block.length, bTop, bBottom - bTop, Array.isArray(block._content) ? block._content.map(b => scaleBlock(b, scaler)) : block._content);
|
|
9545
9708
|
}
|
|
9546
9709
|
const theme = /*@__PURE__*/Facet.define({
|
|
9547
9710
|
combine: strs => strs.join(" ")
|
|
@@ -10405,7 +10568,7 @@ class DOMObserver {
|
|
|
10405
10568
|
let cView = this.view.docView.nearest(rec.target);
|
|
10406
10569
|
if (!cView || cView.ignoreMutation(rec)) return null;
|
|
10407
10570
|
cView.markDirty(rec.type == "attributes");
|
|
10408
|
-
if (rec.type == "attributes") cView.dirty |= 4 /*
|
|
10571
|
+
if (rec.type == "attributes") cView.dirty |= 4 /* Attrs */;
|
|
10409
10572
|
if (rec.type == "childList") {
|
|
10410
10573
|
let childBefore = findChild(cView, rec.previousSibling || rec.target.previousSibling, -1);
|
|
10411
10574
|
let childAfter = findChild(cView, rec.nextSibling || rec.target.nextSibling, 1);
|
|
@@ -10521,6 +10684,58 @@ line number gutter. It handles events and dispatches state
|
|
|
10521
10684
|
transactions for editing actions.
|
|
10522
10685
|
*/
|
|
10523
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
|
+
}
|
|
10524
10739
|
/**
|
|
10525
10740
|
The current editor state.
|
|
10526
10741
|
*/
|
|
@@ -10584,58 +10799,6 @@ class EditorView {
|
|
|
10584
10799
|
get win() {
|
|
10585
10800
|
return this.dom.ownerDocument.defaultView || window;
|
|
10586
10801
|
}
|
|
10587
|
-
/**
|
|
10588
|
-
Construct a new view. You'll want to either provide a `parent`
|
|
10589
|
-
option, or put `view.dom` into your document after creating a
|
|
10590
|
-
view, so that the user can see the editor.
|
|
10591
|
-
*/
|
|
10592
|
-
constructor() {
|
|
10593
|
-
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
10594
|
-
this.plugins = [];
|
|
10595
|
-
this.pluginMap = new Map();
|
|
10596
|
-
this.editorAttrs = {};
|
|
10597
|
-
this.contentAttrs = {};
|
|
10598
|
-
this.bidiCache = [];
|
|
10599
|
-
this.destroyed = false;
|
|
10600
|
-
/**
|
|
10601
|
-
@internal
|
|
10602
|
-
*/
|
|
10603
|
-
this.updateState = 2 /* UpdateState.Updating */;
|
|
10604
|
-
/**
|
|
10605
|
-
@internal
|
|
10606
|
-
*/
|
|
10607
|
-
this.measureScheduled = -1;
|
|
10608
|
-
/**
|
|
10609
|
-
@internal
|
|
10610
|
-
*/
|
|
10611
|
-
this.measureRequests = [];
|
|
10612
|
-
this.contentDOM = document.createElement("div");
|
|
10613
|
-
this.scrollDOM = document.createElement("div");
|
|
10614
|
-
this.scrollDOM.tabIndex = -1;
|
|
10615
|
-
this.scrollDOM.className = "cm-scroller";
|
|
10616
|
-
this.scrollDOM.appendChild(this.contentDOM);
|
|
10617
|
-
this.announceDOM = document.createElement("div");
|
|
10618
|
-
this.announceDOM.style.cssText = "position: fixed; top: -10000px";
|
|
10619
|
-
this.announceDOM.setAttribute("aria-live", "polite");
|
|
10620
|
-
this.dom = document.createElement("div");
|
|
10621
|
-
this.dom.appendChild(this.announceDOM);
|
|
10622
|
-
this.dom.appendChild(this.scrollDOM);
|
|
10623
|
-
this._dispatch = config.dispatch || (tr => this.update([tr]));
|
|
10624
|
-
this.dispatch = this.dispatch.bind(this);
|
|
10625
|
-
this._root = config.root || getRoot(config.parent) || document;
|
|
10626
|
-
this.viewState = new ViewState(config.state || EditorState.create(config));
|
|
10627
|
-
this.plugins = this.state.facet(viewPlugin).map(spec => new PluginInstance(spec));
|
|
10628
|
-
for (let plugin of this.plugins) plugin.update(this);
|
|
10629
|
-
this.observer = new DOMObserver(this);
|
|
10630
|
-
this.inputState = new InputState(this);
|
|
10631
|
-
this.inputState.ensureHandlers(this, this.plugins);
|
|
10632
|
-
this.docView = new DocView(this);
|
|
10633
|
-
this.mountStyles();
|
|
10634
|
-
this.updateAttrs();
|
|
10635
|
-
this.updateState = 0 /* UpdateState.Idle */;
|
|
10636
|
-
this.requestMeasure();
|
|
10637
|
-
if (config.parent) config.parent.appendChild(this.dom);
|
|
10638
|
-
}
|
|
10639
10802
|
dispatch() {
|
|
10640
10803
|
let tr = arguments.length == 1 && (arguments.length <= 0 ? undefined : arguments[0]) instanceof Transaction ? arguments.length <= 0 ? undefined : arguments[0] : this.state.update(...arguments);
|
|
10641
10804
|
this._dispatch(tr, this);
|
|
@@ -10649,7 +10812,7 @@ class EditorView {
|
|
|
10649
10812
|
as a primitive.
|
|
10650
10813
|
*/
|
|
10651
10814
|
update(transactions) {
|
|
10652
|
-
if (this.updateState != 0 /*
|
|
10815
|
+
if (this.updateState != 0 /* Idle */) throw new Error("Calls to EditorView.update are not allowed while an update is in progress");
|
|
10653
10816
|
let redrawn = false,
|
|
10654
10817
|
attrsChanged = false,
|
|
10655
10818
|
update;
|
|
@@ -10668,13 +10831,13 @@ class EditorView {
|
|
|
10668
10831
|
if (transactions.some(tr => tr.annotation(isFocusChange))) {
|
|
10669
10832
|
this.inputState.notifiedFocused = focus;
|
|
10670
10833
|
// If a focus-change transaction is being dispatched, set this update flag.
|
|
10671
|
-
focusFlag = 1 /*
|
|
10834
|
+
focusFlag = 1 /* Focus */;
|
|
10672
10835
|
} else if (focus != this.inputState.notifiedFocused) {
|
|
10673
10836
|
this.inputState.notifiedFocused = focus;
|
|
10674
10837
|
// Schedule a separate focus transaction if necessary, otherwise
|
|
10675
10838
|
// add a flag to this update
|
|
10676
10839
|
dispatchFocus = focusChangeTransaction(state, focus);
|
|
10677
|
-
if (!dispatchFocus) focusFlag = 1 /*
|
|
10840
|
+
if (!dispatchFocus) focusFlag = 1 /* Focus */;
|
|
10678
10841
|
}
|
|
10679
10842
|
// If there was a pending DOM change, eagerly read it and try to
|
|
10680
10843
|
// apply it after the given transactions.
|
|
@@ -10695,7 +10858,7 @@ class EditorView {
|
|
|
10695
10858
|
update.flags |= focusFlag;
|
|
10696
10859
|
let scrollTarget = this.viewState.scrollTarget;
|
|
10697
10860
|
try {
|
|
10698
|
-
this.updateState = 2 /*
|
|
10861
|
+
this.updateState = 2 /* Updating */;
|
|
10699
10862
|
for (let tr of transactions) {
|
|
10700
10863
|
if (scrollTarget) scrollTarget = scrollTarget.map(tr.changes);
|
|
10701
10864
|
if (tr.scrollIntoView) {
|
|
@@ -10718,7 +10881,7 @@ class EditorView {
|
|
|
10718
10881
|
this.showAnnouncements(transactions);
|
|
10719
10882
|
this.docView.updateSelection(redrawn, transactions.some(tr => tr.isUserEvent("select.pointer")));
|
|
10720
10883
|
} finally {
|
|
10721
|
-
this.updateState = 0 /*
|
|
10884
|
+
this.updateState = 0 /* Idle */;
|
|
10722
10885
|
}
|
|
10723
10886
|
|
|
10724
10887
|
if (update.startState.facet(theme) != update.state.facet(theme)) this.viewState.mustMeasureContent = true;
|
|
@@ -10739,12 +10902,12 @@ class EditorView {
|
|
|
10739
10902
|
[`dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch) instead.)
|
|
10740
10903
|
*/
|
|
10741
10904
|
setState(newState) {
|
|
10742
|
-
if (this.updateState != 0 /*
|
|
10905
|
+
if (this.updateState != 0 /* Idle */) throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");
|
|
10743
10906
|
if (this.destroyed) {
|
|
10744
10907
|
this.viewState.state = newState;
|
|
10745
10908
|
return;
|
|
10746
10909
|
}
|
|
10747
|
-
this.updateState = 2 /*
|
|
10910
|
+
this.updateState = 2 /* Updating */;
|
|
10748
10911
|
let hadFocus = this.hasFocus;
|
|
10749
10912
|
try {
|
|
10750
10913
|
for (let plugin of this.plugins) plugin.destroy(this);
|
|
@@ -10758,7 +10921,7 @@ class EditorView {
|
|
|
10758
10921
|
this.updateAttrs();
|
|
10759
10922
|
this.bidiCache = [];
|
|
10760
10923
|
} finally {
|
|
10761
|
-
this.updateState = 0 /*
|
|
10924
|
+
this.updateState = 0 /* Idle */;
|
|
10762
10925
|
}
|
|
10763
10926
|
|
|
10764
10927
|
if (hadFocus) this.focus();
|
|
@@ -10798,17 +10961,29 @@ class EditorView {
|
|
|
10798
10961
|
this.measureScheduled = 0; // Prevent requestMeasure calls from scheduling another animation frame
|
|
10799
10962
|
if (flush) this.observer.forceFlush();
|
|
10800
10963
|
let updated = null;
|
|
10964
|
+
let sDOM = this.scrollDOM,
|
|
10965
|
+
{
|
|
10966
|
+
scrollTop
|
|
10967
|
+
} = sDOM;
|
|
10801
10968
|
let {
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
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
|
+
}
|
|
10807
10983
|
try {
|
|
10808
10984
|
for (let i = 0;; i++) {
|
|
10809
|
-
this.updateState = 1 /*
|
|
10985
|
+
this.updateState = 1 /* Measuring */;
|
|
10810
10986
|
let oldViewport = this.viewport;
|
|
10811
|
-
let refBlock = this.viewState.lineBlockAtHeight(refHeight);
|
|
10812
10987
|
let changed = this.viewState.measure(this);
|
|
10813
10988
|
if (!changed && !this.measureRequests.length && this.viewState.scrollTarget == null) break;
|
|
10814
10989
|
if (i > 5) {
|
|
@@ -10817,7 +10992,7 @@ class EditorView {
|
|
|
10817
10992
|
}
|
|
10818
10993
|
let measuring = [];
|
|
10819
10994
|
// Only run measure requests in this cycle when the viewport didn't change
|
|
10820
|
-
if (!(changed & 4 /*
|
|
10995
|
+
if (!(changed & 4 /* Viewport */)) [this.measureRequests, measuring] = [measuring, this.measureRequests];
|
|
10821
10996
|
let measured = measuring.map(m => {
|
|
10822
10997
|
try {
|
|
10823
10998
|
return m.read(this);
|
|
@@ -10831,7 +11006,7 @@ class EditorView {
|
|
|
10831
11006
|
scrolled = false;
|
|
10832
11007
|
update.flags |= changed;
|
|
10833
11008
|
if (!updated) updated = update;else updated.flags |= changed;
|
|
10834
|
-
this.updateState = 2 /*
|
|
11009
|
+
this.updateState = 2 /* Updating */;
|
|
10835
11010
|
if (!update.empty) {
|
|
10836
11011
|
this.updatePlugins(update);
|
|
10837
11012
|
this.inputState.update(update);
|
|
@@ -10851,19 +11026,21 @@ class EditorView {
|
|
|
10851
11026
|
this.docView.scrollIntoView(this.viewState.scrollTarget);
|
|
10852
11027
|
this.viewState.scrollTarget = null;
|
|
10853
11028
|
scrolled = true;
|
|
10854
|
-
} else {
|
|
10855
|
-
let
|
|
11029
|
+
} else if (scrollAnchorHeight > -1) {
|
|
11030
|
+
let newAnchorHeight = scrollAnchorPos < 0 ? this.viewState.heightMap.height : this.viewState.lineBlockAt(scrollAnchorPos).top;
|
|
11031
|
+
let diff = newAnchorHeight - scrollAnchorHeight;
|
|
10856
11032
|
if (diff > 1 || diff < -1) {
|
|
10857
|
-
|
|
11033
|
+
sDOM.scrollTop = scrollTop + diff;
|
|
10858
11034
|
scrolled = true;
|
|
10859
11035
|
}
|
|
10860
11036
|
}
|
|
10861
11037
|
}
|
|
10862
11038
|
if (redrawn) this.docView.updateSelection(true);
|
|
10863
11039
|
if (this.viewport.from == oldViewport.from && this.viewport.to == oldViewport.to && !scrolled && this.measureRequests.length == 0) break;
|
|
11040
|
+
scrollAnchorHeight = -1;
|
|
10864
11041
|
}
|
|
10865
11042
|
} finally {
|
|
10866
|
-
this.updateState = 0 /*
|
|
11043
|
+
this.updateState = 0 /* Idle */;
|
|
10867
11044
|
this.measureScheduled = -1;
|
|
10868
11045
|
}
|
|
10869
11046
|
if (updated && !updated.empty) for (let listener of this.state.facet(updateListener)) listener(updated);
|
|
@@ -10914,8 +11091,8 @@ class EditorView {
|
|
|
10914
11091
|
StyleModule.mount(this.root, this.styleModules.concat(baseTheme$1$1).reverse());
|
|
10915
11092
|
}
|
|
10916
11093
|
readMeasured() {
|
|
10917
|
-
if (this.updateState == 2 /*
|
|
10918
|
-
if (this.updateState == 0 /*
|
|
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);
|
|
10919
11096
|
}
|
|
10920
11097
|
/**
|
|
10921
11098
|
Schedule a layout measurement, optionally providing callbacks to
|
|
@@ -11685,13 +11862,6 @@ function wrappedLine(view, pos, inside) {
|
|
|
11685
11862
|
type: BlockType.Text
|
|
11686
11863
|
};
|
|
11687
11864
|
}
|
|
11688
|
-
function blockAt(view, pos) {
|
|
11689
|
-
let line = view.lineBlockAt(pos);
|
|
11690
|
-
if (Array.isArray(line.type)) for (let l of line.type) {
|
|
11691
|
-
if (l.to > pos || l.to == pos && (l.to == line.to || l.type == BlockType.Text)) return l;
|
|
11692
|
-
}
|
|
11693
|
-
return line;
|
|
11694
|
-
}
|
|
11695
11865
|
function rectanglesForRange(view, className, range) {
|
|
11696
11866
|
if (range.to <= view.viewport.from || range.from >= view.viewport.to) return [];
|
|
11697
11867
|
let from = Math.max(range.from, view.viewport.from),
|
|
@@ -11708,21 +11878,19 @@ function rectanglesForRange(view, className, range) {
|
|
|
11708
11878
|
endBlock = blockAt(view, to);
|
|
11709
11879
|
let visualStart = startBlock.type == BlockType.Text ? startBlock : null;
|
|
11710
11880
|
let visualEnd = endBlock.type == BlockType.Text ? endBlock : null;
|
|
11711
|
-
if (view.lineWrapping)
|
|
11712
|
-
|
|
11713
|
-
if (visualEnd) visualEnd = wrappedLine(view, to, visualEnd);
|
|
11714
|
-
}
|
|
11881
|
+
if (visualStart && (view.lineWrapping || startBlock.widgetLineBreaks)) visualStart = wrappedLine(view, from, visualStart);
|
|
11882
|
+
if (visualEnd && (view.lineWrapping || endBlock.widgetLineBreaks)) visualEnd = wrappedLine(view, to, visualEnd);
|
|
11715
11883
|
if (visualStart && visualEnd && visualStart.from == visualEnd.from) {
|
|
11716
11884
|
return pieces(drawForLine(range.from, range.to, visualStart));
|
|
11717
11885
|
} else {
|
|
11718
11886
|
let top = visualStart ? drawForLine(range.from, null, visualStart) : drawForWidget(startBlock, false);
|
|
11719
11887
|
let bottom = visualEnd ? drawForLine(null, range.to, visualEnd) : drawForWidget(endBlock, true);
|
|
11720
11888
|
let between = [];
|
|
11721
|
-
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;
|
|
11722
11890
|
return pieces(top).concat(between).concat(pieces(bottom));
|
|
11723
11891
|
}
|
|
11724
11892
|
function piece(left, top, right, bottom) {
|
|
11725
|
-
return new RectangleMarker(className, left - base.left, top - base.top - 0.01 /*
|
|
11893
|
+
return new RectangleMarker(className, left - base.left, top - base.top - 0.01 /* Epsilon */, right - left, bottom - top + 0.01 /* Epsilon */);
|
|
11726
11894
|
}
|
|
11727
11895
|
|
|
11728
11896
|
function pieces(_ref6) {
|
|
@@ -12682,12 +12850,12 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class {
|
|
|
12682
12850
|
continue;
|
|
12683
12851
|
}
|
|
12684
12852
|
let arrow = tooltip.arrow ? tView.dom.querySelector(".cm-tooltip-arrow") : null;
|
|
12685
|
-
let arrowHeight = arrow ? 7 /*
|
|
12853
|
+
let arrowHeight = arrow ? 7 /* Size */ : 0;
|
|
12686
12854
|
let width = size.right - size.left,
|
|
12687
12855
|
height = (_a = knownHeight.get(tView)) !== null && _a !== void 0 ? _a : size.bottom - size.top;
|
|
12688
12856
|
let offset = tView.offset || noOffset,
|
|
12689
12857
|
ltr = this.view.textDirection == Direction.LTR;
|
|
12690
|
-
let left = size.width > space.right - space.left ? ltr ? space.left : space.right - size.width : ltr ? Math.min(pos.left - (arrow ? 14 /*
|
|
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);
|
|
12691
12859
|
let above = !!tooltip.above;
|
|
12692
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;
|
|
12693
12861
|
let spaceVert = (above ? pos.top - space.top : space.bottom - pos.bottom) - arrowHeight;
|
|
@@ -12711,7 +12879,7 @@ const tooltipPlugin = /*@__PURE__*/ViewPlugin.fromClass(class {
|
|
|
12711
12879
|
dom.style.top = top + "px";
|
|
12712
12880
|
dom.style.left = left + "px";
|
|
12713
12881
|
}
|
|
12714
|
-
if (arrow) arrow.style.left = `${pos.left + (ltr ? offset.x : -offset.x) - (left + 14 /*
|
|
12882
|
+
if (arrow) arrow.style.left = `${pos.left + (ltr ? offset.x : -offset.x) - (left + 14 /* Offset */ - 7 /* Size */)}px`;
|
|
12715
12883
|
if (tView.overlap !== true) others.push({
|
|
12716
12884
|
left,
|
|
12717
12885
|
top,
|
|
@@ -12756,8 +12924,8 @@ const baseTheme$2 = /*@__PURE__*/EditorView.baseTheme({
|
|
|
12756
12924
|
color: "white"
|
|
12757
12925
|
},
|
|
12758
12926
|
".cm-tooltip-arrow": {
|
|
12759
|
-
height: `${7 /*
|
|
12760
|
-
width: `${7 /*
|
|
12927
|
+
height: `${7 /* Size */}px`,
|
|
12928
|
+
width: `${7 /* Size */ * 2}px`,
|
|
12761
12929
|
position: "absolute",
|
|
12762
12930
|
zIndex: -1,
|
|
12763
12931
|
overflow: "hidden",
|
|
@@ -12766,26 +12934,26 @@ const baseTheme$2 = /*@__PURE__*/EditorView.baseTheme({
|
|
|
12766
12934
|
position: "absolute",
|
|
12767
12935
|
width: 0,
|
|
12768
12936
|
height: 0,
|
|
12769
|
-
borderLeft: `${7 /*
|
|
12770
|
-
borderRight: `${7 /*
|
|
12937
|
+
borderLeft: `${7 /* Size */}px solid transparent`,
|
|
12938
|
+
borderRight: `${7 /* Size */}px solid transparent`
|
|
12771
12939
|
},
|
|
12772
12940
|
".cm-tooltip-above &": {
|
|
12773
|
-
bottom: `-${7 /*
|
|
12941
|
+
bottom: `-${7 /* Size */}px`,
|
|
12774
12942
|
"&:before": {
|
|
12775
|
-
borderTop: `${7 /*
|
|
12943
|
+
borderTop: `${7 /* Size */}px solid #bbb`
|
|
12776
12944
|
},
|
|
12777
12945
|
"&:after": {
|
|
12778
|
-
borderTop: `${7 /*
|
|
12946
|
+
borderTop: `${7 /* Size */}px solid #f5f5f5`,
|
|
12779
12947
|
bottom: "1px"
|
|
12780
12948
|
}
|
|
12781
12949
|
},
|
|
12782
12950
|
".cm-tooltip-below &": {
|
|
12783
|
-
top: `-${7 /*
|
|
12951
|
+
top: `-${7 /* Size */}px`,
|
|
12784
12952
|
"&:before": {
|
|
12785
|
-
borderBottom: `${7 /*
|
|
12953
|
+
borderBottom: `${7 /* Size */}px solid #bbb`
|
|
12786
12954
|
},
|
|
12787
12955
|
"&:after": {
|
|
12788
|
-
borderBottom: `${7 /*
|
|
12956
|
+
borderBottom: `${7 /* Size */}px solid #f5f5f5`,
|
|
12789
12957
|
top: "1px"
|
|
12790
12958
|
}
|
|
12791
12959
|
}
|
|
@@ -12813,10 +12981,6 @@ const showTooltip = /*@__PURE__*/Facet.define({
|
|
|
12813
12981
|
});
|
|
12814
12982
|
const showHoverTooltip = /*@__PURE__*/Facet.define();
|
|
12815
12983
|
class HoverTooltipHost {
|
|
12816
|
-
// Needs to be static so that host tooltip instances always match
|
|
12817
|
-
static create(view) {
|
|
12818
|
-
return new HoverTooltipHost(view);
|
|
12819
|
-
}
|
|
12820
12984
|
constructor(view) {
|
|
12821
12985
|
this.view = view;
|
|
12822
12986
|
this.mounted = false;
|
|
@@ -12824,6 +12988,10 @@ class HoverTooltipHost {
|
|
|
12824
12988
|
this.dom.classList.add("cm-tooltip-hover");
|
|
12825
12989
|
this.manager = new TooltipViewManager(view, showHoverTooltip, t => this.createHostedView(t));
|
|
12826
12990
|
}
|
|
12991
|
+
// Needs to be static so that host tooltip instances always match
|
|
12992
|
+
static create(view) {
|
|
12993
|
+
return new HoverTooltipHost(view);
|
|
12994
|
+
}
|
|
12827
12995
|
createHostedView(tooltip) {
|
|
12828
12996
|
let hostedView = tooltip.create(this.view);
|
|
12829
12997
|
hostedView.dom.classList.add("cm-tooltip-section");
|
|
@@ -12942,7 +13110,7 @@ class HoverPlugin {
|
|
|
12942
13110
|
pos
|
|
12943
13111
|
} = tooltip || this.pending,
|
|
12944
13112
|
end = (_a = tooltip === null || tooltip === void 0 ? void 0 : tooltip.end) !== null && _a !== void 0 ? _a : pos;
|
|
12945
|
-
if (pos == end ? this.view.posAtCoords(this.lastMove) != pos : !isOverRange(this.view, pos, end, event.clientX, event.clientY, 6 /*
|
|
13113
|
+
if (pos == end ? this.view.posAtCoords(this.lastMove) != pos : !isOverRange(this.view, pos, end, event.clientX, event.clientY, 6 /* MaxDist */)) {
|
|
12946
13114
|
this.view.dispatch({
|
|
12947
13115
|
effects: this.setHover.of(null)
|
|
12948
13116
|
});
|
|
@@ -13020,7 +13188,7 @@ function hoverTooltip(source) {
|
|
|
13020
13188
|
},
|
|
13021
13189
|
provide: f => showHoverTooltip.from(f)
|
|
13022
13190
|
});
|
|
13023
|
-
return [hoverState, ViewPlugin.define(view => new HoverPlugin(view, source, hoverState, setHover, options.hoverTime || 300 /*
|
|
13191
|
+
return [hoverState, ViewPlugin.define(view => new HoverPlugin(view, source, hoverState, setHover, options.hoverTime || 300 /* Time */)), showHoverTooltipHost];
|
|
13024
13192
|
}
|
|
13025
13193
|
/**
|
|
13026
13194
|
Get the active tooltip view for a given tooltip, if available.
|
|
@@ -18423,4 +18591,4 @@ function createTokenType(extra, tagStr) {
|
|
|
18423
18591
|
return type.id;
|
|
18424
18592
|
}
|
|
18425
18593
|
|
|
18426
|
-
export {
|
|
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 };
|