@onereach/ui-components 4.3.12 → 4.4.0-beta.2673.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/v2/components/OrCode/OrCode.js +6 -3792
- package/dist/bundled/v2/components/OrCode/index.js +6 -2
- 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/OrConfirm/OrConfirm.js +2 -1
- package/dist/bundled/v2/components/OrConfirm/index.js +2 -1
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +1 -1
- package/dist/bundled/v2/components/OrConfirmV3/index.js +1 -1
- package/dist/bundled/v2/components/OrModal/OrModal.js +3 -1346
- package/dist/bundled/v2/components/OrModal/index.js +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +2136 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +209 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +69 -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 +5 -0
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +1 -2
- package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTextarea/OrTextarea.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTextareaV3/OrTextarea.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrToast/OrToast.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +16 -3
- package/dist/bundled/{v3/index-cf2c3c27.js → v2/index-0d224ae5.js} +3 -115
- package/dist/bundled/v2/index-1182caa8.js +9633 -0
- package/dist/bundled/v2/index-85c2efe8.js +7122 -0
- package/dist/bundled/{v3/OrCode.vue_vue_type_script_lang-74060519.js → v2/index-d92d0b48.js} +14 -235
- package/dist/bundled/{v3/lang-0fb8f78b.js → v2/index-e9f6b2d8.js} +73 -4009
- package/dist/bundled/v2/index.es-3f39f316.js +115 -0
- package/dist/bundled/v2/index.js +19 -6
- package/dist/bundled/v2/markdown-d704b3a8.js +17975 -0
- package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-ae842e5b.js → v2/useFocusTrap-48767a70.js} +3 -106
- package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-7e29b3d0.js +237 -0
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-e5a8f92a.js → OrConfirm.vue_vue_type_script_lang-4eaa8470.js} +2 -2
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-23e4ce08.js → OrConfirm.vue_vue_type_script_lang-dca252a7.js} +1 -1
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-2c009ee0.js +108 -0
- package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-55afeb38.js +1861 -0
- package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +26 -11
- package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +24 -8
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +33 -20
- package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +51 -16
- package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +57 -20
- package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +35 -15
- package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +15 -7
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +47 -21
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +70 -22
- package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +7 -4
- package/dist/bundled/v3/components/OrCarousel/OrCarousel.vue.d.ts +676 -126
- package/dist/bundled/v3/components/OrCarouselItem/OrCarouselItem.vue.d.ts +1 -1
- package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +35 -15
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +24 -6
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +43 -17
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +53 -23
- package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +25 -9
- package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +51 -24
- package/dist/bundled/v3/components/OrCode/OrCode.js +10 -6
- package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +69 -24
- package/dist/bundled/v3/components/OrCode/index.js +8 -4
- 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.vue.d.ts +39 -17
- package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +31 -13
- package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +30 -8
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +5 -4
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +84 -23
- package/dist/bundled/v3/components/OrConfirm/index.js +4 -3
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +3 -3
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +91 -29
- package/dist/bundled/v3/components/OrConfirmV3/index.js +2 -2
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +81 -25
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +177 -68
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +105 -31
- package/dist/bundled/v3/components/OrEmptyStateV3/OrEmptyState.vue.d.ts +28 -11
- package/dist/bundled/v3/components/OrError/OrError.vue.d.ts +8 -4
- package/dist/bundled/v3/components/OrErrorTagV3/OrErrorTag.vue.d.ts +7 -4
- package/dist/bundled/v3/components/OrErrorV3/OrError.vue.d.ts +18 -9
- package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +35 -14
- package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +20 -8
- package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +46 -15
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.vue.d.ts +30 -10
- package/dist/bundled/v3/components/OrHint/OrHint.vue.d.ts +8 -4
- package/dist/bundled/v3/components/OrHintV3/OrHint.vue.d.ts +18 -9
- package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +44 -16
- package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +43 -13
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +52 -16
- package/dist/bundled/v3/components/OrIconV3/OrIcon.vue.d.ts +18 -7
- package/dist/bundled/v3/components/OrInlineInputBoxV3/OrInlineInputBox.vue.d.ts +16 -7
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +83 -39
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +95 -43
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +79 -39
- package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +87 -36
- package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +22 -7
- package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +85 -34
- package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +20 -9
- package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +24 -9
- package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +24 -7
- package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +47 -21
- package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +27 -11
- package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +26 -10
- package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +34 -13
- package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +34 -13
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +43 -16
- package/dist/bundled/v3/components/OrModal/OrModal.js +3 -2
- package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +38 -14
- package/dist/bundled/v3/components/OrModal/index.js +2 -1
- package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +31 -15
- package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +27 -9
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +20 -9
- package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +70 -24
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +31 -13
- package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +16 -6
- package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +14 -7
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +75 -27
- package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +63 -22
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +74 -27
- package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +56 -20
- package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +62 -25
- package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +35 -13
- package/dist/bundled/v3/components/OrRadioGroup/OrRadioGroup.vue.d.ts +26 -9
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.vue.d.ts +32 -6
- package/dist/bundled/v3/components/OrRadioV3/OrRadio.vue.d.ts +49 -21
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +273 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +209 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +85 -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 +5 -0
- package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +65 -23
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +41 -17
- package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +25 -9
- package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +77 -28
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +1 -2
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +115 -37
- package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +33 -14
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +63 -28
- package/dist/bundled/v3/components/OrSkeletonCircle/OrSkeletonCircle.vue.d.ts +20 -9
- package/dist/bundled/v3/components/OrSkeletonCircleV3/OrSkeletonCircle.vue.d.ts +28 -13
- package/dist/bundled/v3/components/OrSkeletonRect/OrSkeletonRect.vue.d.ts +22 -9
- package/dist/bundled/v3/components/OrSkeletonRectV3/OrSkeletonRect.vue.d.ts +26 -11
- package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +26 -10
- package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +40 -16
- package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +91 -35
- package/dist/bundled/v3/components/OrSortHeaderV3/OrSortHeader.vue.d.ts +25 -13
- package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +43 -16
- package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +33 -12
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +53 -22
- package/dist/bundled/v3/components/OrTab/OrTab.vue.d.ts +22 -9
- package/dist/bundled/v3/components/OrTabHeaderItem/OrTabHeaderItem.vue.d.ts +29 -13
- package/dist/bundled/v3/components/OrTabV3/OrTab.vue.d.ts +17 -10
- package/dist/bundled/v3/components/OrTabs/OrTabs.vue.d.ts +17 -4
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +69 -24
- package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +27 -10
- package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +23 -12
- package/dist/bundled/v3/components/OrTeleport/OrTeleport.vue3.vue.d.ts +10 -4
- package/dist/bundled/v3/components/OrTeleportV3/OrTeleport.vue3.vue.d.ts +10 -4
- package/dist/bundled/v3/components/OrTextV3/OrText.vue.d.ts +24 -11
- package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +85 -37
- package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +73 -32
- package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +137 -55
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +79 -25
- package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +31 -11
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +55 -25
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +54 -24
- package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +38 -16
- package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +33 -14
- package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +10 -4
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +37 -13
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +21 -7
- package/dist/bundled/v3/directives/dropdown-close.d.ts +1 -3
- package/dist/bundled/v3/directives/dropdown-open.d.ts +1 -3
- package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
- package/dist/bundled/{v2/index-cf2c3c27.js → v3/index-0d224ae5.js} +3 -115
- package/dist/bundled/v3/index-1182caa8.js +9633 -0
- package/dist/bundled/v3/index-85c2efe8.js +7122 -0
- package/dist/bundled/v3/index-d92d0b48.js +3805 -0
- package/dist/bundled/{v2/lang-0fb8f78b.js → v3/index-e9f6b2d8.js} +73 -4009
- package/dist/bundled/v3/index.es-3f39f316.js +115 -0
- package/dist/bundled/v3/index.js +25 -11
- package/dist/bundled/v3/markdown-d704b3a8.js +17975 -0
- package/dist/bundled/v3/useFocusTrap-48767a70.js +1348 -0
- package/dist/esm/v2/OrRichTextEditor-3a078ea0.js +849 -0
- package/dist/esm/v2/{OrSelect-9d6b3363.js → OrSelect-9c8f96b2.js} +1 -2
- 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 +25 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +209 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +59 -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-select-v3/index.js +1 -1
- package/dist/esm/v2/components/or-text-v3/OrText.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-textarea/OrTextarea.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-textarea-v3/OrTextarea.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-textbox/OrTextbox.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-time-picker-v3/OrTimePicker.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-toast/OrToast.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-toast-v3/OrToast.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tooltip/OrTooltip.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-tooltip-v3/OrTooltip.vue.d.ts +2 -2
- package/dist/esm/v2/index.js +25 -1
- package/dist/esm/v3/OrRichTextEditor-7264ad21.js +807 -0
- package/dist/esm/v3/{OrSelect-3dbddc6b.js → OrSelect-b1d7651a.js} +1 -2
- 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 +25 -1
- package/dist/esm/v3/components/or-avatar/OrAvatar.vue.d.ts +26 -11
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +24 -8
- package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +33 -20
- package/dist/esm/v3/components/or-button/OrButton.vue.d.ts +51 -16
- package/dist/esm/v3/components/or-button-v2/OrButton.vue.d.ts +57 -20
- package/dist/esm/v3/components/or-button-v3/OrButton.vue.d.ts +35 -15
- package/dist/esm/v3/components/or-card/OrCard.vue.d.ts +15 -7
- package/dist/esm/v3/components/or-card-collection/OrCardCollection.vue.d.ts +47 -21
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +70 -22
- package/dist/esm/v3/components/or-card-collection-v3/partials/OrCardCollectionView.vue3.vue.d.ts +14 -6
- package/dist/esm/v3/components/or-card-v3/OrCard.vue.d.ts +7 -4
- package/dist/esm/v3/components/or-carousel/OrCarousel.vue.d.ts +676 -126
- package/dist/esm/v3/components/or-carousel/or-carousel-item/OrCarouselItem.vue.d.ts +1 -1
- package/dist/esm/v3/components/or-checkbox/OrCheckbox.vue.d.ts +35 -15
- package/dist/esm/v3/components/or-checkbox-group-v3/OrCheckboxGroup.vue.d.ts +24 -6
- package/dist/esm/v3/components/or-checkbox-tree-v3/OrCheckboxTree.vue.d.ts +43 -17
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +53 -23
- package/dist/esm/v3/components/or-chips/OrChips.vue.d.ts +51 -24
- package/dist/esm/v3/components/or-chips/or-chip/OrChip.vue.d.ts +25 -9
- package/dist/esm/v3/components/or-chips/partials/OrChipsInput.vue.d.ts +37 -17
- package/dist/esm/v3/components/or-code/OrCode.vue.d.ts +69 -24
- package/dist/esm/v3/components/or-collapse/OrCollapse.vue.d.ts +39 -17
- package/dist/esm/v3/components/or-color-picker/OrColorPicker.vue.d.ts +31 -13
- package/dist/esm/v3/components/or-combined-input-v3/OrCombinedInput.vue.d.ts +30 -8
- package/dist/esm/v3/components/or-confirm/OrConfirm.vue.d.ts +84 -23
- package/dist/esm/v3/components/or-confirm-v3/OrConfirm.vue.d.ts +91 -29
- package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +81 -25
- package/dist/esm/v3/components/or-date-time-picker/OrDateTimePicker.vue.d.ts +177 -68
- package/dist/esm/v3/components/or-date-time-picker/partials/OrDateTimePickerCalendarItem.vue.d.ts +33 -12
- package/dist/esm/v3/components/or-date-time-picker-v3/OrDateTimePicker.vue.d.ts +105 -31
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-control/OrDateTimePickerDateControl.vue.d.ts +28 -11
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-date-select/OrDateTimePickerDateSelect.vue.d.ts +39 -17
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-mobile-control/OrDateTimePickerMobileControl.vue.d.ts +15 -7
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-month-select/OrDateTimePickerMonthSelect.vue.d.ts +85 -23
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-footer/OrDateTimePickerPopoverFooter.vue.d.ts +11 -7
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-popover-header/OrDateTimePickerPopoverHeader.vue.d.ts +7 -4
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-control/OrDateTimePickerTimeControl.vue.d.ts +28 -11
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +37 -15
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +28 -11
- package/dist/esm/v3/components/or-error/OrError.vue.d.ts +8 -4
- package/dist/esm/v3/components/or-error-tag-v3/OrErrorTag.vue.d.ts +7 -4
- package/dist/esm/v3/components/or-error-v3/OrError.vue.d.ts +18 -9
- package/dist/esm/v3/components/or-expansion-panel-v3/OrExpansionPanel.vue.d.ts +35 -14
- package/dist/esm/v3/components/or-fab-v3/OrFab.vue.d.ts +20 -8
- package/dist/esm/v3/components/or-floating/OrFloating.vue.d.ts +46 -15
- package/dist/esm/v3/components/or-form-group-v3/OrFormGroup.vue.d.ts +30 -10
- package/dist/esm/v3/components/or-hint/OrHint.vue.d.ts +8 -4
- package/dist/esm/v3/components/or-hint-v3/OrHint.vue.d.ts +18 -9
- package/dist/esm/v3/components/or-icon/OrIcon.vue.d.ts +44 -16
- package/dist/esm/v3/components/or-icon-button-v2/OrIconButton.vue.d.ts +43 -13
- package/dist/esm/v3/components/or-icon-button-v2/partials/OrTooltipWrapper.vue.d.ts +10 -8
- package/dist/esm/v3/components/or-icon-button-v3/OrIconButton.vue.d.ts +52 -16
- package/dist/esm/v3/components/or-icon-v3/OrIcon.vue.d.ts +18 -7
- package/dist/esm/v3/components/or-inline-input-box-v3/OrInlineInputBox.vue.d.ts +16 -7
- package/dist/esm/v3/components/or-inline-input-v3/OrInlineInput.vue.d.ts +83 -39
- package/dist/esm/v3/components/or-inline-text-edit/OrInlineTextEdit.vue.d.ts +95 -43
- package/dist/esm/v3/components/or-inline-textarea-v3/OrInlineTextarea.vue.d.ts +79 -39
- package/dist/esm/v3/components/or-input/OrInput.vue.d.ts +87 -36
- package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +22 -7
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +85 -34
- package/dist/esm/v3/components/or-label/OrLabel.vue.d.ts +20 -9
- package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +24 -9
- package/dist/esm/v3/components/or-link-v3/OrLink.vue.d.ts +24 -7
- package/dist/esm/v3/components/or-list/OrList.vue.d.ts +47 -21
- package/dist/esm/v3/components/or-list-of-inputs/OrListOfInputs.vue.d.ts +27 -11
- package/dist/esm/v3/components/or-loader/OrLoader.vue.d.ts +26 -10
- package/dist/esm/v3/components/or-loader-v3/OrLoader.vue.d.ts +34 -13
- package/dist/esm/v3/components/or-menu-item-v3/OrMenuItem.vue.d.ts +34 -13
- package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +43 -16
- package/dist/esm/v3/components/or-modal/OrModal.vue.d.ts +38 -14
- package/dist/esm/v3/components/or-modal-v3/OrModal.vue.d.ts +31 -15
- package/dist/esm/v3/components/or-notification/OrNotification.vue.d.ts +27 -9
- package/dist/esm/v3/components/or-notification-v3/OrNotification.vue.d.ts +20 -9
- package/dist/esm/v3/components/or-number-input/OrNumberInput.vue.d.ts +70 -24
- package/dist/esm/v3/components/or-overflow-menu/OrOverflowMenu.vue.d.ts +31 -13
- package/dist/esm/v3/components/or-overflow-menu/partials/OrOverflowMenuItem.vue.d.ts +23 -7
- package/dist/esm/v3/components/or-overlay/OrOverlay.vue.d.ts +16 -6
- package/dist/esm/v3/components/or-overlay-v3/OrOverlay.vue.d.ts +14 -7
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +75 -27
- package/dist/esm/v3/components/or-password/OrPassword.vue.d.ts +63 -22
- package/dist/esm/v3/components/or-popover-v3/OrPopover.vue.d.ts +74 -27
- package/dist/esm/v3/components/or-progress/OrProgress.vue.d.ts +56 -20
- package/dist/esm/v3/components/or-progress-v3/OrProgress.vue.d.ts +62 -25
- package/dist/esm/v3/components/or-radio/OrRadio.vue.d.ts +35 -13
- package/dist/esm/v3/components/or-radio-group/OrRadioGroup.vue.d.ts +26 -9
- package/dist/esm/v3/components/or-radio-group-v3/OrRadioGroup.vue.d.ts +32 -6
- package/dist/esm/v3/components/or-radio-v3/OrRadio.vue.d.ts +49 -21
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +209 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +57 -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/OrSearch.vue.d.ts +65 -23
- package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +41 -17
- package/dist/esm/v3/components/or-segmented-control-v3/OrSegmentedControl.vue.d.ts +25 -9
- package/dist/esm/v3/components/or-segmented-control-v3/partials/or-segmented-control-item/OrSegmentedControlItem.vue.d.ts +20 -8
- package/dist/esm/v3/components/or-select/OrSelect.vue.d.ts +77 -28
- package/dist/esm/v3/components/or-select/partials/OrSelectContent.vue.d.ts +49 -18
- package/dist/esm/v3/components/or-select/partials/OrSelectContentEmpty.vue.d.ts +16 -4
- package/dist/esm/v3/components/or-select/partials/OrSelectContentOptions.vue.d.ts +67 -13
- package/dist/esm/v3/components/or-select/partials/OrSelectInput.vue.d.ts +41 -16
- package/dist/esm/v3/components/or-select/partials/OrSelectInputValue.vue.d.ts +35 -16
- package/dist/esm/v3/components/or-select/partials/OrSelectMain.vue.d.ts +71 -24
- package/dist/esm/v3/components/or-select/partials/OrSelectOption.vue.d.ts +19 -7
- package/dist/esm/v3/components/or-select/partials/OrSelectSearchOptions.vue.d.ts +24 -11
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +115 -37
- package/dist/esm/v3/components/or-select-v3/index.js +1 -1
- package/dist/esm/v3/components/or-sidebar/OrSidebar.vue.d.ts +33 -14
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +63 -28
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +23 -10
- package/dist/esm/v3/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.vue.d.ts +20 -9
- package/dist/esm/v3/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.vue.d.ts +22 -9
- package/dist/esm/v3/components/or-skeleton/or-skeleton-text/OrSkeletonText.vue.d.ts +26 -10
- package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-circle-v3/OrSkeletonCircle.vue.d.ts +28 -13
- package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-rect-v3/OrSkeletonRect.vue.d.ts +26 -11
- package/dist/esm/v3/components/or-skeleton-v3/or-skeleton-text-v3/OrSkeletonText.vue.d.ts +40 -16
- package/dist/esm/v3/components/or-slider/OrSlider.vue.d.ts +91 -35
- package/dist/esm/v3/components/or-sort-header-v3/OrSortHeader.vue.d.ts +25 -13
- package/dist/esm/v3/components/or-stepper/OrStepper.vue.d.ts +43 -16
- package/dist/esm/v3/components/or-stepper/partials/OrStepperButtonOptions.vue.d.ts +20 -4
- package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionHorizontal.vue.d.ts +26 -4
- package/dist/esm/v3/components/or-stepper/partials/OrStepperOptionVertical.vue.d.ts +26 -4
- package/dist/esm/v3/components/or-stepper/partials/OrStepperTitle.vue.d.ts +22 -6
- package/dist/esm/v3/components/or-stepper/partials/StatusIcon.vue.d.ts +12 -6
- package/dist/esm/v3/components/or-switch/OrSwitch.vue.d.ts +33 -12
- package/dist/esm/v3/components/or-switch-v3/OrSwitch.vue.d.ts +53 -22
- package/dist/esm/v3/components/or-tab/OrTab.vue.d.ts +22 -9
- package/dist/esm/v3/components/or-tab-header-item/OrTabHeaderItem.vue.d.ts +29 -13
- package/dist/esm/v3/components/or-tab-v3/OrTab.vue.d.ts +17 -10
- package/dist/esm/v3/components/or-tabs/OrTabs.vue.d.ts +17 -4
- package/dist/esm/v3/components/or-tabs-v3/OrTabs.vue.d.ts +69 -24
- package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +27 -10
- package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +23 -12
- package/dist/esm/v3/components/or-teleport/OrTeleport.vue3.vue.d.ts +10 -4
- package/dist/esm/v3/components/or-teleport-v3/OrTeleport.vue3.vue.d.ts +10 -4
- package/dist/esm/v3/components/or-text-v3/OrText.vue.d.ts +24 -11
- package/dist/esm/v3/components/or-textarea/OrTextarea.vue.d.ts +85 -37
- package/dist/esm/v3/components/or-textarea-v3/OrTextarea.vue.d.ts +73 -32
- package/dist/esm/v3/components/or-textbox/OrTextbox.vue.d.ts +137 -55
- package/dist/esm/v3/components/or-time-picker-v3/OrTimePicker.vue.d.ts +79 -25
- package/dist/esm/v3/components/or-toast/OrToast.vue.d.ts +31 -11
- package/dist/esm/v3/components/or-toast/or-toast-container/OrToastContainer.vue.d.ts +55 -25
- package/dist/esm/v3/components/or-toast-v3/OrToast.vue.d.ts +38 -16
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +54 -24
- package/dist/esm/v3/components/or-tooltip/OrTooltip.vue.d.ts +33 -14
- package/dist/esm/v3/components/or-tooltip/or-tooltip-content/OrTooltipContent.vue.d.ts +10 -4
- package/dist/esm/v3/components/or-tooltip-v3/OrTooltip.vue.d.ts +37 -13
- package/dist/esm/v3/directives/dropdown-close.d.ts +1 -3
- package/dist/esm/v3/directives/dropdown-open.d.ts +1 -3
- package/dist/esm/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
- package/dist/esm/v3/index.js +25 -1
- package/package.json +25 -5
- package/src/components/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.docs.mdx +7 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +123 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +722 -0
- package/src/components/or-rich-text-editor-v3/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/styles.ts +55 -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 +117 -0
- package/src/components/or-select-v3/OrSelect.stories3.ts +1 -39
- package/src/components/or-select-v3/OrSelect.vue +0 -1
- /package/dist/bundled/v2/{index-968c331a.js → index-f6664cb1.js} +0 -0
- /package/dist/bundled/v3/{index-968c331a.js → index-f6664cb1.js} +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { ComponentPublicInstance } from 'vue-demi';
|
|
2
|
+
import { Editor } from '@tiptap/core';
|
|
3
|
+
import { Level } from '@tiptap/extension-heading';
|
|
4
|
+
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
5
|
+
editor: Editor | null;
|
|
6
|
+
editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
7
|
+
toolbarRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
8
|
+
containerRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
9
|
+
toolbarButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
10
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
11
|
+
} | string[], {} & {}, {
|
|
12
|
+
[x: number]: string;
|
|
13
|
+
} | {}, true> | undefined>;
|
|
14
|
+
moreButtonRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
15
|
+
moreRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
16
|
+
menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
17
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
18
|
+
} | string[], {} & {}, {
|
|
19
|
+
[x: number]: string;
|
|
20
|
+
} | {}, true> | undefined>;
|
|
21
|
+
iconsEnum: import("@vue/composition-api").Ref<{
|
|
22
|
+
[x: string]: string;
|
|
23
|
+
}>;
|
|
24
|
+
handleToolbarClick: (item: string, level?: number) => void;
|
|
25
|
+
handleEditorClick: () => void;
|
|
26
|
+
isActive: import("@vue/composition-api").Ref<{
|
|
27
|
+
[x: string]: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
iconTooltipsEnum: import("@vue/composition-api").Ref<{
|
|
30
|
+
[x: string]: string;
|
|
31
|
+
}>;
|
|
32
|
+
containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
33
|
+
toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
34
|
+
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
35
|
+
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
36
|
+
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
37
|
+
editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
38
|
+
getIndexOfHeading: import("@vue/composition-api").ComputedRef<number>;
|
|
39
|
+
headingLevels: Level[];
|
|
40
|
+
headingIcon: import("@vue/composition-api").ComputedRef<string>;
|
|
41
|
+
attachLink: () => Promise<void>;
|
|
42
|
+
discardLink: () => void;
|
|
43
|
+
isOpenLinkModal: import("@vue/composition-api").Ref<boolean>;
|
|
44
|
+
text: import("@vue/composition-api").Ref<string>;
|
|
45
|
+
link: import("@vue/composition-api").Ref<string>;
|
|
46
|
+
isFocused: import("@vue/composition-api").Ref<boolean>;
|
|
47
|
+
isVisible: (value: string | Array<string>) => boolean;
|
|
48
|
+
countOfNotVisibleTools: import("@vue/composition-api").Ref<number>;
|
|
49
|
+
notVisibleTools: import("@vue/composition-api").ComputedRef<string[]>;
|
|
50
|
+
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
51
|
+
modelValue: {
|
|
52
|
+
type: StringConstructor;
|
|
53
|
+
default: undefined;
|
|
54
|
+
};
|
|
55
|
+
toolbar: {
|
|
56
|
+
type: {
|
|
57
|
+
(arrayLength: number): string[][];
|
|
58
|
+
(...items: string[][]): string[][];
|
|
59
|
+
new (arrayLength: number): string[][];
|
|
60
|
+
new (...items: string[][]): string[][];
|
|
61
|
+
isArray(arg: any): arg is any[];
|
|
62
|
+
readonly prototype: any[];
|
|
63
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
64
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
65
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
66
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
67
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
68
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
69
|
+
};
|
|
70
|
+
default: () => never[];
|
|
71
|
+
};
|
|
72
|
+
description: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
placeholder: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
autofocus: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
format: {
|
|
85
|
+
type: StringConstructor;
|
|
86
|
+
default: string;
|
|
87
|
+
};
|
|
88
|
+
fullHeight: {
|
|
89
|
+
type: BooleanConstructor;
|
|
90
|
+
default: boolean;
|
|
91
|
+
};
|
|
92
|
+
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
93
|
+
modelValue: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: undefined;
|
|
96
|
+
};
|
|
97
|
+
toolbar: {
|
|
98
|
+
type: {
|
|
99
|
+
(arrayLength: number): string[][];
|
|
100
|
+
(...items: string[][]): string[][];
|
|
101
|
+
new (arrayLength: number): string[][];
|
|
102
|
+
new (...items: string[][]): string[][];
|
|
103
|
+
isArray(arg: any): arg is any[];
|
|
104
|
+
readonly prototype: any[];
|
|
105
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
106
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
107
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
108
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
109
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
110
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
111
|
+
};
|
|
112
|
+
default: () => never[];
|
|
113
|
+
};
|
|
114
|
+
description: {
|
|
115
|
+
type: StringConstructor;
|
|
116
|
+
default: string;
|
|
117
|
+
};
|
|
118
|
+
placeholder: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
default: string;
|
|
121
|
+
};
|
|
122
|
+
autofocus: {
|
|
123
|
+
type: BooleanConstructor;
|
|
124
|
+
default: boolean;
|
|
125
|
+
};
|
|
126
|
+
format: {
|
|
127
|
+
type: StringConstructor;
|
|
128
|
+
default: string;
|
|
129
|
+
};
|
|
130
|
+
fullHeight: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
default: boolean;
|
|
133
|
+
};
|
|
134
|
+
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
135
|
+
modelValue: string;
|
|
136
|
+
toolbar: string[][];
|
|
137
|
+
description: string;
|
|
138
|
+
placeholder: string;
|
|
139
|
+
autofocus: boolean;
|
|
140
|
+
format: string;
|
|
141
|
+
fullHeight: boolean;
|
|
142
|
+
} & {} & {
|
|
143
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
144
|
+
}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
145
|
+
editor: Editor | null;
|
|
146
|
+
editorRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
147
|
+
toolbarRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
148
|
+
containerRef: import("@vue/composition-api").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false> | undefined>;
|
|
149
|
+
toolbarButtonRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
150
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
151
|
+
} | string[], {} & {}, {
|
|
152
|
+
[x: number]: string;
|
|
153
|
+
} | {}, true> | undefined>;
|
|
154
|
+
moreButtonRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
155
|
+
moreRef: import("@vue/composition-api").Ref<HTMLDivElement | undefined>;
|
|
156
|
+
menuRef: import("@vue/composition-api").Ref<import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
157
|
+
[x: string]: ((...args: any[]) => any) | null;
|
|
158
|
+
} | string[], {} & {}, {
|
|
159
|
+
[x: number]: string;
|
|
160
|
+
} | {}, true> | undefined>;
|
|
161
|
+
iconsEnum: import("@vue/composition-api").Ref<{
|
|
162
|
+
[x: string]: string;
|
|
163
|
+
}>;
|
|
164
|
+
handleToolbarClick: (item: string, level?: number) => void;
|
|
165
|
+
handleEditorClick: () => void;
|
|
166
|
+
isActive: import("@vue/composition-api").Ref<{
|
|
167
|
+
[x: string]: boolean;
|
|
168
|
+
}>;
|
|
169
|
+
iconTooltipsEnum: import("@vue/composition-api").Ref<{
|
|
170
|
+
[x: string]: string;
|
|
171
|
+
}>;
|
|
172
|
+
containerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
173
|
+
toolbarContainerStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
174
|
+
toolbarStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
175
|
+
rootStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
176
|
+
root: import("@vue/composition-api").Ref<HTMLElement | undefined>;
|
|
177
|
+
editorInputStyles: import("@vue/composition-api").ComputedRef<string[]>;
|
|
178
|
+
getIndexOfHeading: import("@vue/composition-api").ComputedRef<number>;
|
|
179
|
+
headingLevels: Level[];
|
|
180
|
+
headingIcon: import("@vue/composition-api").ComputedRef<string>;
|
|
181
|
+
attachLink: () => Promise<void>;
|
|
182
|
+
discardLink: () => void;
|
|
183
|
+
isOpenLinkModal: import("@vue/composition-api").Ref<boolean>;
|
|
184
|
+
text: import("@vue/composition-api").Ref<string>;
|
|
185
|
+
link: import("@vue/composition-api").Ref<string>;
|
|
186
|
+
isFocused: import("@vue/composition-api").Ref<boolean>;
|
|
187
|
+
isVisible: (value: string | Array<string>) => boolean;
|
|
188
|
+
countOfNotVisibleTools: import("@vue/composition-api").Ref<number>;
|
|
189
|
+
notVisibleTools: import("@vue/composition-api").ComputedRef<string[]>;
|
|
190
|
+
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
191
|
+
modelValue: string;
|
|
192
|
+
toolbar: string[][];
|
|
193
|
+
description: string;
|
|
194
|
+
placeholder: string;
|
|
195
|
+
autofocus: boolean;
|
|
196
|
+
format: string;
|
|
197
|
+
fullHeight: boolean;
|
|
198
|
+
} & {} & {
|
|
199
|
+
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
modelValue: string;
|
|
202
|
+
toolbar: string[][];
|
|
203
|
+
description: string;
|
|
204
|
+
placeholder: string;
|
|
205
|
+
autofocus: boolean;
|
|
206
|
+
format: string;
|
|
207
|
+
fullHeight: boolean;
|
|
208
|
+
}, true>);
|
|
209
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrRichTextEditorV3 } from './OrRichTextEditor.vue';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export { default as OrRichTextEditorV3 } from './OrRichTextEditor.js';
|
|
2
|
+
import 'vue-demi';
|
|
3
|
+
import '../../useFocusTrap-48767a70.js';
|
|
4
|
+
import '@vueuse/core';
|
|
5
|
+
import '../../markdown-d704b3a8.js';
|
|
6
|
+
import '../../index-85c2efe8.js';
|
|
7
|
+
import 'node:punycode';
|
|
8
|
+
import '../../index-1182caa8.js';
|
|
9
|
+
import '../../index.es-3f39f316.js';
|
|
10
|
+
import './styles.js';
|
|
11
|
+
import './utils/codemirror/codemirrorNode.js';
|
|
12
|
+
import './utils/codemirror/codemirrorView.js';
|
|
13
|
+
import '../../index-0d224ae5.js';
|
|
14
|
+
import './utils/codemirror/theme.js';
|
|
15
|
+
import '../../index-d92d0b48.js';
|
|
16
|
+
import '../../index-e9f6b2d8.js';
|
|
17
|
+
import '../OrIconButtonV3/OrIconButton.js';
|
|
18
|
+
import '../OrIconButtonV3/props.js';
|
|
19
|
+
import '../OrIconV3/props.js';
|
|
20
|
+
import '../OrIconButtonV3/styles.js';
|
|
21
|
+
import '../OrIconV3/OrIcon.js';
|
|
22
|
+
import '../OrIconV3/styles.js';
|
|
23
|
+
import '../../normalize-component-6e8e3d80.js';
|
|
24
|
+
import '../OrTooltipV3/OrTooltip.js';
|
|
25
|
+
import '../OrTooltipV3/styles.js';
|
|
26
|
+
import '../OrPopoverV3/OrPopover.js';
|
|
27
|
+
import '../../floating-ui.dom.esm-83eba816.js';
|
|
28
|
+
import '../OrPopoverV3/props.js';
|
|
29
|
+
import '../OrPopoverV3/styles.js';
|
|
30
|
+
import '../OrBottomSheetV3/OrBottomSheet.js';
|
|
31
|
+
import '../OrBottomSheetV3/props.js';
|
|
32
|
+
import '../OrBottomSheetV3/styles.js';
|
|
33
|
+
import '../OrOverlayV3/OrOverlay.js';
|
|
34
|
+
import '../OrOverlayV3/styles.js';
|
|
35
|
+
import '../OrTeleportV3/OrTeleport.js';
|
|
36
|
+
import 'portal-vue';
|
|
37
|
+
import '../../hooks/useElevation.js';
|
|
38
|
+
import '../../utils/isVisible.js';
|
|
39
|
+
import '../../hooks/useResponsive/useResponsive.js';
|
|
40
|
+
import '../OrLabelV3/OrLabel.js';
|
|
41
|
+
import '../OrLabelV3/props.js';
|
|
42
|
+
import '../OrLabelV3/styles.js';
|
|
43
|
+
import '../OrMenuItemV3/OrMenuItem.js';
|
|
44
|
+
import '../OrMenuItemV3/styles.js';
|
|
45
|
+
import '../OrMenuV3/OrMenu.js';
|
|
46
|
+
import '../OrMenuV3/styles.js';
|
|
47
|
+
import '../OrModalV3/OrModal.js';
|
|
48
|
+
import '../OrModalV3/props.js';
|
|
49
|
+
import '../OrModalV3/styles.js';
|
|
50
|
+
import '../OrInputV3/OrInput.js';
|
|
51
|
+
import '../OrInputV3/props.js';
|
|
52
|
+
import '../OrInputBoxV3/props.js';
|
|
53
|
+
import '../OrInputV3/styles.js';
|
|
54
|
+
import '../OrErrorV3/OrError.js';
|
|
55
|
+
import '../OrErrorV3/styles.js';
|
|
56
|
+
import '../OrHintV3/OrHint.js';
|
|
57
|
+
import '../OrHintV3/styles.js';
|
|
58
|
+
import '../OrInputBoxV3/OrInputBox.js';
|
|
59
|
+
import '../OrInputBoxV3/styles.js';
|
|
60
|
+
import '../OrLoaderV3/OrLoader.js';
|
|
61
|
+
import '../OrLoaderV3/props.js';
|
|
62
|
+
import '../OrLoaderV3/styles.js';
|
|
63
|
+
import '../../hooks/useIdAttribute.js';
|
|
64
|
+
import '../../hooks/useControlAttributes.js';
|
|
65
|
+
import '../../hooks/useValidationAttributes.js';
|
|
66
|
+
import '../../style-inject.es-4c6f2515.js';
|
|
67
|
+
import '../OrButtonV3/OrButton.js';
|
|
68
|
+
import '../OrButtonV3/props.js';
|
|
69
|
+
import '../OrButtonV3/styles.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const EditorContainer: string[];
|
|
2
|
+
export declare const ToolbarContainer: string[];
|
|
3
|
+
export declare const Toolbar: string[];
|
|
4
|
+
export declare const ToolbarButton: string[];
|
|
5
|
+
export declare const ToolbarButtonFocused: string[];
|
|
6
|
+
export declare const EditorInput: string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const EditorContainer = [
|
|
2
|
+
// Colors
|
|
3
|
+
'border-outline', 'focus-within:theme-border-1-primary', 'focus-within:bg-primary-opacity-0-08', 'focus-within:theme-outline-primary',
|
|
4
|
+
// Sizing
|
|
5
|
+
'border-1', 'rounded-md', 'w-full'];
|
|
6
|
+
const ToolbarContainer = [
|
|
7
|
+
// Layout
|
|
8
|
+
'flex',
|
|
9
|
+
//Spacing
|
|
10
|
+
'py-sm',
|
|
11
|
+
//Sizing
|
|
12
|
+
'border-b-1',
|
|
13
|
+
//Colors
|
|
14
|
+
'border-b-outline'];
|
|
15
|
+
const Toolbar = [
|
|
16
|
+
// Layout
|
|
17
|
+
'flex',
|
|
18
|
+
// Spacing
|
|
19
|
+
'px-sm', 'gap-md',
|
|
20
|
+
// Sizing
|
|
21
|
+
'border-l-1',
|
|
22
|
+
//Colors
|
|
23
|
+
'border-r-disabled',
|
|
24
|
+
// Last child
|
|
25
|
+
'first-of-type:border-none'];
|
|
26
|
+
const ToolbarButton = [
|
|
27
|
+
// Typography
|
|
28
|
+
'text-on-disabled'];
|
|
29
|
+
const ToolbarButtonFocused = [
|
|
30
|
+
// Typography
|
|
31
|
+
'text-outline'];
|
|
32
|
+
const EditorInput = [
|
|
33
|
+
// Typography
|
|
34
|
+
'typography-body-2-regular', 'text-on-background',
|
|
35
|
+
// Sizing
|
|
36
|
+
'min-h-[88px]'];
|
|
37
|
+
|
|
38
|
+
export { EditorContainer, EditorInput, Toolbar, ToolbarButton, ToolbarButtonFocused, ToolbarContainer };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { N as Node } from '../../../../index-1182caa8.js';
|
|
2
|
+
import CodeMirrorView from './codemirrorView.js';
|
|
3
|
+
import { m as minimalSetup } from '../../../../index-d92d0b48.js';
|
|
4
|
+
import { e as javascript } from '../../../../index-e9f6b2d8.js';
|
|
5
|
+
import '../../../../index-85c2efe8.js';
|
|
6
|
+
import '../../../../index.es-3f39f316.js';
|
|
7
|
+
import '../../../../index-0d224ae5.js';
|
|
8
|
+
import './theme.js';
|
|
9
|
+
|
|
10
|
+
var codemirrorNode = Node.create({
|
|
11
|
+
name: 'codeBlock',
|
|
12
|
+
content: 'text*',
|
|
13
|
+
marks: '',
|
|
14
|
+
group: 'block',
|
|
15
|
+
code: true,
|
|
16
|
+
defining: true,
|
|
17
|
+
isolating: true,
|
|
18
|
+
parseHTML() {
|
|
19
|
+
return [{
|
|
20
|
+
tag: 'pre',
|
|
21
|
+
preserveWhitespace: 'full'
|
|
22
|
+
}];
|
|
23
|
+
},
|
|
24
|
+
renderHTML() {
|
|
25
|
+
return ['pre', ['code', 0]];
|
|
26
|
+
},
|
|
27
|
+
addNodeView() {
|
|
28
|
+
return _ref => {
|
|
29
|
+
let {
|
|
30
|
+
node,
|
|
31
|
+
editor,
|
|
32
|
+
getPos
|
|
33
|
+
} = _ref;
|
|
34
|
+
return new CodeMirrorView({
|
|
35
|
+
node,
|
|
36
|
+
view: editor.view,
|
|
37
|
+
getPos: getPos,
|
|
38
|
+
cmOptions: {
|
|
39
|
+
extensions: [minimalSetup, javascript()]
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export { codemirrorNode as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TextSelection } from 'prosemirror-state';
|
|
2
|
+
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
|
+
import { Node as ProsemirrorNode } from 'prosemirror-model';
|
|
4
|
+
import { Transaction as CMTransaction } from '@codemirror/state';
|
|
5
|
+
import { Command, EditorView as CMView } from '@codemirror/view';
|
|
6
|
+
import { CodeMirrorViewOptions } from './types';
|
|
7
|
+
declare class CodeMirrorView implements NodeView {
|
|
8
|
+
name: string;
|
|
9
|
+
node: ProsemirrorNode;
|
|
10
|
+
view: EditorView;
|
|
11
|
+
dom: HTMLElement;
|
|
12
|
+
cm: CMView;
|
|
13
|
+
getPos: () => number;
|
|
14
|
+
updating: boolean;
|
|
15
|
+
constructor(options: CodeMirrorViewOptions);
|
|
16
|
+
forwardSelection(): void;
|
|
17
|
+
asProseMirrorSelection(doc: ProsemirrorNode): TextSelection;
|
|
18
|
+
dispatch(cmTr: CMTransaction): void;
|
|
19
|
+
mayBeEscape(unit: 'char' | 'line', dir: -1 | 1): Command;
|
|
20
|
+
update(node: ProsemirrorNode): boolean;
|
|
21
|
+
setSelection(anchor: number, head: number): void;
|
|
22
|
+
focus(): void;
|
|
23
|
+
selectNode(): void;
|
|
24
|
+
stopEvent(): boolean;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
27
|
+
export default CodeMirrorView;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { n as exitCode, T as TextSelection, S as Selection } from '../../../../index-85c2efe8.js';
|
|
2
|
+
import { a as EditorState, E as EditorView, Y as highlightActiveLine, B as highlightActiveLineGutter, z as lineNumbers, k as keymap } from '../../../../index-0d224ae5.js';
|
|
3
|
+
import theme from './theme.js';
|
|
4
|
+
import '../../../../index.es-3f39f316.js';
|
|
5
|
+
|
|
6
|
+
const computeChange = (oldVal, newVal) => {
|
|
7
|
+
if (oldVal === newVal) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
let start = 0;
|
|
11
|
+
let oldEnd = oldVal.length;
|
|
12
|
+
let newEnd = newVal.length;
|
|
13
|
+
while (start < oldEnd && oldVal.charCodeAt(start) === newVal.charCodeAt(start)) {
|
|
14
|
+
start += 1;
|
|
15
|
+
}
|
|
16
|
+
while (oldEnd > start && newEnd > start && oldVal.charCodeAt(oldEnd - 1) === newVal.charCodeAt(newEnd - 1)) {
|
|
17
|
+
oldEnd -= 1;
|
|
18
|
+
newEnd -= 1;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
from: start,
|
|
22
|
+
to: oldEnd,
|
|
23
|
+
text: newVal.slice(start, newEnd)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
class CodeMirrorView {
|
|
27
|
+
constructor(options) {
|
|
28
|
+
var _a;
|
|
29
|
+
this.updating = false;
|
|
30
|
+
// Store for later
|
|
31
|
+
this.node = options.node;
|
|
32
|
+
this.view = options.view;
|
|
33
|
+
const cmExtensions = ((_a = options.cmOptions) === null || _a === void 0 ? void 0 : _a.extensions) || [];
|
|
34
|
+
this.name = 'codeBlock', this.getPos = options.getPos;
|
|
35
|
+
const changeFilter = EditorState.changeFilter.of(tr => {
|
|
36
|
+
if (!tr.docChanged && !this.updating) {
|
|
37
|
+
this.forwardSelection();
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
});
|
|
41
|
+
// Create a CodeMirror instancew
|
|
42
|
+
this.cm = new EditorView({
|
|
43
|
+
dispatch: this.dispatch.bind(this)
|
|
44
|
+
});
|
|
45
|
+
// The editor's outer node is our DOM representation
|
|
46
|
+
this.dom = this.cm.dom;
|
|
47
|
+
const cmState = EditorState.create({
|
|
48
|
+
doc: this.node.textContent,
|
|
49
|
+
extensions: [theme, changeFilter, highlightActiveLine(), highlightActiveLineGutter(), lineNumbers(), keymap.of([{
|
|
50
|
+
key: 'ArrowUp',
|
|
51
|
+
run: this.mayBeEscape('line', -1)
|
|
52
|
+
}, {
|
|
53
|
+
key: 'ArrowLeft',
|
|
54
|
+
run: this.mayBeEscape('char', -1)
|
|
55
|
+
}, {
|
|
56
|
+
key: 'ArrowDown',
|
|
57
|
+
run: this.mayBeEscape('line', 1)
|
|
58
|
+
}, {
|
|
59
|
+
key: 'ArrowRight',
|
|
60
|
+
run: this.mayBeEscape('char', 1)
|
|
61
|
+
}, {
|
|
62
|
+
key: 'Ctrl-Enter',
|
|
63
|
+
run: () => {
|
|
64
|
+
if (exitCode(this.view.state, this.view.dispatch)) {
|
|
65
|
+
this.view.focus();
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}]), cmExtensions]
|
|
71
|
+
});
|
|
72
|
+
this.cm.setState(cmState);
|
|
73
|
+
}
|
|
74
|
+
forwardSelection() {
|
|
75
|
+
if (!this.cm.hasFocus) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const {
|
|
79
|
+
state
|
|
80
|
+
} = this.view;
|
|
81
|
+
const selection = this.asProseMirrorSelection(state.doc);
|
|
82
|
+
if (!selection.eq(state.selection)) {
|
|
83
|
+
this.view.dispatch(state.tr.setSelection(selection));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
asProseMirrorSelection(doc) {
|
|
87
|
+
const offset = this.getPos() + 1;
|
|
88
|
+
const {
|
|
89
|
+
anchor,
|
|
90
|
+
head
|
|
91
|
+
} = this.cm.state.selection.main;
|
|
92
|
+
return TextSelection.create(doc, anchor + offset, head + offset);
|
|
93
|
+
}
|
|
94
|
+
dispatch(cmTr) {
|
|
95
|
+
this.cm.setState(cmTr.state);
|
|
96
|
+
if (cmTr.docChanged && !this.updating) {
|
|
97
|
+
const start = this.getPos() + 1;
|
|
98
|
+
const cmValue = cmTr.state.doc.toString();
|
|
99
|
+
const change = computeChange(this.node.textContent, cmValue);
|
|
100
|
+
if (!change) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const content = change.text ? this.view.state.schema.text(change.text) : null;
|
|
104
|
+
const tr = this.view.state.tr.replaceWith(change.from + start, change.to + start, content);
|
|
105
|
+
this.view.dispatch(tr);
|
|
106
|
+
this.forwardSelection();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
mayBeEscape(unit, dir) {
|
|
110
|
+
return view => {
|
|
111
|
+
const {
|
|
112
|
+
state
|
|
113
|
+
} = view;
|
|
114
|
+
const {
|
|
115
|
+
selection
|
|
116
|
+
} = state;
|
|
117
|
+
const offsetToPos = () => {
|
|
118
|
+
const offset = selection.main.from;
|
|
119
|
+
const line = state.doc.lineAt(offset);
|
|
120
|
+
return {
|
|
121
|
+
line: line.number,
|
|
122
|
+
ch: offset - line.from
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
const pos = offsetToPos();
|
|
126
|
+
const hasSelection = state.selection.ranges.some(r => !r.empty);
|
|
127
|
+
const firstLine = 1;
|
|
128
|
+
const lastLine = state.doc.lineAt(state.doc.length).number;
|
|
129
|
+
if (hasSelection || pos.line !== (dir < 0 ? firstLine : lastLine) || unit === 'char' && pos.ch !== (dir < 0 ? 0 : state.doc.line(pos.line).length)) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const targetPos = this.getPos() + (dir < 0 ? 0 : this.node.nodeSize);
|
|
133
|
+
const pmSelection = Selection.near(this.view.state.doc.resolve(targetPos), dir);
|
|
134
|
+
this.view.dispatch(this.view.state.tr.setSelection(pmSelection).scrollIntoView());
|
|
135
|
+
this.view.focus();
|
|
136
|
+
return true;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
update(node) {
|
|
140
|
+
if (node.type !== this.node.type) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
this.node = node;
|
|
144
|
+
const change = computeChange(this.cm.state.doc.toString(), node.textContent);
|
|
145
|
+
if (change) {
|
|
146
|
+
this.updating = true;
|
|
147
|
+
this.cm.dispatch({
|
|
148
|
+
changes: {
|
|
149
|
+
from: change.from,
|
|
150
|
+
to: change.to,
|
|
151
|
+
insert: change.text
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.updating = false;
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
setSelection(anchor, head) {
|
|
159
|
+
this.focus();
|
|
160
|
+
this.updating = true;
|
|
161
|
+
this.cm.dispatch({
|
|
162
|
+
selection: {
|
|
163
|
+
anchor,
|
|
164
|
+
head
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
this.updating = false;
|
|
168
|
+
}
|
|
169
|
+
focus() {
|
|
170
|
+
this.cm.focus();
|
|
171
|
+
this.forwardSelection();
|
|
172
|
+
}
|
|
173
|
+
selectNode() {
|
|
174
|
+
this.focus();
|
|
175
|
+
}
|
|
176
|
+
stopEvent() {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
destroy() {
|
|
180
|
+
this.cm.destroy();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export { CodeMirrorView as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CodeMirrorView } from './codemirrorView';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Extension } from '@codemirror/state';
|
|
2
|
+
import { HighlightStyle } from '@codemirror/language';
|
|
3
|
+
export declare const color: {
|
|
4
|
+
chalky: string;
|
|
5
|
+
coral: string;
|
|
6
|
+
cyan: string;
|
|
7
|
+
invalid: string;
|
|
8
|
+
ivory: string;
|
|
9
|
+
stone: string;
|
|
10
|
+
malibu: string;
|
|
11
|
+
sage: string;
|
|
12
|
+
whiskey: string;
|
|
13
|
+
violet: string;
|
|
14
|
+
darkBackground: string;
|
|
15
|
+
highlightBackground: string;
|
|
16
|
+
background: string;
|
|
17
|
+
tooltipBackground: string;
|
|
18
|
+
selection: string;
|
|
19
|
+
cursor: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const orCodeTheme: Extension;
|
|
22
|
+
export declare const orCodeHighlightStyle: HighlightStyle;
|
|
23
|
+
declare const theme: Extension;
|
|
24
|
+
export default theme;
|