@onereach/ui-components 4.7.0-beta.2811.0 → 4.8.0-beta.2836.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-22e630c1.js → v2/_baseAssignValue-008b033a.js} +1 -1
- package/dist/bundled/v2/{_baseIsEqual-a1cc156c.js → _baseIsEqual-9edac039.js} +5 -5
- package/dist/bundled/v2/_commonjsHelpers-6584e42b.js +11 -0
- package/dist/bundled/v2/components/OrAvatar/OrAvatar.js +6 -5
- package/dist/bundled/v2/components/OrAvatar/index.js +6 -5
- package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
- package/dist/bundled/v2/components/OrBottomSheetV3/index.js +2 -2
- package/dist/bundled/v2/components/OrButtonV2/OrButton.js +6 -5
- package/dist/bundled/v2/components/OrButtonV2/index.js +6 -5
- package/dist/bundled/v2/components/OrButtonV3/OrButton.js +2 -2
- package/dist/bundled/v2/components/OrButtonV3/index.js +2 -2
- package/dist/bundled/v2/components/OrCardCollection/OrCardCollection.js +7 -6
- package/dist/bundled/v2/components/OrCardCollection/index.js +7 -6
- package/dist/bundled/v2/components/OrCardCollectionV3/OrCardCollection.js +2 -2
- package/dist/bundled/v2/components/OrCardCollectionV3/index.js +2 -2
- package/dist/bundled/v2/components/OrCarousel/OrCarousel.js +6 -5
- package/dist/bundled/v2/components/OrCarousel/index.js +6 -5
- package/dist/bundled/v2/components/OrCheckbox/OrCheckbox.js +6 -5
- package/dist/bundled/v2/components/OrCheckbox/index.js +6 -5
- package/dist/bundled/v2/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
- package/dist/bundled/v2/components/OrCheckboxGroupV3/index.js +2 -2
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
- package/dist/bundled/v2/components/OrCheckboxTreeV3/index.js +2 -2
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +2 -2
- package/dist/bundled/v2/components/OrCheckboxV3/index.js +2 -2
- package/dist/bundled/v2/components/OrChip/OrChip.js +6 -5
- package/dist/bundled/v2/components/OrChip/index.js +6 -5
- package/dist/bundled/v2/components/OrChips/OrChips.js +6 -5
- package/dist/bundled/v2/components/OrChips/index.js +6 -5
- package/dist/bundled/v2/components/OrCode/OrCode.js +14 -3799
- package/dist/bundled/v2/components/OrCode/index.js +14 -9
- package/dist/bundled/v2/components/OrCode/lang.js +3941 -3
- package/dist/bundled/v2/components/OrCode/theme.js +2 -1
- package/dist/bundled/v2/components/OrCollapse/OrCollapse.js +6 -5
- package/dist/bundled/v2/components/OrCollapse/index.js +6 -5
- package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +8 -7
- package/dist/bundled/v2/components/OrColorPicker/index.js +8 -7
- package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +10 -8
- package/dist/bundled/v2/components/OrConfirm/index.js +10 -8
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +3 -3
- package/dist/bundled/v2/components/OrConfirmV3/index.js +3 -3
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +4 -4
- package/dist/bundled/v2/components/OrDatePickerV3/index.js +4 -4
- package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +10 -9
- package/dist/bundled/v2/components/OrDateTimePicker/index.js +10 -9
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +5 -5
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +5 -5
- package/dist/bundled/v2/components/OrFloating/OrFloating.js +6 -5
- package/dist/bundled/v2/components/OrFloating/index.js +6 -5
- package/dist/bundled/v2/components/OrIcon/OrIcon.js +6 -5
- package/dist/bundled/v2/components/OrIcon/index.js +6 -5
- package/dist/bundled/v2/components/OrIconButtonV2/OrIconButton.js +6 -5
- package/dist/bundled/v2/components/OrIconButtonV2/index.js +6 -5
- package/dist/bundled/v2/components/OrIconButtonV3/OrIconButton.js +2 -2
- package/dist/bundled/v2/components/OrIconButtonV3/index.js +2 -2
- package/dist/bundled/v2/components/OrInlineInputV3/OrInlineInput.js +2 -2
- package/dist/bundled/v2/components/OrInlineInputV3/index.js +2 -2
- package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +8 -7
- package/dist/bundled/v2/components/OrInlineTextEdit/index.js +8 -7
- package/dist/bundled/v2/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
- package/dist/bundled/v2/components/OrInlineTextareaV3/index.js +2 -2
- package/dist/bundled/v2/components/OrInput/OrInput.js +6 -5
- package/dist/bundled/v2/components/OrInput/index.js +6 -5
- package/dist/bundled/v2/components/OrInputV3/OrInput.js +2 -2
- package/dist/bundled/v2/components/OrInputV3/index.js +2 -2
- package/dist/bundled/v2/components/OrList/OrList.js +10 -9
- package/dist/bundled/v2/components/OrList/index.js +10 -9
- package/dist/bundled/v2/components/OrListOfInputs/OrListOfInputs.js +10 -9
- package/dist/bundled/v2/components/OrListOfInputs/index.js +10 -9
- package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +2 -2
- package/dist/bundled/v2/components/OrLoaderV3/index.js +2 -2
- package/dist/bundled/v2/components/OrMenuV3/OrMenu.js +2 -2
- package/dist/bundled/v2/components/OrMenuV3/index.js +2 -2
- package/dist/bundled/v2/components/OrModal/OrModal.js +10 -1352
- package/dist/bundled/v2/components/OrModal/index.js +9 -7
- package/dist/bundled/v2/components/OrModalV3/OrModal.js +4 -4
- package/dist/bundled/v2/components/OrModalV3/index.js +2 -2
- package/dist/bundled/v2/components/OrNotification/OrNotification.js +6 -5
- package/dist/bundled/v2/components/OrNotification/index.js +6 -5
- package/dist/bundled/v2/components/OrNotificationV3/OrNotification.js +2 -2
- package/dist/bundled/v2/components/OrNotificationV3/index.js +2 -2
- package/dist/bundled/v2/components/OrNumberInput/OrNumberInput.js +6 -5
- package/dist/bundled/v2/components/OrNumberInput/index.js +6 -5
- package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +8 -7
- package/dist/bundled/v2/components/OrOverflowMenu/index.js +8 -7
- package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +2 -2
- package/dist/bundled/v2/components/OrOverlayV3/index.js +2 -2
- package/dist/bundled/v2/components/OrPaginationV3/OrPagination.js +2 -2
- package/dist/bundled/v2/components/OrPaginationV3/index.js +2 -2
- package/dist/bundled/v2/components/OrPassword/OrPassword.js +8 -7
- package/dist/bundled/v2/components/OrPassword/index.js +8 -7
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +2 -2
- package/dist/bundled/v2/components/OrPopoverV3/index.js +2 -2
- package/dist/bundled/v2/components/OrProgress/OrProgress.js +6 -5
- package/dist/bundled/v2/components/OrProgress/index.js +6 -5
- package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +8 -7
- package/dist/bundled/v2/components/OrProgressV3/index.js +8 -7
- package/dist/bundled/v2/components/OrRadio/OrRadio.js +8 -7
- package/dist/bundled/v2/components/OrRadio/index.js +8 -7
- package/dist/bundled/v2/components/OrRadioGroupV3/OrRadioGroup.js +2 -2
- package/dist/bundled/v2/components/OrRadioGroupV3/index.js +2 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +2201 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +220 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +73 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +4 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/props.js +7 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +6 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +38 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +46 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +184 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +5 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +6 -0
- package/dist/bundled/v2/components/OrSearch/OrSearch.js +7 -6
- package/dist/bundled/v2/components/OrSearch/index.js +7 -6
- package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +2 -2
- package/dist/bundled/v2/components/OrSearchV3/index.js +2 -2
- package/dist/bundled/v2/components/OrSelect/OrSelect.js +11 -10
- package/dist/bundled/v2/components/OrSelect/index.js +11 -10
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +2 -2
- package/dist/bundled/v2/components/OrSelectV3/index.js +2 -2
- package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +2 -2
- package/dist/bundled/v2/components/OrSidebar/index.js +2 -2
- package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +2 -2
- package/dist/bundled/v2/components/OrSidebarV3/index.js +2 -2
- package/dist/bundled/v2/components/OrSkeleton/index.js +6 -5
- package/dist/bundled/v2/components/OrSkeletonText/OrSkeletonText.js +6 -5
- package/dist/bundled/v2/components/OrSkeletonText/index.js +6 -5
- package/dist/bundled/v2/components/OrSkeletonTextV3/OrSkeletonText.js +6 -5
- package/dist/bundled/v2/components/OrSkeletonTextV3/index.js +6 -5
- package/dist/bundled/v2/components/OrSkeletonV3/index.js +6 -5
- package/dist/bundled/v2/components/OrSlider/OrSlider.js +8 -7
- package/dist/bundled/v2/components/OrSlider/index.js +8 -7
- package/dist/bundled/v2/components/OrStepper/OrStepper.js +6 -5
- package/dist/bundled/v2/components/OrStepper/index.js +6 -5
- package/dist/bundled/v2/components/OrSwitchV3/OrSwitch.js +2 -2
- package/dist/bundled/v2/components/OrSwitchV3/index.js +2 -2
- package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +2 -2
- package/dist/bundled/v2/components/OrTabsV3/index.js +2 -2
- package/dist/bundled/v2/components/OrTag/OrTag.js +6 -5
- package/dist/bundled/v2/components/OrTag/index.js +6 -5
- package/dist/bundled/v2/components/OrTagV3/OrTag.js +2 -2
- package/dist/bundled/v2/components/OrTagV3/index.js +2 -2
- package/dist/bundled/v2/components/OrTagsV3/OrTags.js +2 -2
- package/dist/bundled/v2/components/OrTagsV3/index.js +2 -2
- package/dist/bundled/v2/components/OrTextarea/OrTextarea.js +6 -5
- package/dist/bundled/v2/components/OrTextarea/index.js +6 -5
- package/dist/bundled/v2/components/OrTextbox/OrTextbox.js +6 -5
- package/dist/bundled/v2/components/OrTextbox/index.js +6 -5
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +4 -4
- package/dist/bundled/v2/components/OrTimePickerV3/index.js +4 -4
- package/dist/bundled/v2/components/OrToast/OrToast.js +9 -8
- package/dist/bundled/v2/components/OrToast/Timer.js +1 -1
- package/dist/bundled/v2/components/OrToast/composable/index.js +2 -2
- package/dist/bundled/v2/components/OrToast/composable/useToast.js +2 -2
- package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v2/components/OrToast/index.js +11 -10
- package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +11 -10
- package/dist/bundled/v2/components/OrToastContainer/index.js +11 -10
- package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +2 -2
- package/dist/bundled/v2/components/OrToastContainerV3/index.js +2 -2
- package/dist/bundled/v2/components/OrToastV3/OrToast.js +2 -2
- package/dist/bundled/v2/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v2/components/OrToastV3/composable/index.js +2 -2
- package/dist/bundled/v2/components/OrToastV3/composable/useToast.js +2 -2
- package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v2/components/OrToastV3/index.js +2 -2
- package/dist/bundled/v2/components/OrTooltip/OrTooltip.js +6 -5
- package/dist/bundled/v2/components/OrTooltip/index.js +6 -5
- package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.js +2 -2
- package/dist/bundled/v2/components/OrTooltipV3/index.js +2 -2
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +36 -21
- package/dist/bundled/{v3/dom-700444b4.js → v2/dom-c98dce89.js} +2 -2
- package/dist/bundled/v2/{eq-95cd2573.js → eq-037e6fce.js} +1 -1
- package/dist/bundled/{v3/get-ab1b7d93.js → v2/get-b30afe93.js} +3 -3
- package/dist/bundled/v2/hooks/index.d.ts +1 -0
- package/dist/bundled/v2/hooks/index.js +6 -2
- package/dist/bundled/v2/hooks/useOverflow.d.ts +2 -2
- package/dist/bundled/v2/hooks/useOverflow.js +2 -2
- package/dist/bundled/v2/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v2/hooks/useResponsive/index.js +2 -2
- package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +2 -2
- package/dist/bundled/v2/hooks/useTheme.d.ts +2 -0
- package/dist/bundled/v2/hooks/useTheme.js +10125 -0
- package/dist/bundled/v2/{index-8a1b5b9c.js → index-06f6bbe4.js} +1 -1
- package/dist/bundled/v2/{index-cf2c3c27.js → index-0d224ae5.js} +3 -115
- package/dist/bundled/v2/index-80a3a4f4.js +9714 -0
- package/dist/bundled/v2/index-85c2efe8.js +7122 -0
- package/dist/bundled/v2/{index-6d94f832.js → index-af414338.js} +2 -2
- package/dist/bundled/{v3/OrCode.vue_vue_type_script_lang-7af61a76.js → v2/index-d92d0b48.js} +14 -235
- package/dist/bundled/v2/{index-82718479.js → index-dac0fb7c.js} +1 -1
- package/dist/bundled/v2/{lang-0fb8f78b.js → index-e9f6b2d8.js} +73 -4009
- package/dist/bundled/v2/index.es-3f39f316.js +115 -0
- package/dist/bundled/v2/index.js +42 -24
- package/dist/bundled/v2/{isArrayLike-e46b8eac.js → isArrayLike-61275a05.js} +1 -1
- package/dist/bundled/v2/{isEqual-44382965.js → isEqual-8bbb1110.js} +1 -1
- package/dist/bundled/{v3/isObject-fe8b81fd.js → v2/isObject-08fab135.js} +1 -1
- package/dist/bundled/v2/markdown-c78b4891.js +17977 -0
- package/dist/bundled/{v3/range-6f26eda4.js → v2/range-637f1361.js} +4 -4
- package/dist/bundled/{v3/round-f34440f4.js → v2/round-4a894f03.js} +4 -4
- package/dist/bundled/{v3/toFinite-74227610.js → v2/toFinite-675db18a.js} +1 -1
- package/dist/bundled/v2/{toInteger-2fd112a9.js → toInteger-27595771.js} +1 -1
- package/dist/bundled/{v3/toString-f3196832.js → v2/toString-a72d5149.js} +1 -1
- package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-6e26795e.js → v2/useFocusTrap-c1384da1.js} +4 -100
- package/dist/bundled/v2/utils/functions/dom.js +6 -5
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-2a494943.js → OrAvatar.vue_vue_type_script_lang-36439ec1.js} +1 -1
- package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-2f9406a6.js → OrBottomSheet.vue_vue_type_script_lang-a4e73f9e.js} +2 -2
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-af5ff967.js → OrButton.vue_vue_type_script_lang-d31ada75.js} +1 -1
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-5ae410e5.js → OrButton.vue_vue_type_script_lang-fc3b3109.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-86c25f0f.js → OrCardCollection.vue_vue_type_script_lang-0b7357dc.js} +3 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-decf25ee.js → OrCardCollection.vue_vue_type_script_lang-d1cba987.js} +4 -4
- package/dist/bundled/v3/{OrCarousel.vue_vue_type_script_lang-272cb9c9.js → OrCarousel.vue_vue_type_script_lang-cfd11d11.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-a6d72885.js → OrCheckbox.vue_vue_type_script_lang-0fcd7886.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-b1dd62bd.js → OrCheckbox.vue_vue_type_script_lang-579d41cf.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-b4421b8d.js → OrCheckboxGroup.vue_vue_type_script_lang-bf90c3cc.js} +2 -2
- package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-c7beacdf.js → OrCheckboxTree.vue_vue_type_script_lang-96fce5bf.js} +4 -4
- package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-a182e324.js → OrChip.vue_vue_type_script_lang-fcda103b.js} +1 -1
- package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-9e98c258.js → OrChips.vue_vue_type_script_lang-8d26707d.js} +1 -1
- package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-22d2a803.js +237 -0
- package/dist/bundled/v3/{OrCollapse.vue_vue_type_script_lang-2a5c0929.js → OrCollapse.vue_vue_type_script_lang-00da895c.js} +1 -1
- package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-6143f82f.js → OrColorPicker.vue_vue_type_script_lang-476f49f1.js} +3 -3
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-ac591c04.js → OrConfirm.vue_vue_type_script_lang-39a1bd4d.js} +6 -6
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-cdd89236.js → OrConfirm.vue_vue_type_script_lang-b7cc200c.js} +6 -6
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-b9052966.js → OrDatePicker.vue_vue_type_script_lang-83dd873c.js} +4 -4
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-111a251e.js → OrDateTimePicker.vue_vue_type_script_lang-77880140.js} +7 -7
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-741b8048.js → OrDateTimePicker.vue_vue_type_script_lang-77e069a1.js} +5 -5
- package/dist/bundled/v3/{OrDateTimePickerMonthSelect-6c5e416a.js → OrDateTimePickerMonthSelect-3348fba1.js} +3 -3
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-894382f9.js → OrDateTimePickerPopoverHeader-cbe4de91.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePickerTimeSelect-b04942c5.js → OrDateTimePickerTimeSelect-c2ad08b5.js} +1 -1
- package/dist/bundled/v3/{OrFloating.vue_vue_type_script_lang-d419627c.js → OrFloating.vue_vue_type_script_lang-8bc114e8.js} +1 -1
- package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-cd2da378.js → OrIcon.vue_vue_type_script_lang-52900ff4.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-d1496a81.js → OrIconButton.vue_vue_type_script_lang-416cbbd3.js} +2 -2
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-743eb1eb.js → OrIconButton.vue_vue_type_script_lang-a32f0635.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-2df002e8.js → OrInlineInput.vue_vue_type_script_lang-d34f84b1.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-1e78da3c.js → OrInlineTextEdit.vue_vue_type_script_lang-7955bdac.js} +4 -4
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-139602f1.js → OrInlineTextarea.vue_vue_type_script_lang-2f0d13e0.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-30a2b358.js → OrInput.vue_vue_type_script_lang-2680e4e1.js} +2 -2
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-bf9fa981.js → OrInput.vue_vue_type_script_lang-f887102b.js} +2 -2
- package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-ccab1c75.js → OrList.vue_vue_type_script_lang-cb8806b2.js} +11 -11
- package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-32d935ae.js → OrListOfInputs.vue_vue_type_script_lang-14a99046.js} +4 -4
- package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-c1b5372a.js → OrLoader.vue_vue_type_script_lang-1e4c32ee.js} +1 -1
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-90d57815.js → OrMenu.vue_vue_type_script_lang-2958c018.js} +1 -1
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-910b80a1.js → OrModal.vue_vue_type_script_lang-a84affbb.js} +2 -2
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-b716f9f7.js +101 -0
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-3f6dd187.js → OrNotification.vue_vue_type_script_lang-564035a6.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-f414a938.js → OrNotification.vue_vue_type_script_lang-6d6d3de9.js} +1 -1
- package/dist/bundled/v3/{OrNumberInput.vue_vue_type_script_lang-1fb535e6.js → OrNumberInput.vue_vue_type_script_lang-e904d247.js} +1 -1
- package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-fb64f2d0.js → OrOverflowMenu.vue_vue_type_script_lang-396e26c0.js} +5 -5
- package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-93864f05.js → OrOverlay.vue_vue_type_script_lang-4a4c532b.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-4d9cc1c9.js → OrPagination.vue_vue_type_script_lang-d29f6b11.js} +2 -2
- package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-d8bfee83.js → OrPassword.vue_vue_type_script_lang-ea54f428.js} +3 -3
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-dca9481d.js → OrPopover.vue_vue_type_script_lang-00135a32.js} +2 -2
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-1c15f38e.js → OrProgress.vue_vue_type_script_lang-9c13f877.js} +2 -2
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-a99362ae.js → OrProgress.vue_vue_type_script_lang-d4cf52da.js} +1 -1
- package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-3a551734.js → OrRadio.vue_vue_type_script_lang-5e642c5f.js} +2 -2
- package/dist/bundled/v3/{OrRadioGroup.vue_vue_type_script_lang-5734ced2.js → OrRadioGroup.vue_vue_type_script_lang-4b4d1420.js} +1 -1
- package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-9bbcc18a.js +1889 -0
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ba26f3af.js → OrSearch.vue_vue_type_script_lang-14e7fd28.js} +2 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-82b7b602.js → OrSearch.vue_vue_type_script_lang-3e7729fe.js} +3 -3
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-a156c8b5.js → OrSelect.vue_vue_type_script_lang-19dc9748.js} +4 -4
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-c9547f1b.js → OrSelect.vue_vue_type_script_lang-5bdf06cb.js} +11 -11
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-55b5ffb4.js → OrSidebar.vue_vue_type_script_lang-2681fb99.js} +1 -1
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-3914fce0.js → OrSidebar.vue_vue_type_script_lang-c96d5866.js} +2 -2
- package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-c2a5ab96.js → OrSkeletonText.vue_vue_type_script_lang-36cfe2f4.js} +1 -1
- package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-26b3cfd1.js → OrSkeletonText.vue_vue_type_script_lang-5cf21df0.js} +1 -1
- package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-22cc5cd5.js → OrSlider.vue_vue_type_script_lang-d933ca0c.js} +3 -3
- package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-67408a1a.js → OrStepper.vue_vue_type_script_lang-d4259c67.js} +1 -1
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-32427513.js → OrSwitch.vue_vue_type_script_lang-cde58199.js} +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-4c2cecd7.js → OrTabs.vue_vue_type_script_lang-d4356af4.js} +2 -2
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-ce916e72.js → OrTag.vue_vue_type_script_lang-21f4b080.js} +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-cbb4a16d.js → OrTag.vue_vue_type_script_lang-2e2393a5.js} +1 -1
- package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-1f1278ce.js → OrTags.vue_vue_type_script_lang-dea58dbe.js} +3 -3
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-1ab55f91.js → OrTextarea.vue_vue_type_script_lang-1585e4e5.js} +2 -2
- package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-1ec469f0.js → OrTextbox.vue_vue_type_script_lang-02b1c369.js} +3 -3
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-a03960c6.js → OrTimePicker.vue_vue_type_script_lang-77e08a6d.js} +4 -4
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-592e1632.js → OrToastContainer.vue_vue_type_script_lang-364ee300.js} +1 -1
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-9f5a5d56.js → OrToastContainer.vue_vue_type_script_lang-b1bb24ab.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-a06d73f0.js → OrTooltip.vue_vue_type_script_lang-05d89296.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-44e9f7e4.js → OrTooltip.vue_vue_type_script_lang-50478e4b.js} +1 -1
- package/dist/bundled/{v2/_baseAssignValue-22e630c1.js → v3/_baseAssignValue-008b033a.js} +1 -1
- package/dist/bundled/v3/{_baseIsEqual-a1cc156c.js → _baseIsEqual-9edac039.js} +5 -5
- package/dist/bundled/v3/_commonjsHelpers-6584e42b.js +11 -0
- package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +10 -9
- package/dist/bundled/v3/components/OrAvatar/index.js +9 -8
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +5 -5
- package/dist/bundled/v3/components/OrBottomSheetV3/index.js +4 -4
- package/dist/bundled/v3/components/OrButtonV2/OrButton.js +10 -9
- package/dist/bundled/v3/components/OrButtonV2/index.js +11 -10
- package/dist/bundled/v3/components/OrButtonV3/OrButton.js +5 -5
- package/dist/bundled/v3/components/OrButtonV3/index.js +4 -4
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +16 -15
- package/dist/bundled/v3/components/OrCardCollection/index.js +15 -14
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +14 -14
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +13 -13
- package/dist/bundled/v3/components/OrCarousel/OrCarousel.js +10 -9
- package/dist/bundled/v3/components/OrCarousel/index.js +9 -8
- package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +10 -9
- package/dist/bundled/v3/components/OrCheckbox/index.js +9 -8
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +8 -8
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +7 -7
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +7 -7
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +6 -6
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +4 -4
- package/dist/bundled/v3/components/OrCheckboxV3/index.js +3 -3
- package/dist/bundled/v3/components/OrChip/OrChip.js +10 -9
- package/dist/bundled/v3/components/OrChip/index.js +9 -8
- package/dist/bundled/v3/components/OrChips/OrChips.js +11 -10
- package/dist/bundled/v3/components/OrChips/index.js +10 -9
- package/dist/bundled/v3/components/OrCode/OrCode.js +22 -17
- package/dist/bundled/v3/components/OrCode/index.js +20 -15
- package/dist/bundled/v3/components/OrCode/lang.js +3941 -3
- package/dist/bundled/v3/components/OrCode/theme.js +2 -1
- package/dist/bundled/v3/components/OrCollapse/OrCollapse.js +8 -7
- package/dist/bundled/v3/components/OrCollapse/index.js +7 -6
- package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +11 -10
- package/dist/bundled/v3/components/OrColorPicker/index.js +10 -9
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +20 -18
- package/dist/bundled/v3/components/OrConfirm/index.js +19 -17
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +13 -13
- package/dist/bundled/v3/components/OrConfirmV3/index.js +12 -12
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +14 -14
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +13 -13
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +17 -16
- package/dist/bundled/v3/components/OrDateTimePicker/index.js +16 -15
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +15 -15
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +14 -14
- package/dist/bundled/v3/components/OrFloating/OrFloating.js +8 -7
- package/dist/bundled/v3/components/OrFloating/index.js +7 -6
- package/dist/bundled/v3/components/OrIcon/OrIcon.js +9 -8
- package/dist/bundled/v3/components/OrIcon/index.js +8 -7
- package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +11 -10
- package/dist/bundled/v3/components/OrIconButtonV2/index.js +10 -9
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +8 -8
- package/dist/bundled/v3/components/OrIconButtonV3/index.js +7 -7
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.js +9 -9
- package/dist/bundled/v3/components/OrInlineInputV3/index.js +8 -8
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +15 -14
- package/dist/bundled/v3/components/OrInlineTextEdit/index.js +14 -13
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +9 -9
- package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +8 -8
- package/dist/bundled/v3/components/OrInput/OrInput.js +9 -8
- package/dist/bundled/v3/components/OrInput/index.js +8 -7
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +10 -10
- package/dist/bundled/v3/components/OrInputV3/index.js +9 -9
- package/dist/bundled/v3/components/OrList/OrList.js +17 -16
- package/dist/bundled/v3/components/OrList/index.js +16 -15
- package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +20 -19
- package/dist/bundled/v3/components/OrListOfInputs/index.js +19 -18
- package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +4 -4
- package/dist/bundled/v3/components/OrLoaderV3/index.js +3 -3
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +7 -7
- package/dist/bundled/v3/components/OrMenuV3/index.js +6 -6
- package/dist/bundled/v3/components/OrModal/OrModal.js +15 -13
- package/dist/bundled/v3/components/OrModal/index.js +14 -12
- package/dist/bundled/v3/components/OrModalV3/OrModal.js +9 -9
- package/dist/bundled/v3/components/OrModalV3/index.js +8 -8
- package/dist/bundled/v3/components/OrNotification/OrNotification.js +12 -11
- package/dist/bundled/v3/components/OrNotification/index.js +11 -10
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +9 -9
- package/dist/bundled/v3/components/OrNotificationV3/index.js +8 -8
- package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.js +10 -9
- package/dist/bundled/v3/components/OrNumberInput/index.js +9 -8
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +15 -14
- package/dist/bundled/v3/components/OrOverflowMenu/index.js +14 -13
- package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +4 -4
- package/dist/bundled/v3/components/OrOverlayV3/index.js +3 -3
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +10 -10
- package/dist/bundled/v3/components/OrPaginationV3/index.js +9 -9
- package/dist/bundled/v3/components/OrPassword/OrPassword.js +16 -15
- package/dist/bundled/v3/components/OrPassword/index.js +15 -14
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +6 -6
- package/dist/bundled/v3/components/OrPopoverV3/index.js +5 -5
- package/dist/bundled/v3/components/OrProgress/OrProgress.js +8 -7
- package/dist/bundled/v3/components/OrProgress/index.js +7 -6
- package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +10 -9
- package/dist/bundled/v3/components/OrProgressV3/index.js +9 -8
- package/dist/bundled/v3/components/OrRadio/OrRadio.js +10 -9
- package/dist/bundled/v3/components/OrRadio/index.js +9 -8
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +4 -4
- package/dist/bundled/v3/components/OrRadioGroupV3/index.js +3 -3
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +286 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +220 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +89 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +4 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +7 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +6 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +38 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +46 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +184 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +5 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +24 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +190 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.d.ts +19 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/types.js +1 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.d.ts +3 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +6 -0
- package/dist/bundled/v3/components/OrSearch/OrSearch.js +15 -14
- package/dist/bundled/v3/components/OrSearch/index.js +14 -13
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +11 -11
- package/dist/bundled/v3/components/OrSearchV3/index.js +10 -10
- package/dist/bundled/v3/components/OrSelect/OrSelect.js +17 -16
- package/dist/bundled/v3/components/OrSelect/index.js +16 -15
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +13 -13
- package/dist/bundled/v3/components/OrSelectV3/index.js +12 -12
- package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +4 -4
- package/dist/bundled/v3/components/OrSidebar/index.js +3 -3
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +9 -9
- package/dist/bundled/v3/components/OrSidebarV3/index.js +8 -8
- package/dist/bundled/v3/components/OrSkeleton/index.js +7 -6
- package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.js +8 -7
- package/dist/bundled/v3/components/OrSkeletonText/index.js +7 -6
- package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.js +8 -7
- package/dist/bundled/v3/components/OrSkeletonTextV3/index.js +7 -6
- package/dist/bundled/v3/components/OrSkeletonV3/index.js +7 -6
- package/dist/bundled/v3/components/OrSlider/OrSlider.js +12 -11
- package/dist/bundled/v3/components/OrSlider/index.js +11 -10
- package/dist/bundled/v3/components/OrStepper/OrStepper.js +11 -10
- package/dist/bundled/v3/components/OrStepper/index.js +10 -9
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +5 -5
- package/dist/bundled/v3/components/OrSwitchV3/index.js +4 -4
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.js +8 -8
- package/dist/bundled/v3/components/OrTabsV3/index.js +7 -7
- package/dist/bundled/v3/components/OrTag/OrTag.js +10 -9
- package/dist/bundled/v3/components/OrTag/index.js +9 -8
- package/dist/bundled/v3/components/OrTagV3/OrTag.js +9 -9
- package/dist/bundled/v3/components/OrTagV3/index.js +8 -8
- package/dist/bundled/v3/components/OrTagsV3/OrTags.js +12 -12
- package/dist/bundled/v3/components/OrTagsV3/index.js +11 -11
- package/dist/bundled/v3/components/OrTextarea/OrTextarea.js +9 -8
- package/dist/bundled/v3/components/OrTextarea/index.js +8 -7
- package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +13 -12
- package/dist/bundled/v3/components/OrTextbox/index.js +12 -11
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +13 -13
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +12 -12
- package/dist/bundled/v3/components/OrToast/OrToast.js +14 -13
- package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToast/composable/index.js +2 -2
- package/dist/bundled/v3/components/OrToast/composable/useToast.js +2 -2
- package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToast/index.js +17 -16
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +18 -17
- package/dist/bundled/v3/components/OrToastContainer/index.js +17 -16
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +10 -10
- package/dist/bundled/v3/components/OrToastContainerV3/index.js +9 -9
- package/dist/bundled/v3/components/OrToastV3/OrToast.js +8 -8
- package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/composable/index.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/composable/useToast.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/index.js +9 -9
- package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +9 -8
- package/dist/bundled/v3/components/OrTooltip/index.js +8 -7
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +7 -7
- package/dist/bundled/v3/components/OrTooltipV3/index.js +6 -6
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +107 -91
- package/dist/bundled/{v2/dom-700444b4.js → v3/dom-c98dce89.js} +2 -2
- package/dist/bundled/v3/{eq-95cd2573.js → eq-037e6fce.js} +1 -1
- package/dist/bundled/{v2/get-ab1b7d93.js → v3/get-b30afe93.js} +3 -3
- package/dist/bundled/v3/hooks/index.d.ts +1 -0
- package/dist/bundled/v3/hooks/index.js +6 -2
- package/dist/bundled/v3/hooks/useOverflow.d.ts +2 -2
- package/dist/bundled/v3/hooks/useOverflow.js +2 -2
- package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v3/hooks/useResponsive/index.js +2 -2
- package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +2 -2
- package/dist/bundled/v3/hooks/useTheme.d.ts +2 -0
- package/dist/bundled/v3/hooks/useTheme.js +10125 -0
- package/dist/bundled/v3/{index-cf2c3c27.js → index-0d224ae5.js} +3 -115
- package/dist/bundled/v3/{index-5e8e7a46.js → index-40b35d94.js} +1 -1
- package/dist/bundled/v3/{index-51eb57bd.js → index-749f3444.js} +1 -1
- package/dist/bundled/v3/index-80a3a4f4.js +9714 -0
- package/dist/bundled/v3/index-85c2efe8.js +7122 -0
- package/dist/bundled/v3/{index-02705c13.js → index-ae815a7e.js} +2 -2
- package/dist/bundled/v3/index-d92d0b48.js +3805 -0
- package/dist/bundled/v3/{lang-0fb8f78b.js → index-e9f6b2d8.js} +73 -4009
- package/dist/bundled/v3/index.es-3f39f316.js +115 -0
- package/dist/bundled/v3/index.js +113 -94
- package/dist/bundled/v3/{isArrayLike-e46b8eac.js → isArrayLike-61275a05.js} +1 -1
- package/dist/bundled/v3/{isEqual-44382965.js → isEqual-8bbb1110.js} +1 -1
- package/dist/bundled/{v2/isObject-fe8b81fd.js → v3/isObject-08fab135.js} +1 -1
- package/dist/bundled/v3/markdown-c78b4891.js +17977 -0
- package/dist/bundled/{v2/range-6f26eda4.js → v3/range-637f1361.js} +4 -4
- package/dist/bundled/{v2/round-f34440f4.js → v3/round-4a894f03.js} +4 -4
- package/dist/bundled/{v2/toFinite-74227610.js → v3/toFinite-675db18a.js} +1 -1
- package/dist/bundled/v3/{toInteger-2fd112a9.js → toInteger-27595771.js} +1 -1
- package/dist/bundled/{v2/toString-f3196832.js → v3/toString-a72d5149.js} +1 -1
- package/dist/bundled/v3/useFocusTrap-a61a80ac.js +1349 -0
- package/dist/bundled/v3/utils/functions/dom.js +6 -5
- package/dist/esm/v2/{OrBottomSheet-0592ccb2.js → OrBottomSheet-4244ab1c.js} +3 -1
- package/dist/esm/v2/{OrCardCollection-2b9bc050.js → OrCardCollection-20e66b6e.js} +4 -4
- package/dist/esm/v2/{OrCheckbox-3a8c93ad.js → OrCheckbox-41f2822d.js} +2 -0
- package/dist/esm/v2/{OrCheckboxGroup-b0d95dd6.js → OrCheckboxGroup-97cfcbda.js} +1 -1
- package/dist/esm/v2/{OrCheckboxTree-54b0fdc1.js → OrCheckboxTree-a7dc126c.js} +1 -1
- package/dist/esm/v2/{OrConfirm-3f19c23b.js → OrConfirm-65cc835a.js} +4 -2
- package/dist/esm/v2/{OrDatePicker-e991e7b2.js → OrDatePicker-9fb8810c.js} +3 -3
- package/dist/esm/v2/{OrDateTimePicker-7bbd81d1.js → OrDateTimePicker-4032b280.js} +3 -3
- package/dist/esm/v2/{OrDateTimePickerMonthSelect-d75a849c.js → OrDateTimePickerMonthSelect-a50f9f56.js} +3 -3
- package/dist/esm/v2/{OrIconButton-75972865.js → OrIconButton-24be052f.js} +2 -2
- package/dist/esm/v2/{OrInlineInput-cf17dbb2.js → OrInlineInput-dd95fc1b.js} +3 -1
- package/dist/esm/v2/{OrInlineTextarea-2b0e2f39.js → OrInlineTextarea-194515fa.js} +3 -1
- package/dist/esm/v2/{OrInput-1a2b8ad9.js → OrInput-bfbb6522.js} +3 -1
- package/dist/esm/v2/{OrMenu-a35caf3b.js → OrMenu-a376f4a7.js} +3 -1
- package/dist/esm/v2/{OrModal-4aaae6bc.js → OrModal-e6acc87a.js} +4 -2
- package/dist/esm/v2/{OrNotification-a773f1df.js → OrNotification-650aab04.js} +1 -1
- package/dist/esm/v2/{OrOverlay-f791976c.js → OrOverlay-948346df.js} +2 -0
- package/dist/esm/v2/{OrPagination-3513165d.js → OrPagination-7be2401b.js} +4 -2
- package/dist/esm/v2/{OrPassword-1de0dc6c.js → OrPassword-681f8c53.js} +2 -0
- package/dist/esm/v2/{OrPopover-a8950b85.js → OrPopover-fff4a3a4.js} +3 -1
- package/dist/esm/v2/{OrProgress-102e3b5d.js → OrProgress-e079e857.js} +2 -0
- package/dist/esm/v2/{OrRadio-a812088f.js → OrRadio-23810acd.js} +2 -0
- package/dist/esm/v2/{OrRadioGroup-0de37d76.js → OrRadioGroup-0e1bf22c.js} +1 -1
- package/dist/esm/v2/OrRichTextEditor-c13801ba.js +919 -0
- package/dist/esm/v2/{OrSearch-19c157b3.js → OrSearch-9027a8e2.js} +1 -1
- package/dist/esm/v2/{OrSelect-991b8be3.js → OrSelect-b7e9eaa7.js} +6 -4
- package/dist/esm/v2/{OrSidebar-bfbb8b0a.js → OrSidebar-466d8244.js} +1 -1
- package/dist/esm/v2/{OrSidebarCollapseButton-a98037d6.js → OrSidebarCollapseButton-3009ed8e.js} +1 -1
- package/dist/esm/v2/{OrSwitch-9fae0bae.js → OrSwitch-cb97f4d3.js} +2 -0
- package/dist/esm/v2/{OrTabs-abf290af.js → OrTabs-cce59ff2.js} +2 -2
- package/dist/esm/v2/{OrTag-aa46cecd.js → OrTag-6a60ef87.js} +1 -1
- package/dist/esm/v2/{OrTags-2a567e79.js → OrTags-e4d6bf08.js} +4 -2
- package/dist/esm/v2/{OrTextarea-e5c66426.js → OrTextarea-01df0715.js} +2 -0
- package/dist/esm/v2/{OrTextbox-c85d7fe6.js → OrTextbox-a937432f.js} +2 -0
- package/dist/esm/v2/{OrTimePicker-766637cb.js → OrTimePicker-7cbcc2c0.js} +2 -2
- package/dist/esm/v2/{OrTooltip-0dc63c1a.js → OrTooltip-ab6c05c5.js} +3 -1
- package/dist/esm/v2/codemirrorView-be2c7423.js +353 -0
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +62 -36
- package/dist/esm/v2/components/or-bottom-sheet-v3/index.js +4 -2
- package/dist/esm/v2/components/or-card-collection-v3/index.js +11 -9
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +5 -3
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +4 -2
- package/dist/esm/v2/components/or-checkbox-v3/index.js +3 -1
- package/dist/esm/v2/components/or-confirm-v3/index.js +9 -7
- package/dist/esm/v2/components/or-date-picker-v3/index.js +10 -8
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +10 -8
- package/dist/esm/v2/components/or-icon-button-v3/index.js +7 -5
- package/dist/esm/v2/components/or-inline-input-v3/index.js +8 -6
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +8 -6
- package/dist/esm/v2/components/or-input-v3/index.js +8 -6
- package/dist/esm/v2/components/or-menu-v3/index.js +6 -4
- package/dist/esm/v2/components/or-modal-v3/index.js +8 -6
- package/dist/esm/v2/components/or-notification-v3/index.js +8 -6
- package/dist/esm/v2/components/or-overlay-v3/index.js +3 -1
- package/dist/esm/v2/components/or-pagination-v3/index.js +7 -5
- package/dist/esm/v2/components/or-password/index.js +3 -1
- package/dist/esm/v2/components/or-popover-v3/index.js +5 -3
- package/dist/esm/v2/components/or-progress-v3/index.js +3 -1
- package/dist/esm/v2/components/or-radio-group-v3/index.js +4 -2
- package/dist/esm/v2/components/or-radio-v3/index.js +3 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +220 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +2 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +62 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +4 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +6 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +7 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
- package/dist/esm/v2/components/or-search-v3/index.js +9 -7
- package/dist/esm/v2/components/or-select-v3/index.js +11 -9
- package/dist/esm/v2/components/or-sidebar-v3/index.js +9 -7
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +8 -6
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +8 -6
- package/dist/esm/v2/components/or-switch-v3/index.js +3 -1
- package/dist/esm/v2/components/or-tabs-v3/index.js +7 -5
- package/dist/esm/v2/components/or-tag-v3/index.js +8 -6
- package/dist/esm/v2/components/or-tags-v3/index.js +9 -7
- package/dist/esm/v2/components/or-textarea-v3/index.js +3 -1
- package/dist/esm/v2/components/or-textbox/index.js +3 -1
- package/dist/esm/v2/components/or-time-picker-v3/index.js +8 -6
- package/dist/esm/v2/components/or-toast-v3/index.js +8 -6
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +8 -6
- package/dist/esm/v2/components/or-tooltip-v3/index.js +6 -4
- package/dist/esm/v2/hooks/index.d.ts +1 -0
- package/dist/esm/v2/hooks/index.js +3 -0
- package/dist/esm/v2/hooks/useOverflow.d.ts +2 -2
- package/dist/esm/v2/hooks/useTheme.d.ts +2 -0
- package/dist/esm/v2/index.js +63 -36
- package/dist/esm/v2/{types-f30860ee.js → types-08ab4707.js} +3 -1
- package/dist/esm/v2/useTheme-e23d13c8.js +9 -0
- package/dist/esm/v3/{OrBottomSheet-a39fb331.js → OrBottomSheet-e9463e4d.js} +3 -1
- package/dist/esm/v3/{OrCardCollection-3d652a34.js → OrCardCollection-dbe7dac6.js} +4 -4
- package/dist/esm/v3/{OrCheckbox-7093e9c2.js → OrCheckbox-2194e473.js} +2 -0
- package/dist/esm/v3/{OrCheckboxGroup-f755d216.js → OrCheckboxGroup-6c36527f.js} +1 -1
- package/dist/esm/v3/{OrCheckboxTree-99f6eaec.js → OrCheckboxTree-1873a941.js} +1 -1
- package/dist/esm/v3/{OrConfirm-cb0b2b78.js → OrConfirm-104754d0.js} +4 -2
- package/dist/esm/v3/{OrDatePicker-6a44ad41.js → OrDatePicker-c12fab59.js} +3 -3
- package/dist/esm/v3/{OrDateTimePicker-2cbcf8c7.js → OrDateTimePicker-ad360ebc.js} +3 -3
- package/dist/esm/v3/{OrDateTimePickerMonthSelect-2f61d92f.js → OrDateTimePickerMonthSelect-16e3f5b9.js} +3 -3
- package/dist/esm/v3/{OrIconButton-e34a20eb.js → OrIconButton-c6d15a51.js} +2 -2
- package/dist/esm/v3/{OrInlineInput-ad0d4264.js → OrInlineInput-48e936d2.js} +3 -1
- package/dist/esm/v3/{OrInlineTextarea-b5ec488d.js → OrInlineTextarea-3937421c.js} +3 -1
- package/dist/esm/v3/{OrInput-a9aeef6e.js → OrInput-14b88801.js} +3 -1
- package/dist/esm/v3/{OrMenu-f590d761.js → OrMenu-b90e6784.js} +3 -1
- package/dist/esm/v3/{OrModal-9dc09e95.js → OrModal-231fb401.js} +4 -2
- package/dist/esm/v3/{OrNotification-69031471.js → OrNotification-dde92a43.js} +1 -1
- package/dist/esm/v3/{OrOverlay-28952099.js → OrOverlay-489fdf76.js} +2 -0
- package/dist/esm/v3/{OrPagination-f3be120f.js → OrPagination-22356f86.js} +4 -2
- package/dist/esm/v3/{OrPassword-9192b9ea.js → OrPassword-cd8a3c46.js} +2 -0
- package/dist/esm/v3/{OrPopover-ebd57053.js → OrPopover-8ea2062a.js} +3 -1
- package/dist/esm/v3/{OrProgress-efa51d7b.js → OrProgress-a54a42c0.js} +2 -0
- package/dist/esm/v3/{OrRadio-a6c88f29.js → OrRadio-4f0026c9.js} +2 -0
- package/dist/esm/v3/{OrRadioGroup-5d1fe6fd.js → OrRadioGroup-d215409c.js} +1 -1
- package/dist/esm/v3/OrRichTextEditor-b7f30172.js +852 -0
- package/dist/esm/v3/{OrSearch-5576cf14.js → OrSearch-7bf5009e.js} +1 -1
- package/dist/esm/v3/{OrSelect-0b3ebce9.js → OrSelect-b7d87ded.js} +6 -4
- package/dist/esm/v3/{OrSidebar-303ef558.js → OrSidebar-84533704.js} +1 -1
- package/dist/esm/v3/{OrSidebarCollapseButton-d7f004df.js → OrSidebarCollapseButton-88a165e8.js} +1 -1
- package/dist/esm/v3/{OrSwitch-594f5a63.js → OrSwitch-ed9868db.js} +2 -0
- package/dist/esm/v3/{OrTabs-b6c8077c.js → OrTabs-ffb69679.js} +2 -2
- package/dist/esm/v3/{OrTag-4ac45254.js → OrTag-51d8f47d.js} +1 -1
- package/dist/esm/v3/{OrTags-de9f065e.js → OrTags-3ae4a908.js} +4 -2
- package/dist/esm/v3/{OrTextarea-93cf7da7.js → OrTextarea-0f9a2a27.js} +2 -0
- package/dist/esm/v3/{OrTextbox-56714f51.js → OrTextbox-8d2903db.js} +2 -0
- package/dist/esm/v3/{OrTimePicker-0fe72767.js → OrTimePicker-16a88b67.js} +2 -2
- package/dist/esm/v3/{OrTooltip-edb28095.js → OrTooltip-9a63f445.js} +3 -1
- package/dist/esm/v3/codemirrorView-be2c7423.js +353 -0
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +62 -36
- package/dist/esm/v3/components/or-bottom-sheet-v3/index.js +4 -2
- package/dist/esm/v3/components/or-card-collection-v3/index.js +11 -9
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +5 -3
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +4 -2
- package/dist/esm/v3/components/or-checkbox-v3/index.js +3 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +9 -7
- package/dist/esm/v3/components/or-date-picker-v3/index.js +10 -8
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +10 -8
- package/dist/esm/v3/components/or-icon-button-v3/index.js +7 -5
- package/dist/esm/v3/components/or-inline-input-v3/index.js +8 -6
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +8 -6
- package/dist/esm/v3/components/or-input-v3/index.js +8 -6
- package/dist/esm/v3/components/or-menu-v3/index.js +6 -4
- package/dist/esm/v3/components/or-modal-v3/index.js +8 -6
- package/dist/esm/v3/components/or-notification-v3/index.js +8 -6
- package/dist/esm/v3/components/or-overlay-v3/index.js +3 -1
- package/dist/esm/v3/components/or-pagination-v3/index.js +7 -5
- package/dist/esm/v3/components/or-password/index.js +3 -1
- package/dist/esm/v3/components/or-popover-v3/index.js +5 -3
- package/dist/esm/v3/components/or-progress-v3/index.js +3 -1
- package/dist/esm/v3/components/or-radio-group-v3/index.js +4 -2
- package/dist/esm/v3/components/or-radio-v3/index.js +3 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +220 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +2 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +60 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +4 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +6 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +27 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +7 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +24 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/markdown.d.ts +3 -0
- package/dist/esm/v3/components/or-search-v3/index.js +9 -7
- package/dist/esm/v3/components/or-select-v3/index.js +11 -9
- package/dist/esm/v3/components/or-sidebar-v3/index.js +9 -7
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +8 -6
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +8 -6
- package/dist/esm/v3/components/or-switch-v3/index.js +3 -1
- package/dist/esm/v3/components/or-tabs-v3/index.js +7 -5
- package/dist/esm/v3/components/or-tag-v3/index.js +8 -6
- package/dist/esm/v3/components/or-tags-v3/index.js +9 -7
- package/dist/esm/v3/components/or-textarea-v3/index.js +3 -1
- package/dist/esm/v3/components/or-textbox/index.js +3 -1
- package/dist/esm/v3/components/or-time-picker-v3/index.js +8 -6
- package/dist/esm/v3/components/or-toast-v3/index.js +8 -6
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +8 -6
- package/dist/esm/v3/components/or-tooltip-v3/index.js +6 -4
- package/dist/esm/v3/hooks/index.d.ts +1 -0
- package/dist/esm/v3/hooks/index.js +3 -0
- package/dist/esm/v3/hooks/useOverflow.d.ts +2 -2
- package/dist/esm/v3/hooks/useTheme.d.ts +2 -0
- package/dist/esm/v3/index.js +63 -36
- package/dist/esm/v3/{types-60f3dd35.js → types-03758078.js} +3 -1
- package/dist/esm/v3/useTheme-e23d13c8.js +9 -0
- package/package.json +26 -4
- package/src/components/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +761 -0
- package/src/components/or-rich-text-editor-v3/index.ts +2 -0
- package/src/components/or-rich-text-editor-v3/props.ts +4 -0
- package/src/components/or-rich-text-editor-v3/styles.ts +53 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +40 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +254 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/theme.ts +213 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +22 -0
- package/src/components/or-rich-text-editor-v3/utils/markdown.ts +120 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useElevation.ts +1 -4
- package/src/hooks/useOverflow.ts +3 -5
- package/src/hooks/useTheme.ts +7 -0
- package/src/shims-mdx.d.ts +4 -0
- package/src/shims-png.d.ts +2 -2
- package/src/shims-vue.d.ts +3 -2
- package/src/shims.d.ts +11 -2
- /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-769685bc.js → OrDateTimePickerMonthSelect-eb2c5c01.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-bc0df38f.js → OrDateTimePickerPopoverHeader-257ef8d8.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-e284797b.js → OrDateTimePickerTimeSelect-37dcd0a3.js} +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const EditorContainer: string[] = [
|
|
2
|
+
// Colors
|
|
3
|
+
'border-outline',
|
|
4
|
+
'focus-within:theme-background-primary-translucent',
|
|
5
|
+
'focus-within:theme-border-1-primary',
|
|
6
|
+
'focus-within:theme-outline-2-primary',
|
|
7
|
+
// Sizing
|
|
8
|
+
'border-1',
|
|
9
|
+
'rounded-md',
|
|
10
|
+
'w-full',
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export const ToolbarContainer: string[] = [
|
|
14
|
+
// Layout
|
|
15
|
+
'flex',
|
|
16
|
+
//Spacing
|
|
17
|
+
'py-sm',
|
|
18
|
+
//Sizing
|
|
19
|
+
'border-b-1',
|
|
20
|
+
//Colors
|
|
21
|
+
'border-b-outline',
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export const Toolbar: string[] = [
|
|
25
|
+
// Layout
|
|
26
|
+
'flex',
|
|
27
|
+
// Spacing
|
|
28
|
+
'px-sm',
|
|
29
|
+
'gap-md',
|
|
30
|
+
// Sizing
|
|
31
|
+
'border-l-1',
|
|
32
|
+
//Colors
|
|
33
|
+
'border-r-disabled',
|
|
34
|
+
// Last child
|
|
35
|
+
'first-of-type:border-none',
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
export const ToolbarButton: string[] = [
|
|
39
|
+
// Typography
|
|
40
|
+
'text-on-disabled',
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
export const ToolbarButtonFocused: string[] = [
|
|
44
|
+
// Typography
|
|
45
|
+
'text-outline',
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
export const EditorInput: string[] = [
|
|
49
|
+
// Typography
|
|
50
|
+
'typography-body-2-regular',
|
|
51
|
+
// Sizing
|
|
52
|
+
'min-h-[88px]',
|
|
53
|
+
];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Node } from '@tiptap/core';
|
|
2
|
+
import CodeBlockView from './codemirrorView';
|
|
3
|
+
import { minimalSetup } from 'codemirror';
|
|
4
|
+
import { javascript } from '@codemirror/lang-javascript';
|
|
5
|
+
|
|
6
|
+
export default Node.create({
|
|
7
|
+
name: 'codeBlock',
|
|
8
|
+
content: 'text*',
|
|
9
|
+
marks: '',
|
|
10
|
+
group: 'block',
|
|
11
|
+
code: true,
|
|
12
|
+
defining: true,
|
|
13
|
+
isolating: true,
|
|
14
|
+
|
|
15
|
+
parseHTML() {
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
tag: 'pre',
|
|
19
|
+
preserveWhitespace: 'full',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
renderHTML() {
|
|
25
|
+
return ['pre', ['code', 0]];
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
addNodeView() {
|
|
29
|
+
return ({ node, editor, getPos }) => {
|
|
30
|
+
return new CodeBlockView({
|
|
31
|
+
node,
|
|
32
|
+
view: editor.view,
|
|
33
|
+
getPos: getPos as () => number,
|
|
34
|
+
cmOptions: {
|
|
35
|
+
extensions: [minimalSetup, javascript()],
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
});
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { Selection, TextSelection } from 'prosemirror-state';
|
|
2
|
+
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
|
+
import { Node as ProsemirrorNode } from 'prosemirror-model';
|
|
4
|
+
import { exitCode } from 'prosemirror-commands';
|
|
5
|
+
import { EditorState as CMState, Transaction as CMTransaction } from '@codemirror/state';
|
|
6
|
+
import {
|
|
7
|
+
Command,
|
|
8
|
+
EditorView as CMView,
|
|
9
|
+
keymap,
|
|
10
|
+
highlightActiveLine,
|
|
11
|
+
highlightActiveLineGutter,
|
|
12
|
+
lineNumbers,
|
|
13
|
+
} from '@codemirror/view';
|
|
14
|
+
import orCodeTheme from './theme';
|
|
15
|
+
|
|
16
|
+
import { ComputeChange, CodeMirrorViewOptions } from './types';
|
|
17
|
+
|
|
18
|
+
const computeChange = (oldVal: string, newVal: string): ComputeChange | null => {
|
|
19
|
+
if (oldVal === newVal) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let start = 0;
|
|
24
|
+
let oldEnd = oldVal.length;
|
|
25
|
+
let newEnd = newVal.length;
|
|
26
|
+
|
|
27
|
+
while (start < oldEnd && oldVal.charCodeAt(start) === newVal.charCodeAt(start)) {
|
|
28
|
+
start += 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
while (oldEnd > start && newEnd > start && oldVal.charCodeAt(oldEnd - 1) === newVal.charCodeAt(newEnd - 1)) {
|
|
32
|
+
oldEnd -= 1;
|
|
33
|
+
newEnd -= 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
from: start,
|
|
38
|
+
to: oldEnd,
|
|
39
|
+
text: newVal.slice(start, newEnd),
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
class CodeMirrorView implements NodeView {
|
|
44
|
+
name: string;
|
|
45
|
+
|
|
46
|
+
node: ProsemirrorNode;
|
|
47
|
+
|
|
48
|
+
view: EditorView;
|
|
49
|
+
|
|
50
|
+
dom: HTMLElement;
|
|
51
|
+
|
|
52
|
+
cm: CMView;
|
|
53
|
+
|
|
54
|
+
getPos: () => number;
|
|
55
|
+
|
|
56
|
+
updating = false;
|
|
57
|
+
|
|
58
|
+
constructor(options: CodeMirrorViewOptions) {
|
|
59
|
+
// Store for later
|
|
60
|
+
this.node = options.node;
|
|
61
|
+
this.view = options.view;
|
|
62
|
+
const cmExtensions = options.cmOptions?.extensions || [];
|
|
63
|
+
this.name = 'codeBlock',
|
|
64
|
+
|
|
65
|
+
this.getPos = options.getPos as () => number;
|
|
66
|
+
|
|
67
|
+
const changeFilter = CMState.changeFilter.of((tr) => {
|
|
68
|
+
if (!tr.docChanged && !this.updating) {
|
|
69
|
+
this.forwardSelection();
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// Create a CodeMirror instancew
|
|
75
|
+
this.cm = new CMView({
|
|
76
|
+
dispatch: this.dispatch.bind(this),
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// The editor's outer node is our DOM representation
|
|
80
|
+
this.dom = this.cm.dom;
|
|
81
|
+
|
|
82
|
+
const cmState = CMState.create({
|
|
83
|
+
doc: this.node.textContent,
|
|
84
|
+
extensions: [
|
|
85
|
+
orCodeTheme,
|
|
86
|
+
changeFilter,
|
|
87
|
+
highlightActiveLine(),
|
|
88
|
+
highlightActiveLineGutter(),
|
|
89
|
+
lineNumbers(),
|
|
90
|
+
keymap.of([
|
|
91
|
+
{
|
|
92
|
+
key: 'ArrowUp',
|
|
93
|
+
run: this.mayBeEscape('line', -1),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
key: 'ArrowLeft',
|
|
97
|
+
run: this.mayBeEscape('char', -1),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
key: 'ArrowDown',
|
|
101
|
+
run: this.mayBeEscape('line', 1),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
key: 'ArrowRight',
|
|
105
|
+
run: this.mayBeEscape('char', 1),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
key: 'Ctrl-Enter',
|
|
109
|
+
run: () => {
|
|
110
|
+
if (exitCode(this.view.state, this.view.dispatch)) {
|
|
111
|
+
this.view.focus();
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
return false;
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
]),
|
|
118
|
+
cmExtensions,
|
|
119
|
+
],
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
this.cm.setState(cmState);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
forwardSelection() {
|
|
126
|
+
if (!this.cm.hasFocus) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const { state } = this.view;
|
|
131
|
+
const selection = this.asProseMirrorSelection(state.doc);
|
|
132
|
+
|
|
133
|
+
if (!selection.eq(state.selection)) {
|
|
134
|
+
this.view.dispatch(state.tr.setSelection(selection));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
asProseMirrorSelection(doc: ProsemirrorNode) {
|
|
139
|
+
const offset = this.getPos() + 1;
|
|
140
|
+
const { anchor, head } = this.cm.state.selection.main;
|
|
141
|
+
return TextSelection.create(doc, anchor + offset, head + offset);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
dispatch(cmTr: CMTransaction) {
|
|
145
|
+
this.cm.setState(cmTr.state);
|
|
146
|
+
|
|
147
|
+
if (cmTr.docChanged && !this.updating) {
|
|
148
|
+
const start = this.getPos() + 1;
|
|
149
|
+
|
|
150
|
+
const cmValue = cmTr.state.doc.toString();
|
|
151
|
+
const change = computeChange(this.node.textContent, cmValue);
|
|
152
|
+
|
|
153
|
+
if (!change) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const content = change.text ? this.view.state.schema.text(change.text) : null;
|
|
158
|
+
|
|
159
|
+
const tr = this.view.state.tr.replaceWith(change.from + start, change.to + start, content as ProsemirrorNode);
|
|
160
|
+
this.view.dispatch(tr);
|
|
161
|
+
this.forwardSelection();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
mayBeEscape(unit: 'char' | 'line', dir: -1 | 1): Command {
|
|
166
|
+
return (view) => {
|
|
167
|
+
const { state } = view;
|
|
168
|
+
const { selection } = state;
|
|
169
|
+
|
|
170
|
+
const offsetToPos = () => {
|
|
171
|
+
const offset = selection.main.from;
|
|
172
|
+
const line = state.doc.lineAt(offset);
|
|
173
|
+
return {
|
|
174
|
+
line: line.number,
|
|
175
|
+
ch: offset - line.from,
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const pos = offsetToPos();
|
|
180
|
+
const hasSelection = state.selection.ranges.some((r) => !r.empty);
|
|
181
|
+
|
|
182
|
+
const firstLine = 1;
|
|
183
|
+
const lastLine = state.doc.lineAt(state.doc.length).number;
|
|
184
|
+
|
|
185
|
+
if (
|
|
186
|
+
hasSelection
|
|
187
|
+
|| pos.line !== (dir < 0 ? firstLine : lastLine)
|
|
188
|
+
|| (unit === 'char' && pos.ch !== (dir < 0 ? 0 : state.doc.line(pos.line).length))
|
|
189
|
+
) {
|
|
190
|
+
return false;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const targetPos = this.getPos() + (dir < 0 ? 0 : this.node.nodeSize);
|
|
194
|
+
const pmSelection = Selection.near(this.view.state.doc.resolve(targetPos), dir);
|
|
195
|
+
this.view.dispatch(this.view.state.tr.setSelection(pmSelection).scrollIntoView());
|
|
196
|
+
this.view.focus();
|
|
197
|
+
return true;
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
update(node: ProsemirrorNode) {
|
|
202
|
+
if (node.type !== this.node.type) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
this.node = node;
|
|
207
|
+
const change = computeChange(this.cm.state.doc.toString(), node.textContent);
|
|
208
|
+
|
|
209
|
+
if (change) {
|
|
210
|
+
this.updating = true;
|
|
211
|
+
this.cm.dispatch({
|
|
212
|
+
changes: {
|
|
213
|
+
from: change.from,
|
|
214
|
+
to: change.to,
|
|
215
|
+
insert: change.text,
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
this.updating = false;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
setSelection(anchor: number, head: number): void {
|
|
225
|
+
this.focus();
|
|
226
|
+
this.updating = true;
|
|
227
|
+
this.cm.dispatch({
|
|
228
|
+
selection: {
|
|
229
|
+
anchor,
|
|
230
|
+
head,
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
this.updating = false;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
focus() {
|
|
237
|
+
this.cm.focus();
|
|
238
|
+
this.forwardSelection();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
selectNode() {
|
|
242
|
+
this.focus();
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
stopEvent() {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
destroy() {
|
|
250
|
+
this.cm.destroy();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export default CodeMirrorView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CodeMirrorView } from './codemirrorView';
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
import { Extension } from '@codemirror/state';
|
|
3
|
+
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
4
|
+
import { tags as t } from '@lezer/highlight';
|
|
5
|
+
|
|
6
|
+
// Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
|
|
7
|
+
|
|
8
|
+
const chalky = 'var(--c-warning-darken-20)',
|
|
9
|
+
coral = 'var(--c-error)',
|
|
10
|
+
cyan = '#56b6c2',
|
|
11
|
+
invalid = 'var(--c-white)',
|
|
12
|
+
ivory = 'var(--c-neutral-6)',
|
|
13
|
+
stone = 'var(--c-neutral-5)', // Brightened compared to original to increase contrast
|
|
14
|
+
malibu = '#61afef',
|
|
15
|
+
sage = 'var(--c-success)',
|
|
16
|
+
whiskey = 'var(--c-warning-darken-5)',
|
|
17
|
+
violet = '#c678dd',
|
|
18
|
+
darkBackground = 'var(--c-neutral-1)',
|
|
19
|
+
highlightBackground = 'var(--c-neutral-2)',
|
|
20
|
+
background = 'var(--c-neutral-1)',
|
|
21
|
+
tooltipBackground = 'var(--c-neutral-2)',
|
|
22
|
+
selection = 'var(--c-neutral-3)',
|
|
23
|
+
cursor = 'var(--c-primary)';
|
|
24
|
+
|
|
25
|
+
/// The colors used in the theme, as CSS color strings.
|
|
26
|
+
export const color = {
|
|
27
|
+
chalky,
|
|
28
|
+
coral,
|
|
29
|
+
cyan,
|
|
30
|
+
invalid,
|
|
31
|
+
ivory,
|
|
32
|
+
stone,
|
|
33
|
+
malibu,
|
|
34
|
+
sage,
|
|
35
|
+
whiskey,
|
|
36
|
+
violet,
|
|
37
|
+
darkBackground,
|
|
38
|
+
highlightBackground,
|
|
39
|
+
background,
|
|
40
|
+
tooltipBackground,
|
|
41
|
+
selection,
|
|
42
|
+
cursor,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/// The editor theme styles for One Dark.
|
|
46
|
+
export const orCodeTheme = EditorView.theme({
|
|
47
|
+
'&': {
|
|
48
|
+
color: ivory,
|
|
49
|
+
backgroundColor: background,
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
'.cm-content': {
|
|
53
|
+
caretColor: cursor,
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
'.cm-button': {
|
|
57
|
+
background: highlightBackground,
|
|
58
|
+
color: 'var(--c-neutral-6)',
|
|
59
|
+
border: 0,
|
|
60
|
+
borderRadius: 'var(--s-2)',
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
'.cm-panel.cm-search input[type=checkbox]': {
|
|
64
|
+
display: 'inline-block',
|
|
65
|
+
verticalAlign: 'middle',
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
'.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
|
|
69
|
+
'&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
70
|
+
backgroundColor: selection,
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
'.cm-panels': {
|
|
74
|
+
backgroundColor: darkBackground,
|
|
75
|
+
color: ivory,
|
|
76
|
+
},
|
|
77
|
+
'.cm-panels.cm-panels-top': { borderBottom: '2px solid var(--c-neutral-2)' },
|
|
78
|
+
'.cm-panels.cm-panels-bottom': { borderTop: '2px solid var(--c-neutral-2)' },
|
|
79
|
+
|
|
80
|
+
'.cm-searchMatch': {
|
|
81
|
+
backgroundColor: 'var(--c-neutral-1)',
|
|
82
|
+
outline: '1px solid var(--c-neutral-2)',
|
|
83
|
+
},
|
|
84
|
+
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
85
|
+
backgroundColor: '#6199ff2f',
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
'.cm-activeLine': { backgroundColor: '#6699ff0b' },
|
|
89
|
+
'.cm-selectionMatch': { backgroundColor: '#aafe661a' },
|
|
90
|
+
|
|
91
|
+
'&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
|
|
92
|
+
backgroundColor: '#bad0f847',
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
'.cm-gutters': {
|
|
96
|
+
backgroundColor: background,
|
|
97
|
+
color: stone,
|
|
98
|
+
border: 'none',
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
'.cm-activeLineGutter': {
|
|
102
|
+
backgroundColor: highlightBackground,
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
'.cm-foldPlaceholder': {
|
|
106
|
+
backgroundColor: 'transparent',
|
|
107
|
+
border: 'none',
|
|
108
|
+
color: '#ddd',
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
'.cm-tooltip': {
|
|
112
|
+
border: 'none',
|
|
113
|
+
backgroundColor: tooltipBackground,
|
|
114
|
+
},
|
|
115
|
+
'.cm-tooltip .cm-tooltip-arrow:before': {
|
|
116
|
+
borderTopColor: 'transparent',
|
|
117
|
+
borderBottomColor: 'transparent',
|
|
118
|
+
},
|
|
119
|
+
'.cm-tooltip .cm-tooltip-arrow:after': {
|
|
120
|
+
borderTopColor: tooltipBackground,
|
|
121
|
+
borderBottomColor: tooltipBackground,
|
|
122
|
+
},
|
|
123
|
+
'.cm-tooltip-autocomplete': {
|
|
124
|
+
'& > ul > li[aria-selected]': {
|
|
125
|
+
backgroundColor: highlightBackground,
|
|
126
|
+
color: ivory,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
'.cm-textfield': {
|
|
130
|
+
outline: 'none',
|
|
131
|
+
background: background,
|
|
132
|
+
color: 'var(--c-neutral-6)',
|
|
133
|
+
backgroundColor: 'var(--c-neutral-1)',
|
|
134
|
+
border: '1px solid var(--c-neutral-2)',
|
|
135
|
+
borderRadius: 'var(--s-2)',
|
|
136
|
+
},
|
|
137
|
+
}, { dark: true });
|
|
138
|
+
|
|
139
|
+
/// The highlighting style for code in the One Dark theme.
|
|
140
|
+
export const orCodeHighlightStyle = HighlightStyle.define([
|
|
141
|
+
{
|
|
142
|
+
tag: t.keyword,
|
|
143
|
+
color: violet,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
tag: [t.name, t.deleted, t.character, t.propertyName, t.macroName],
|
|
147
|
+
color: coral,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
tag: [t.function(t.variableName), t.labelName],
|
|
151
|
+
color: malibu,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
tag: [t.color, t.constant(t.name), t.standard(t.name)],
|
|
155
|
+
color: whiskey,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
tag: [t.definition(t.name), t.separator],
|
|
159
|
+
color: ivory,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
tag: [t.typeName, t.className, t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace],
|
|
163
|
+
color: chalky,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
tag: [t.operator, t.operatorKeyword, t.url, t.escape, t.regexp, t.link, t.special(t.string)],
|
|
167
|
+
color: cyan,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
tag: [t.meta, t.comment],
|
|
171
|
+
color: stone,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
tag: t.strong,
|
|
175
|
+
fontWeight: 'bold',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
tag: t.emphasis,
|
|
179
|
+
fontStyle: 'italic',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
tag: t.strikethrough,
|
|
183
|
+
textDecoration: 'line-through',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
tag: t.link,
|
|
187
|
+
color: stone,
|
|
188
|
+
textDecoration: 'underline',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
tag: t.heading,
|
|
192
|
+
fontWeight: 'bold',
|
|
193
|
+
color: coral,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
tag: [t.atom, t.bool, t.special(t.variableName)],
|
|
197
|
+
color: whiskey,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
tag: [t.processingInstruction, t.string, t.inserted],
|
|
201
|
+
color: sage,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
tag: t.invalid,
|
|
205
|
+
color: invalid,
|
|
206
|
+
},
|
|
207
|
+
]);
|
|
208
|
+
|
|
209
|
+
/// Extension to enable the One Dark theme (both the editor theme and
|
|
210
|
+
/// the highlight style).
|
|
211
|
+
const theme: Extension = [orCodeTheme, syntaxHighlighting(orCodeHighlightStyle)];
|
|
212
|
+
|
|
213
|
+
export default theme;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import type { Node as ProsemirrorNode } from 'prosemirror-model';
|
|
3
|
+
import type { Extension } from '@codemirror/state';
|
|
4
|
+
|
|
5
|
+
export interface ComputeChange {
|
|
6
|
+
from: number;
|
|
7
|
+
to: number;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface CMOptions {
|
|
12
|
+
extensions: Extension;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type GetPos = () => number | undefined;
|
|
16
|
+
|
|
17
|
+
export interface CodeMirrorViewOptions {
|
|
18
|
+
node: ProsemirrorNode;
|
|
19
|
+
view: EditorView;
|
|
20
|
+
getPos: GetPos;
|
|
21
|
+
cmOptions?: CMOptions;
|
|
22
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MarkdownSerializer as ProseMirrorMarkdownSerializer,
|
|
3
|
+
defaultMarkdownSerializer,
|
|
4
|
+
} from 'prosemirror-markdown';
|
|
5
|
+
import { DOMParser as ProseMirrorDOMParser, Node, Mark } from 'prosemirror-model';
|
|
6
|
+
import { marked } from 'marked';
|
|
7
|
+
|
|
8
|
+
import Paragraph from '@tiptap/extension-paragraph';
|
|
9
|
+
import BulletList from '@tiptap/extension-bullet-list';
|
|
10
|
+
import ListItem from '@tiptap/extension-list-item';
|
|
11
|
+
import OrderedList from '@tiptap/extension-ordered-list';
|
|
12
|
+
import Strike from '@tiptap/extension-strike';
|
|
13
|
+
import Italic from '@tiptap/extension-italic';
|
|
14
|
+
import HardBreak from '@tiptap/extension-hard-break';
|
|
15
|
+
import Bold from '@tiptap/extension-bold';
|
|
16
|
+
import CodeBlock from '@tiptap/extension-code-block';
|
|
17
|
+
import Blockquote from '@tiptap/extension-blockquote';
|
|
18
|
+
import Link from '@tiptap/extension-link';
|
|
19
|
+
import Highlight from '@tiptap/extension-highlight';
|
|
20
|
+
import Underline from '@tiptap/extension-underline';
|
|
21
|
+
|
|
22
|
+
const serializerNodes = {
|
|
23
|
+
...defaultMarkdownSerializer.nodes,
|
|
24
|
+
[Paragraph.name]: defaultMarkdownSerializer.nodes.paragraph,
|
|
25
|
+
[BulletList.name]: defaultMarkdownSerializer.nodes.bullet_list,
|
|
26
|
+
[ListItem.name]: defaultMarkdownSerializer.nodes.list_item,
|
|
27
|
+
[OrderedList.name]: defaultMarkdownSerializer.nodes.ordered_list,
|
|
28
|
+
[HardBreak.name]: defaultMarkdownSerializer.nodes.hard_break,
|
|
29
|
+
[CodeBlock.name]: defaultMarkdownSerializer.nodes.code_block,
|
|
30
|
+
[Blockquote.name]: defaultMarkdownSerializer.nodes.blockquote,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const serializerMarks = {
|
|
34
|
+
...defaultMarkdownSerializer.marks,
|
|
35
|
+
[Bold.name]: defaultMarkdownSerializer.marks.strong,
|
|
36
|
+
[Strike.name]: {
|
|
37
|
+
open: '~~',
|
|
38
|
+
close: '~~',
|
|
39
|
+
mixable: true,
|
|
40
|
+
expelEnclosingWhitespace: true,
|
|
41
|
+
},
|
|
42
|
+
[Italic.name]: {
|
|
43
|
+
open: ' _',
|
|
44
|
+
close: '_ ',
|
|
45
|
+
mixable: true,
|
|
46
|
+
expelEnclosingWhitespace: true,
|
|
47
|
+
},
|
|
48
|
+
[Highlight.name]: {
|
|
49
|
+
open: '==',
|
|
50
|
+
close: '==',
|
|
51
|
+
mixable: true,
|
|
52
|
+
expelEnclosingWhitespace: true,
|
|
53
|
+
},
|
|
54
|
+
[Underline.name]: {
|
|
55
|
+
open: '',
|
|
56
|
+
close: '',
|
|
57
|
+
mixable: true,
|
|
58
|
+
expelEnclosingWhitespace: true,
|
|
59
|
+
},
|
|
60
|
+
[Link.name]: {
|
|
61
|
+
open(state: any, mark: Mark, parent: Node, index: number) {
|
|
62
|
+
return isPlainURL(mark, parent, index, 1) ? '<' : '[';
|
|
63
|
+
},
|
|
64
|
+
close(state: any, mark: Mark, parent: Node, index: number) {
|
|
65
|
+
const href = mark.attrs.canonicalSrc || mark.attrs.href;
|
|
66
|
+
|
|
67
|
+
return isPlainURL(mark, parent, index, -1)
|
|
68
|
+
? '>'
|
|
69
|
+
: `](${state.esc(href)}${
|
|
70
|
+
mark.attrs.title ? ` ${state.quote(mark.attrs.title)}` : ''
|
|
71
|
+
})`;
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const isPlainURL = (link: Mark, parent: Node, index: number, side: number) => {
|
|
77
|
+
if (link.attrs.title || !/^\w+:/.test(link.attrs.href)) return false;
|
|
78
|
+
const content = parent.child(index + (side < 0 ? -1 : 0));
|
|
79
|
+
if (
|
|
80
|
+
!content.isText ||
|
|
81
|
+
content.text !== link.attrs.href ||
|
|
82
|
+
content.marks[content.marks.length - 1] !== link
|
|
83
|
+
)
|
|
84
|
+
return false;
|
|
85
|
+
if (index === (side < 0 ? 1 : parent.childCount - 1)) return true;
|
|
86
|
+
const next = parent.child(index + (side < 0 ? -2 : 1));
|
|
87
|
+
return !link.isInSet(next.marks);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const serialize = (schema: any, content: any) => {
|
|
91
|
+
const proseMirrorDocument = schema.nodeFromJSON(content);
|
|
92
|
+
const serializer = new ProseMirrorMarkdownSerializer(
|
|
93
|
+
serializerNodes,
|
|
94
|
+
serializerMarks,
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
return serializer.serialize(proseMirrorDocument, { tightLists: true });
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const deserialize = (schema: any, content: any) => {
|
|
101
|
+
if (!content) return null;
|
|
102
|
+
|
|
103
|
+
const html = marked(content, {
|
|
104
|
+
gfm: true,
|
|
105
|
+
breaks: true,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
if (!html) return null;
|
|
109
|
+
|
|
110
|
+
const parser = new DOMParser();
|
|
111
|
+
const { body } = parser.parseFromString(html, 'text/html');
|
|
112
|
+
|
|
113
|
+
// append original source as a comment that nodes can access
|
|
114
|
+
body.append(document.createComment(content));
|
|
115
|
+
|
|
116
|
+
const state = ProseMirrorDOMParser.fromSchema(schema).parse(body);
|
|
117
|
+
return state.toJSON();
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { serialize, deserialize };
|