@onereach/ui-components 6.2.0-beta.3320.0 → 6.2.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-2250dbc9.js} +1 -1
- package/dist/bundled/v2/{_baseIsEqual-a1cc156c.js → _baseIsEqual-fe2002b6.js} +5 -5
- package/dist/bundled/v2/_commonjsHelpers-1789f0cf.js +7 -0
- package/dist/bundled/v2/components/OrBottomSheetV3/OrBottomSheet.js +1 -1
- package/dist/bundled/v2/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
- package/dist/bundled/v2/components/OrCheckboxTreeV3/OrCheckboxTree.js +1 -1
- package/dist/bundled/v2/components/OrCode/OrCode.js +3 -3
- package/dist/bundled/v2/components/OrCode/index.js +3 -4
- package/dist/bundled/v2/components/OrCode/lang.js +3 -5
- package/dist/bundled/v2/components/OrCode/libs.js +3 -4
- package/dist/bundled/v2/components/OrCode/theme.js +1 -1
- package/dist/bundled/v2/components/OrCodeV3/OrCode.js +30 -46
- package/dist/bundled/v2/components/OrCodeV3/OrCode.vue.d.ts +3 -4
- package/dist/bundled/v2/components/OrCollapse/OrCollapse.js +1 -1
- package/dist/bundled/v2/components/OrColorPicker/OrColorPicker.js +2 -2
- package/dist/bundled/v2/components/OrConfirm/OrConfirm.js +3 -3
- package/dist/bundled/v2/components/OrConfirmV3/OrConfirm.js +3 -3
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +2 -2
- package/dist/bundled/v2/components/OrDateTimePicker/OrDateTimePicker.js +4 -4
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +3 -3
- package/dist/bundled/v2/components/OrFloating/OrFloating.js +1 -1
- package/dist/bundled/v2/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
- package/dist/bundled/v2/components/OrInput/OrInput.js +1 -1
- package/dist/bundled/v2/components/OrList/OrList.js +8 -8
- package/dist/bundled/v2/components/OrLoaderV3/OrLoader.js +1 -1
- package/dist/bundled/v2/components/OrModal/OrModal.js +3 -1347
- package/dist/bundled/v2/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
- package/dist/bundled/v2/components/OrOverlayV3/OrOverlay.js +1 -1
- package/dist/bundled/v2/components/OrPassword/OrPassword.js +1 -1
- package/dist/bundled/v2/components/OrPopoverV3/OrPopover.js +2 -2
- package/dist/bundled/v2/components/OrProgress/OrProgress.js +1 -1
- package/dist/bundled/v2/components/OrProgressV3/OrProgress.js +2 -2
- package/dist/bundled/v2/components/OrRadio/OrRadio.js +2 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +11640 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +194 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.d.ts +2 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/index.js +2 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/props.d.ts +5 -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 +42 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +183 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +17 -0
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/theme.js +199 -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 +2 -0
- package/dist/bundled/v2/components/OrSearch/OrSearch.js +1 -1
- package/dist/bundled/v2/components/OrSearchV3/OrSearch.js +1 -1
- package/dist/bundled/v2/components/OrSelect/OrSelect.js +7 -7
- package/dist/bundled/v2/components/OrSidebar/OrSidebar.js +1 -1
- package/dist/bundled/v2/components/OrSidebarV3/OrSidebar.js +1 -1
- package/dist/bundled/v2/components/OrSkeletonText/OrSkeletonText.js +1 -1
- package/dist/bundled/v2/components/OrSkeletonTextV3/OrSkeletonText.js +1 -1
- package/dist/bundled/v2/components/OrSlider/OrSlider.js +2 -2
- package/dist/bundled/v2/components/OrTabsV3/OrTabs.js +1 -1
- package/dist/bundled/v2/components/OrTextV3/OrText.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTextarea/OrTextarea.js +1 -1
- 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.js +1 -1
- package/dist/bundled/v2/components/OrTextbox/OrTextbox.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +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/OrToast/Timer.js +1 -1
- package/dist/bundled/v2/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v2/components/OrToastContainer/OrToastContainer.js +1 -1
- package/dist/bundled/v2/components/OrToastContainerV3/OrToastContainer.js +1 -1
- package/dist/bundled/v2/components/OrToastV3/OrToast.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v2/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v2/components/OrTooltip/OrTooltip.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTooltipV3/OrTooltip.vue.d.ts +2 -2
- package/dist/bundled/v2/components/OrTreeV3/OrTree.js +1 -1
- package/dist/bundled/v2/components/OrTreeV3/OrTree.vue.d.ts +2 -2
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +5 -4
- package/dist/bundled/{v3/dom-bb55b42a.js → v2/dom-cec392f3.js} +2 -2
- package/dist/bundled/v2/{eq-95cd2573.js → eq-44ea4d70.js} +1 -1
- package/dist/bundled/{v3/get-ab1b7d93.js → v2/get-34aa21f4.js} +3 -3
- package/dist/bundled/v2/hooks/useOverflow.js +2 -2
- package/dist/bundled/v2/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v2/hooks/useResponsive/useResponsive.js +1 -1
- package/dist/bundled/v2/{index-ec92055d.js → index-06f6bbe4.js} +1 -1
- package/dist/bundled/{v3/index-b71d76f4.js → v2/index-0c287ab6.js} +3 -3
- package/dist/bundled/v2/index-1b2cfcc1.js +9715 -0
- package/dist/bundled/v2/{index-509d77a1.js → index-2b20f5f5.js} +2 -2
- package/dist/bundled/v2/{index-61aeae22.js → index-3cae2d25.js} +3 -115
- package/dist/bundled/{v3/index-84ea2fc8.js → v2/index-3e178101.js} +471 -32
- package/dist/bundled/v2/index-666dfe59.js +4048 -0
- package/dist/bundled/v2/index-9444e0d2.js +115 -0
- package/dist/bundled/v2/{index-15e8c1f3.js → index-dac0fb7c.js} +1 -1
- package/dist/bundled/v2/{index-5ce3ef85.js → index-de4975a3.js} +14 -3
- package/dist/bundled/v2/index-f671afe5.js +7127 -0
- package/dist/bundled/v2/index.js +7 -6
- package/dist/bundled/{v3/isArrayLike-e46b8eac.js → v2/isArrayLike-e7fb5cae.js} +1 -1
- package/dist/bundled/v2/{isEqual-44382965.js → isEqual-7a8e6106.js} +1 -1
- package/dist/bundled/{v3/isObject-fe8b81fd.js → v2/isObject-b7415fc1.js} +1 -1
- package/dist/bundled/v2/markdown-119394e1.js +15365 -0
- package/dist/bundled/v2/{range-6f26eda4.js → range-82efa3d4.js} +4 -4
- package/dist/bundled/v2/{round-f34440f4.js → round-567ede34.js} +4 -4
- package/dist/bundled/{v3/toFinite-74227610.js → v2/toFinite-bc59ffb0.js} +1 -1
- package/dist/bundled/v2/{toInteger-2fd112a9.js → toInteger-9fa0151c.js} +1 -1
- package/dist/bundled/{v3/toString-f3196832.js → v2/toString-b6e4472a.js} +1 -1
- package/dist/bundled/{v3/OrModal.vue_vue_type_script_lang-7f46b47e.js → v2/useFocusTrap-d1b2c0b4.js} +4 -100
- package/dist/bundled/v2/utils/functions/dom.js +2 -2
- package/dist/bundled/v2/utils/index.js +1 -1
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-95fe92f9.js → OrAvatar.vue_vue_type_script_lang-10c2add0.js} +1 -1
- package/dist/bundled/v3/{OrBottomSheet.vue_vue_type_script_lang-4adbc880.js → OrBottomSheet.vue_vue_type_script_lang-aca902f2.js} +2 -2
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-9d4ac135.js → OrButton.vue_vue_type_script_lang-0fb2b270.js} +1 -1
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-22b24f8b.js → OrButton.vue_vue_type_script_lang-db6595f6.js} +1 -1
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-ac7e801f.js → OrCardCollection.vue_vue_type_script_lang-02606ec6.js} +3 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-3c786697.js → OrCardCollection.vue_vue_type_script_lang-bf9018d5.js} +3 -3
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-576b5f5d.js → OrCheckbox.vue_vue_type_script_lang-de28fcaf.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-ca6ba786.js → OrCheckboxGroup.vue_vue_type_script_lang-2d4980de.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-d3ed803b.js → OrCheckboxTree.vue_vue_type_script_lang-8d9ed718.js} +2 -2
- package/dist/bundled/v3/{OrChip.vue_vue_type_script_lang-8ccf3d2d.js → OrChip.vue_vue_type_script_lang-cacd81e5.js} +1 -1
- package/dist/bundled/v3/{OrChips.vue_vue_type_script_lang-70be98b5.js → OrChips.vue_vue_type_script_lang-e1f37564.js} +1 -1
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-8c5b4f6e.js → OrCode.vue_vue_type_script_lang-2300b956.js} +5 -5
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-b46a0f8a.js → OrCode.vue_vue_type_script_lang-52b0ab4c.js} +32 -48
- package/dist/bundled/v3/{OrCollapse.vue_vue_type_script_lang-69503c45.js → OrCollapse.vue_vue_type_script_lang-be1c8c66.js} +1 -1
- package/dist/bundled/v3/{OrColorPicker.vue_vue_type_script_lang-7b6d1e64.js → OrColorPicker.vue_vue_type_script_lang-95d92da0.js} +3 -3
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-1c8833a9.js → OrConfirm.vue_vue_type_script_lang-19922dd5.js} +6 -6
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-cd1e7075.js → OrConfirm.vue_vue_type_script_lang-4e9966f2.js} +6 -6
- package/dist/bundled/v3/{OrContextMenu.vue_vue_type_script_lang-db980d2e.js → OrContextMenu.vue_vue_type_script_lang-f40c0d92.js} +1 -1
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-715f99d5.js → OrDatePicker.vue_vue_type_script_lang-04273abb.js} +4 -4
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-94d71788.js → OrDateTimePicker.vue_vue_type_script_lang-66b3611e.js} +5 -5
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-2a292787.js → OrDateTimePicker.vue_vue_type_script_lang-73b5c809.js} +7 -7
- package/dist/bundled/v3/{OrDateTimePickerMonthSelect-f2744b4e.js → OrDateTimePickerMonthSelect-2ff0e8f9.js} +3 -3
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-daa7e47b.js → OrDateTimePickerPopoverHeader-135da975.js} +1 -1
- package/dist/bundled/v3/{OrDateTimePickerTimeSelect-96c4d657.js → OrDateTimePickerTimeSelect-fe701e75.js} +1 -1
- package/dist/bundled/v3/{OrFloating.vue_vue_type_script_lang-d579c010.js → OrFloating.vue_vue_type_script_lang-38aa1d83.js} +1 -1
- package/dist/bundled/v3/{OrIcon.vue_vue_type_script_lang-23dad121.js → OrIcon.vue_vue_type_script_lang-f3cbff23.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-e11abdcc.js → OrIconButton.vue_vue_type_script_lang-64e7b6ab.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-85c7ef74.js → OrIconButton.vue_vue_type_script_lang-f6bf7dda.js} +2 -2
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-120b4dae.js → OrInlineInput.vue_vue_type_script_lang-0bdbf730.js} +1 -1
- package/dist/bundled/v3/{OrInlineTextEdit.vue_vue_type_script_lang-e5151109.js → OrInlineTextEdit.vue_vue_type_script_lang-72c9e44e.js} +4 -4
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-ebe8d51d.js → OrInlineTextarea.vue_vue_type_script_lang-81430067.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-7d7ad741.js → OrInput.vue_vue_type_script_lang-39d1a293.js} +2 -2
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-863d3195.js → OrInput.vue_vue_type_script_lang-515ff78a.js} +2 -2
- package/dist/bundled/v3/{OrList.vue_vue_type_script_lang-cb637c9e.js → OrList.vue_vue_type_script_lang-bc49c1ff.js} +11 -11
- package/dist/bundled/v3/{OrListOfInputs.vue_vue_type_script_lang-31f604eb.js → OrListOfInputs.vue_vue_type_script_lang-3d17e3d2.js} +4 -4
- package/dist/bundled/v3/{OrLoader.vue_vue_type_script_lang-0395ad21.js → OrLoader.vue_vue_type_script_lang-0ea76e45.js} +1 -1
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-97b33dae.js → OrMenu.vue_vue_type_script_lang-edc12857.js} +1 -1
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-8d01d297.js → OrModal.vue_vue_type_script_lang-d2339f74.js} +2 -2
- package/dist/bundled/v3/OrModal.vue_vue_type_script_lang-f1e9175d.js +101 -0
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-17ae96e3.js → OrNotification.vue_vue_type_script_lang-81d7cfef.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-2bf01716.js → OrNotification.vue_vue_type_script_lang-8dafacd3.js} +1 -1
- package/dist/bundled/v3/{OrNumberInput.vue_vue_type_script_lang-4cc194fc.js → OrNumberInput.vue_vue_type_script_lang-b832e611.js} +1 -1
- package/dist/bundled/v3/{OrOverflowMenu.vue_vue_type_script_lang-f8e4a5b8.js → OrOverflowMenu.vue_vue_type_script_lang-0c84fa14.js} +5 -5
- package/dist/bundled/v3/{OrOverlay.vue_vue_type_script_lang-2da128a3.js → OrOverlay.vue_vue_type_script_lang-2b256188.js} +1 -1
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-729c913f.js → OrPagination.vue_vue_type_script_lang-91dec212.js} +2 -2
- package/dist/bundled/v3/{OrPassword.vue_vue_type_script_lang-e85c91c4.js → OrPassword.vue_vue_type_script_lang-9228b54e.js} +3 -3
- package/dist/bundled/v3/{OrPopover.vue_vue_type_script_lang-3aed1b31.js → OrPopover.vue_vue_type_script_lang-2fba84de.js} +3 -3
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-32e6da23.js → OrProgress.vue_vue_type_script_lang-56b4a5da.js} +2 -2
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-a99362ae.js → OrProgress.vue_vue_type_script_lang-c4bd7133.js} +1 -1
- package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-3a551734.js → OrRadio.vue_vue_type_script_lang-a4f043e9.js} +2 -2
- package/dist/bundled/v3/OrRichTextEditor.vue_vue_type_script_lang-b01b8ae3.js +11380 -0
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-8470f57f.js → OrSearch.vue_vue_type_script_lang-47c2a5b0.js} +2 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-57162ecf.js → OrSearch.vue_vue_type_script_lang-6a34ea7a.js} +3 -3
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-e2818b8e.js → OrSelect.vue_vue_type_script_lang-0edae1cf.js} +11 -11
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-d95a1d66.js → OrSelect.vue_vue_type_script_lang-8b59bb49.js} +5 -5
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-81941fe6.js → OrSidebar.vue_vue_type_script_lang-bd864765.js} +1 -1
- package/dist/bundled/v3/{OrSidebar.vue_vue_type_script_lang-b12bca44.js → OrSidebar.vue_vue_type_script_lang-cb96511d.js} +2 -2
- package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-26b3cfd1.js → OrSkeletonText.vue_vue_type_script_lang-502607ef.js} +1 -1
- package/dist/bundled/v3/{OrSkeletonText.vue_vue_type_script_lang-c2a5ab96.js → OrSkeletonText.vue_vue_type_script_lang-cfe360bb.js} +1 -1
- package/dist/bundled/v3/{OrSlider.vue_vue_type_script_lang-1632008b.js → OrSlider.vue_vue_type_script_lang-79cca9e2.js} +3 -3
- package/dist/bundled/v3/{OrSorting.vue_vue_type_script_lang-115be0a4.js → OrSorting.vue_vue_type_script_lang-8ea37e10.js} +2 -2
- package/dist/bundled/v3/{OrStepper.vue_vue_type_script_lang-c7f9582b.js → OrStepper.vue_vue_type_script_lang-33639493.js} +1 -1
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-a2f28112.js → OrSwitch.vue_vue_type_script_lang-fe6a5512.js} +1 -1
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-e90c3291.js → OrTabs.vue_vue_type_script_lang-97da5baa.js} +2 -2
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-8fc22835.js → OrTag.vue_vue_type_script_lang-62e1f5a7.js} +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-0a36cba8.js → OrTag.vue_vue_type_script_lang-b62c0b79.js} +1 -1
- package/dist/bundled/v3/{OrTagInput.vue_vue_type_script_lang-f453ac36.js → OrTagInput.vue_vue_type_script_lang-bdbe85c7.js} +2 -2
- package/dist/bundled/v3/{OrTags.vue_vue_type_script_lang-422cbf86.js → OrTags.vue_vue_type_script_lang-cb8c3c31.js} +3 -3
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-325050eb.js → OrTextarea.vue_vue_type_script_lang-5624556c.js} +2 -2
- package/dist/bundled/v3/{OrTextbox.vue_vue_type_script_lang-5c706917.js → OrTextbox.vue_vue_type_script_lang-d0db6077.js} +3 -3
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-59a1b975.js → OrTimePicker.vue_vue_type_script_lang-25e5dd01.js} +4 -4
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-71a39d2d.js → OrToastContainer.vue_vue_type_script_lang-9a3e66a2.js} +1 -1
- package/dist/bundled/v3/{OrToastContainer.vue_vue_type_script_lang-8544ff72.js → OrToastContainer.vue_vue_type_script_lang-ad659b6a.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-b201e580.js → OrTooltip.vue_vue_type_script_lang-288c978f.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-fbacc740.js → OrTooltip.vue_vue_type_script_lang-c0cc67c5.js} +1 -1
- package/dist/bundled/v3/{OrTree.vue_vue_type_script_lang-ffd5fbc3.js → OrTree.vue_vue_type_script_lang-ce5b0577.js} +2 -2
- package/dist/bundled/{v2/_baseAssignValue-22e630c1.js → v3/_baseAssignValue-2250dbc9.js} +1 -1
- package/dist/bundled/v3/{_baseIsEqual-a1cc156c.js → _baseIsEqual-fe2002b6.js} +5 -5
- package/dist/bundled/v3/_commonjsHelpers-1789f0cf.js +7 -0
- package/dist/bundled/v3/components/OrAvatar/OrAvatar.js +2 -2
- package/dist/bundled/v3/components/OrAvatar/OrAvatar.vue.d.ts +26 -11
- package/dist/bundled/v3/components/OrAvatar/index.js +1 -1
- package/dist/bundled/v3/components/OrAvatarV3/OrAvatar.vue.d.ts +22 -7
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.js +2 -2
- package/dist/bundled/v3/components/OrBottomSheetV3/OrBottomSheet.vue.d.ts +568 -25
- package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.d.ts +1 -1
- package/dist/bundled/v3/components/OrBottomSheetV3/hooks/useBottomSheetSwipeState.js +1 -1
- package/dist/bundled/v3/components/OrBottomSheetV3/index.js +1 -1
- package/dist/bundled/v3/components/OrButton/OrButton.vue.d.ts +51 -16
- package/dist/bundled/v3/components/OrButtonV2/OrButton.js +2 -2
- package/dist/bundled/v3/components/OrButtonV2/OrButton.vue.d.ts +57 -20
- package/dist/bundled/v3/components/OrButtonV2/index.js +2 -2
- package/dist/bundled/v3/components/OrButtonV3/OrButton.js +2 -2
- package/dist/bundled/v3/components/OrButtonV3/OrButton.vue.d.ts +35 -15
- package/dist/bundled/v3/components/OrButtonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCard/OrCard.vue.d.ts +15 -7
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.js +2 -2
- package/dist/bundled/v3/components/OrCardCollection/OrCardCollection.vue.d.ts +47 -21
- package/dist/bundled/v3/components/OrCardCollection/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +2 -2
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +44 -17
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCardV3/OrCard.vue.d.ts +7 -4
- package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.js +2 -2
- package/dist/bundled/v3/components/OrCheckbox/OrCheckbox.vue.d.ts +35 -15
- package/dist/bundled/v3/components/OrCheckbox/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.vue.d.ts +24 -6
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +2 -2
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.vue.d.ts +43 -17
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +53 -23
- package/dist/bundled/v3/components/OrChip/OrChip.js +2 -2
- package/dist/bundled/v3/components/OrChip/OrChip.vue.d.ts +25 -9
- package/dist/bundled/v3/components/OrChip/index.js +1 -1
- package/dist/bundled/v3/components/OrChips/OrChips.js +2 -2
- package/dist/bundled/v3/components/OrChips/OrChips.vue.d.ts +51 -24
- package/dist/bundled/v3/components/OrChips/index.js +2 -2
- package/dist/bundled/v3/components/OrCode/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCode/OrCode.vue.d.ts +69 -24
- package/dist/bundled/v3/components/OrCode/index.js +4 -5
- package/dist/bundled/v3/components/OrCode/lang.js +3 -5
- package/dist/bundled/v3/components/OrCode/libs.js +3 -4
- package/dist/bundled/v3/components/OrCode/theme.js +1 -1
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +2 -2
- package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +84 -35
- package/dist/bundled/v3/components/OrCodeV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCollapse/OrCollapse.js +2 -2
- package/dist/bundled/v3/components/OrCollapse/OrCollapse.vue.d.ts +39 -17
- package/dist/bundled/v3/components/OrCollapse/index.js +1 -1
- package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.js +2 -2
- package/dist/bundled/v3/components/OrColorPicker/OrColorPicker.vue.d.ts +31 -13
- package/dist/bundled/v3/components/OrColorPicker/index.js +1 -1
- package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.vue.d.ts +30 -8
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.js +2 -2
- package/dist/bundled/v3/components/OrConfirm/OrConfirm.vue.d.ts +84 -23
- package/dist/bundled/v3/components/OrConfirm/index.js +1 -1
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +2 -2
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.vue.d.ts +91 -30
- package/dist/bundled/v3/components/OrConfirmV3/index.js +1 -1
- package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.js +2 -2
- package/dist/bundled/v3/components/OrContextMenuV3/OrContextMenu.vue.d.ts +27 -13
- package/dist/bundled/v3/components/OrContextMenuV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +2 -2
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.vue.d.ts +83 -88
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrDateTimePicker/OrDateTimePicker.vue.d.ts +177 -68
- package/dist/bundled/v3/components/OrDateTimePicker/index.js +1 -1
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.vue.d.ts +109 -94
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +1 -1
- 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.js +2 -2
- package/dist/bundled/v3/components/OrExpansionPanelV3/OrExpansionPanel.vue.d.ts +39 -16
- package/dist/bundled/v3/components/OrExpansionPanelV3/index.js +1 -1
- package/dist/bundled/v3/components/OrFabV3/OrFab.vue.d.ts +20 -8
- package/dist/bundled/v3/components/OrFloating/OrFloating.js +2 -2
- package/dist/bundled/v3/components/OrFloating/OrFloating.vue.d.ts +46 -15
- package/dist/bundled/v3/components/OrFloating/index.js +1 -1
- 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.js +2 -2
- package/dist/bundled/v3/components/OrIcon/OrIcon.vue.d.ts +44 -16
- package/dist/bundled/v3/components/OrIcon/index.js +1 -1
- package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.js +2 -2
- package/dist/bundled/v3/components/OrIconButtonV2/OrIconButton.vue.d.ts +43 -13
- package/dist/bundled/v3/components/OrIconButtonV2/index.js +1 -1
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.js +2 -2
- package/dist/bundled/v3/components/OrIconButtonV3/OrIconButton.vue.d.ts +54 -16
- package/dist/bundled/v3/components/OrIconButtonV3/index.js +1 -1
- 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.js +2 -2
- package/dist/bundled/v3/components/OrInlineInputV3/OrInlineInput.vue.d.ts +83 -39
- package/dist/bundled/v3/components/OrInlineInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.js +2 -2
- package/dist/bundled/v3/components/OrInlineTextEdit/OrInlineTextEdit.vue.d.ts +95 -43
- package/dist/bundled/v3/components/OrInlineTextEdit/index.js +1 -1
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.js +2 -2
- package/dist/bundled/v3/components/OrInlineTextareaV3/OrInlineTextarea.vue.d.ts +79 -39
- package/dist/bundled/v3/components/OrInlineTextareaV3/index.js +1 -1
- package/dist/bundled/v3/components/OrInput/OrInput.js +2 -2
- package/dist/bundled/v3/components/OrInput/OrInput.vue.d.ts +87 -36
- package/dist/bundled/v3/components/OrInput/index.js +1 -1
- package/dist/bundled/v3/components/OrInputBoxV3/OrInputBox.vue.d.ts +22 -7
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +2 -2
- package/dist/bundled/v3/components/OrInputV3/OrInput.vue.d.ts +88 -38
- package/dist/bundled/v3/components/OrInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrLabel/OrLabel.vue.d.ts +20 -9
- package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +26 -9
- package/dist/bundled/v3/components/OrLinkV3/OrLink.vue.d.ts +24 -7
- package/dist/bundled/v3/components/OrList/OrList.js +2 -2
- package/dist/bundled/v3/components/OrList/OrList.vue.d.ts +47 -21
- package/dist/bundled/v3/components/OrList/index.js +1 -1
- package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.js +2 -2
- package/dist/bundled/v3/components/OrListOfInputs/OrListOfInputs.vue.d.ts +27 -11
- package/dist/bundled/v3/components/OrListOfInputs/index.js +1 -1
- package/dist/bundled/v3/components/OrLoader/OrLoader.vue.d.ts +26 -10
- package/dist/bundled/v3/components/OrLoaderV3/OrLoader.js +2 -2
- package/dist/bundled/v3/components/OrLoaderV3/OrLoader.vue.d.ts +34 -13
- package/dist/bundled/v3/components/OrLoaderV3/index.js +1 -1
- package/dist/bundled/v3/components/OrMenuItemV3/OrMenuItem.vue.d.ts +34 -13
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.js +2 -2
- package/dist/bundled/v3/components/OrMenuV3/OrMenu.vue.d.ts +33 -15
- package/dist/bundled/v3/components/OrMenuV3/index.js +1 -1
- package/dist/bundled/v3/components/OrModal/OrModal.js +2 -2
- package/dist/bundled/v3/components/OrModal/OrModal.vue.d.ts +38 -14
- package/dist/bundled/v3/components/OrModal/index.js +1 -1
- package/dist/bundled/v3/components/OrModalV3/OrModal.js +2 -2
- package/dist/bundled/v3/components/OrModalV3/OrModal.vue.d.ts +25 -13
- package/dist/bundled/v3/components/OrModalV3/index.js +1 -1
- package/dist/bundled/v3/components/OrNotification/OrNotification.js +2 -2
- package/dist/bundled/v3/components/OrNotification/OrNotification.vue.d.ts +27 -9
- package/dist/bundled/v3/components/OrNotification/index.js +1 -1
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.js +2 -2
- package/dist/bundled/v3/components/OrNotificationV3/OrNotification.vue.d.ts +20 -9
- package/dist/bundled/v3/components/OrNotificationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.js +2 -2
- package/dist/bundled/v3/components/OrNumberInput/OrNumberInput.vue.d.ts +70 -24
- package/dist/bundled/v3/components/OrNumberInput/index.js +1 -1
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.js +2 -2
- package/dist/bundled/v3/components/OrOverflowMenu/OrOverflowMenu.vue.d.ts +31 -13
- package/dist/bundled/v3/components/OrOverflowMenu/index.js +1 -1
- package/dist/bundled/v3/components/OrOverlay/OrOverlay.vue.d.ts +16 -6
- package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.js +2 -2
- package/dist/bundled/v3/components/OrOverlayV3/OrOverlay.vue.d.ts +14 -7
- package/dist/bundled/v3/components/OrOverlayV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.js +2 -2
- package/dist/bundled/v3/components/OrPaginationV3/OrPagination.vue.d.ts +75 -27
- package/dist/bundled/v3/components/OrPaginationV3/index.js +1 -1
- package/dist/bundled/v3/components/OrPassword/OrPassword.js +2 -2
- package/dist/bundled/v3/components/OrPassword/OrPassword.vue.d.ts +63 -22
- package/dist/bundled/v3/components/OrPassword/index.js +1 -1
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.js +2 -2
- package/dist/bundled/v3/components/OrPopoverV3/OrPopover.vue.d.ts +92 -32
- package/dist/bundled/v3/components/OrPopoverV3/index.js +1 -1
- package/dist/bundled/v3/components/OrProgress/OrProgress.js +2 -2
- package/dist/bundled/v3/components/OrProgress/OrProgress.vue.d.ts +56 -20
- package/dist/bundled/v3/components/OrProgress/index.js +1 -1
- package/dist/bundled/v3/components/OrProgressV3/OrProgress.js +2 -2
- package/dist/bundled/v3/components/OrProgressV3/OrProgress.vue.d.ts +62 -25
- package/dist/bundled/v3/components/OrProgressV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRadio/OrRadio.js +2 -2
- package/dist/bundled/v3/components/OrRadio/OrRadio.vue.d.ts +35 -13
- package/dist/bundled/v3/components/OrRadio/index.js +1 -1
- 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 +202 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +194 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.d.ts +2 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +2 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.d.ts +5 -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 +42 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.d.ts +27 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +183 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.d.ts +17 -0
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +199 -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 +2 -0
- package/dist/bundled/v3/components/OrSearch/OrSearch.js +2 -2
- package/dist/bundled/v3/components/OrSearch/OrSearch.vue.d.ts +65 -23
- package/dist/bundled/v3/components/OrSearch/index.js +1 -1
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +2 -2
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.vue.d.ts +41 -17
- package/dist/bundled/v3/components/OrSearchV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSegmentedControlV3/OrSegmentedControl.vue.d.ts +25 -9
- package/dist/bundled/v3/components/OrSelect/OrSelect.js +2 -2
- package/dist/bundled/v3/components/OrSelect/OrSelect.vue.d.ts +77 -28
- package/dist/bundled/v3/components/OrSelect/index.js +1 -1
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +2 -2
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +133 -44
- package/dist/bundled/v3/components/OrSelectV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSidebar/OrSidebar.js +2 -2
- package/dist/bundled/v3/components/OrSidebar/OrSidebar.vue.d.ts +33 -14
- package/dist/bundled/v3/components/OrSidebar/index.js +1 -1
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.js +2 -2
- package/dist/bundled/v3/components/OrSidebarV3/OrSidebar.vue.d.ts +63 -28
- package/dist/bundled/v3/components/OrSidebarV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeleton/index.js +1 -1
- package/dist/bundled/v3/components/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.js +2 -2
- package/dist/bundled/v3/components/OrSkeletonText/OrSkeletonText.vue.d.ts +26 -10
- package/dist/bundled/v3/components/OrSkeletonText/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.js +2 -2
- package/dist/bundled/v3/components/OrSkeletonTextV3/OrSkeletonText.vue.d.ts +40 -16
- package/dist/bundled/v3/components/OrSkeletonTextV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSkeletonV3/index.js +1 -1
- package/dist/bundled/v3/components/OrSlider/OrSlider.js +2 -2
- package/dist/bundled/v3/components/OrSlider/OrSlider.vue.d.ts +91 -35
- package/dist/bundled/v3/components/OrSlider/index.js +1 -1
- package/dist/bundled/v3/components/OrSortingV3/OrSorting.js +2 -2
- package/dist/bundled/v3/components/OrSortingV3/OrSorting.vue.d.ts +45 -13
- package/dist/bundled/v3/components/OrSortingV3/index.js +1 -1
- package/dist/bundled/v3/components/OrStepper/OrStepper.js +2 -2
- package/dist/bundled/v3/components/OrStepper/OrStepper.vue.d.ts +43 -16
- package/dist/bundled/v3/components/OrStepper/index.js +1 -1
- package/dist/bundled/v3/components/OrSwitch/OrSwitch.vue.d.ts +33 -12
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +2 -2
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.vue.d.ts +53 -22
- package/dist/bundled/v3/components/OrSwitchV3/index.js +1 -1
- 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.js +2 -2
- package/dist/bundled/v3/components/OrTabsV3/OrTabs.vue.d.ts +73 -26
- package/dist/bundled/v3/components/OrTabsV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTag/OrTag.js +2 -2
- package/dist/bundled/v3/components/OrTag/OrTag.vue.d.ts +27 -10
- package/dist/bundled/v3/components/OrTag/index.js +1 -1
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +2 -2
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.vue.d.ts +85 -37
- package/dist/bundled/v3/components/OrTagInputV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagV3/OrTag.js +2 -2
- package/dist/bundled/v3/components/OrTagV3/OrTag.vue.d.ts +23 -12
- package/dist/bundled/v3/components/OrTagV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTagsV3/OrTags.js +2 -2
- package/dist/bundled/v3/components/OrTagsV3/OrTags.vue.d.ts +68 -23
- package/dist/bundled/v3/components/OrTagsV3/index.js +1 -1
- 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.js +2 -2
- package/dist/bundled/v3/components/OrTextarea/OrTextarea.vue.d.ts +85 -37
- package/dist/bundled/v3/components/OrTextarea/index.js +1 -1
- package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.vue.d.ts +73 -32
- package/dist/bundled/v3/components/OrTextbox/OrTextbox.js +2 -2
- package/dist/bundled/v3/components/OrTextbox/OrTextbox.vue.d.ts +137 -55
- package/dist/bundled/v3/components/OrTextbox/index.js +1 -1
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +2 -2
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.vue.d.ts +83 -88
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrToast/OrToast.js +2 -2
- package/dist/bundled/v3/components/OrToast/OrToast.vue.d.ts +31 -11
- package/dist/bundled/v3/components/OrToast/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToast/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToast/index.js +1 -1
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.js +2 -2
- package/dist/bundled/v3/components/OrToastContainer/OrToastContainer.vue.d.ts +55 -25
- package/dist/bundled/v3/components/OrToastContainer/index.js +1 -1
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.js +2 -2
- package/dist/bundled/v3/components/OrToastContainerV3/OrToastContainer.vue.d.ts +54 -24
- package/dist/bundled/v3/components/OrToastContainerV3/index.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/OrToast.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/OrToast.vue.d.ts +38 -16
- package/dist/bundled/v3/components/OrToastV3/Timer.js +1 -1
- package/dist/bundled/v3/components/OrToastV3/composable/useToastEventBus.js +2 -2
- package/dist/bundled/v3/components/OrToastV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTooltip/OrTooltip.js +2 -2
- package/dist/bundled/v3/components/OrTooltip/OrTooltip.vue.d.ts +33 -14
- package/dist/bundled/v3/components/OrTooltip/index.js +1 -1
- package/dist/bundled/v3/components/OrTooltipContent/OrTooltipContent.vue.d.ts +10 -4
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.js +2 -2
- package/dist/bundled/v3/components/OrTooltipV3/OrTooltip.vue.d.ts +33 -15
- package/dist/bundled/v3/components/OrTooltipV3/index.js +1 -1
- package/dist/bundled/v3/components/OrTreeV3/OrTree.js +2 -2
- package/dist/bundled/v3/components/OrTreeV3/OrTree.vue.d.ts +19 -13
- package/dist/bundled/v3/components/OrTreeV3/index.js +1 -1
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +78 -77
- 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/{v2/dom-bb55b42a.js → v3/dom-cec392f3.js} +2 -2
- package/dist/bundled/v3/{eq-95cd2573.js → eq-44ea4d70.js} +1 -1
- package/dist/bundled/{v2/get-ab1b7d93.js → v3/get-34aa21f4.js} +3 -3
- package/dist/bundled/v3/hooks/useOverflow.js +2 -2
- package/dist/bundled/v3/hooks/usePopoverState.js +1 -1
- package/dist/bundled/v3/hooks/useResponsive/useResponsive.d.ts +2 -2
- package/dist/bundled/v3/hooks/useResponsive/useResponsive.js +1 -1
- package/dist/bundled/v3/{index-929e224a.js → index-0a01982b.js} +2 -2
- package/dist/bundled/{v2/index-5ee42d1f.js → v3/index-0c287ab6.js} +3 -3
- package/dist/bundled/v3/index-1b2cfcc1.js +9715 -0
- package/dist/bundled/v3/{index-929b54f2.js → index-3cae2d25.js} +3 -115
- package/dist/bundled/{v2/index-5dd41049.js → v3/index-3e178101.js} +471 -32
- package/dist/bundled/v3/{index-f4d8e24c.js → index-40b35d94.js} +1 -1
- package/dist/bundled/v3/index-666dfe59.js +4048 -0
- package/dist/bundled/v3/{index-500b3ace.js → index-749f3444.js} +1 -1
- package/dist/bundled/v3/index-9444e0d2.js +115 -0
- package/dist/bundled/v3/{index-f92296d7.js → index-de4975a3.js} +14 -3
- package/dist/bundled/v3/index-f671afe5.js +7127 -0
- package/dist/bundled/v3/index.js +81 -79
- package/dist/bundled/{v2/isArrayLike-e46b8eac.js → v3/isArrayLike-e7fb5cae.js} +1 -1
- package/dist/bundled/v3/{isEqual-44382965.js → isEqual-7a8e6106.js} +1 -1
- package/dist/bundled/{v2/isObject-fe8b81fd.js → v3/isObject-b7415fc1.js} +1 -1
- package/dist/bundled/v3/markdown-119394e1.js +15365 -0
- package/dist/bundled/v3/{range-6f26eda4.js → range-82efa3d4.js} +4 -4
- package/dist/bundled/v3/{round-f34440f4.js → round-567ede34.js} +4 -4
- package/dist/bundled/{v2/toFinite-74227610.js → v3/toFinite-bc59ffb0.js} +1 -1
- package/dist/bundled/v3/{toInteger-2fd112a9.js → toInteger-9fa0151c.js} +1 -1
- package/dist/bundled/{v2/toString-f3196832.js → v3/toString-b6e4472a.js} +1 -1
- package/dist/bundled/v3/useFocusTrap-2302b843.js +1349 -0
- package/dist/bundled/v3/utils/functions/dom.js +2 -2
- package/dist/bundled/v3/utils/index.js +1 -1
- package/dist/esm/v2/{OrCardCollection-63ab1dc4.js → OrCardCollection-c27ae76f.js} +3 -3
- package/dist/esm/v2/{OrCode-adb9790d.js → OrCode-4501e2df.js} +36 -50
- package/dist/esm/v2/{OrConfirm-f92dc7b5.js → OrConfirm-4841e1eb.js} +1 -1
- package/dist/esm/v2/{OrContextMenu-abf0c884.js → OrContextMenu-01efdb43.js} +2 -2
- package/dist/esm/v2/{OrDatePicker-c93e57ae.js → OrDatePicker-528b55ec.js} +3 -3
- package/dist/esm/v2/{OrDateTimePicker-0bbe653c.js → OrDateTimePicker-80bd401a.js} +1 -1
- package/dist/esm/v2/{OrDateTimePicker.vue_rollup-plugin-vue_script-353b70fe.js → OrDateTimePicker.vue_rollup-plugin-vue_script-8e987b8d.js} +3 -3
- package/dist/esm/v2/{OrDateTimePickerPopoverHeader-6a40de37.js → OrDateTimePickerPopoverHeader-835e4e49.js} +3 -3
- package/dist/esm/v2/{OrIconButton-996aba66.js → OrIconButton-6eda233c.js} +2 -2
- package/dist/esm/v2/{OrInlineInput-c3329db5.js → OrInlineInput-9f88fff9.js} +1 -1
- package/dist/esm/v2/{OrInlineTextarea-e9de4f1e.js → OrInlineTextarea-03e8b8a6.js} +1 -1
- package/dist/esm/v2/{OrInput-0d01816c.js → OrInput-54abe165.js} +1 -1
- package/dist/esm/v2/{OrMenu-c7b05c91.js → OrMenu-c2c6473f.js} +1 -1
- package/dist/esm/v2/{OrModal-c6c922fd.js → OrModal-8ea08182.js} +1 -1
- package/dist/esm/v2/{OrNotification-c119fcff.js → OrNotification-9875c55d.js} +1 -1
- package/dist/esm/v2/{OrPagination-3f1b7a65.js → OrPagination-c5058980.js} +2 -2
- package/dist/esm/v2/{OrPopover-58fefa76.js → OrPopover-f6114169.js} +1 -1
- package/dist/esm/v2/OrRichTextEditor-6fb5d647.js +981 -0
- package/dist/esm/v2/{OrSearch-175c25d3.js → OrSearch-8a834099.js} +1 -1
- package/dist/esm/v2/{OrSelect-85acd45f.js → OrSelect-cd37db8d.js} +4 -4
- package/dist/esm/v2/{OrSidebar-055f2c89.js → OrSidebar-a5608742.js} +1 -1
- package/dist/esm/v2/{OrSidebarCollapseButton-12d111c5.js → OrSidebarCollapseButton-c999d09a.js} +1 -1
- package/dist/esm/v2/{OrSorting-b350c4d3.js → OrSorting-82557def.js} +2 -2
- package/dist/esm/v2/{OrTabs-f736863c.js → OrTabs-92ccb30f.js} +2 -2
- package/dist/esm/v2/{OrTag-8ec63b23.js → OrTag-15cd89e8.js} +1 -1
- package/dist/esm/v2/{OrTagInput-7088d62f.js → OrTagInput-f443f295.js} +2 -2
- package/dist/esm/v2/{OrTags-5ad71efd.js → OrTags-b34c628e.js} +2 -2
- package/dist/esm/v2/{OrTimePicker-3d65dc1b.js → OrTimePicker-e711a256.js} +4 -4
- package/dist/esm/v2/{OrTooltip-17f8a7ff.js → OrTooltip-a4e679bb.js} +1 -1
- package/dist/esm/v2/codemirrorView-020fe885.js +357 -0
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +53 -29
- package/dist/esm/v2/components/or-card-collection-v3/index.js +8 -8
- package/dist/esm/v2/components/or-code-v3/OrCode.vue.d.ts +3 -4
- package/dist/esm/v2/components/or-code-v3/index.js +14 -9
- package/dist/esm/v2/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v2/components/or-context-menu-v3/index.js +3 -3
- package/dist/esm/v2/components/or-date-picker-v3/index.js +6 -6
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +7 -7
- package/dist/esm/v2/components/or-icon-button-v3/index.js +3 -3
- package/dist/esm/v2/components/or-inline-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/esm/v2/components/or-input-v3/index.js +4 -4
- package/dist/esm/v2/components/or-menu-v3/index.js +2 -2
- package/dist/esm/v2/components/or-modal-v3/index.js +4 -4
- package/dist/esm/v2/components/or-notification-v3/index.js +4 -4
- package/dist/esm/v2/components/or-pagination-v3/index.js +3 -3
- package/dist/esm/v2/components/or-popover-v3/index.js +1 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +194 -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 +67 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/props.d.ts +5 -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 +9 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +17 -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 +5 -5
- package/dist/esm/v2/components/or-select-v3/index.js +6 -6
- package/dist/esm/v2/components/or-sidebar-v3/index.js +5 -5
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +4 -4
- package/dist/esm/v2/components/or-sorting-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tabs-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tag-input-v3/index.js +6 -6
- package/dist/esm/v2/components/or-tag-v3/index.js +4 -4
- package/dist/esm/v2/components/or-tags-v3/index.js +5 -5
- package/dist/esm/v2/components/or-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-time-picker-v3/index.js +7 -7
- 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/index.js +4 -4
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +2 -2
- package/dist/esm/v2/components/or-toast-v3/or-toast-container-v3/index.js +4 -4
- 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/components/or-tooltip-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tree-v3/OrTree.vue.d.ts +2 -2
- package/dist/esm/v2/index.js +53 -29
- package/dist/esm/v2/{types-b3ec7224.js → types-635157b1.js} +1 -1
- package/dist/esm/v3/{OrCardCollection-2b5f1d79.js → OrCardCollection-bddf72ef.js} +3 -3
- package/dist/esm/v3/{OrCode-5457417e.js → OrCode-a63c3a7b.js} +36 -50
- package/dist/esm/v3/{OrConfirm-bf771b4d.js → OrConfirm-d304e9a4.js} +1 -1
- package/dist/esm/v3/{OrContextMenu-2d8d26e9.js → OrContextMenu-bf1e07ae.js} +2 -2
- package/dist/esm/v3/{OrDatePicker-88b59005.js → OrDatePicker-87aef206.js} +3 -3
- package/dist/esm/v3/{OrDateTimePicker-f9e46f7e.js → OrDateTimePicker-738f9cd3.js} +3 -3
- package/dist/esm/v3/{OrDateTimePickerPopoverHeader-d3058267.js → OrDateTimePickerPopoverHeader-03ae7d09.js} +3 -3
- package/dist/esm/v3/{OrIconButton-c72e1a04.js → OrIconButton-a69c7775.js} +2 -2
- package/dist/esm/v3/{OrInlineInput-19a4ac87.js → OrInlineInput-246d88ca.js} +1 -1
- package/dist/esm/v3/{OrInlineTextarea-0853564b.js → OrInlineTextarea-c9febb84.js} +1 -1
- package/dist/esm/v3/{OrInput-7729da3b.js → OrInput-e12b0489.js} +1 -1
- package/dist/esm/v3/{OrMenu-3bcc528b.js → OrMenu-9a82f18f.js} +1 -1
- package/dist/esm/v3/{OrModal-fb37e638.js → OrModal-fc3bb76e.js} +1 -1
- package/dist/esm/v3/{OrNotification-5d385b61.js → OrNotification-c8cd9f3d.js} +1 -1
- package/dist/esm/v3/{OrPagination-d7acbb6b.js → OrPagination-cc0b041a.js} +2 -2
- package/dist/esm/v3/{OrPopover-2132e8b9.js → OrPopover-7b2af064.js} +1 -1
- package/dist/esm/v3/OrRichTextEditor-d21645c2.js +913 -0
- package/dist/esm/v3/{OrSearch-16664742.js → OrSearch-bc259374.js} +1 -1
- package/dist/esm/v3/{OrSelect-9001a22a.js → OrSelect-a7d3c84d.js} +4 -4
- package/dist/esm/v3/{OrSidebar-83432ba3.js → OrSidebar-8837a93e.js} +1 -1
- package/dist/esm/v3/{OrSidebarCollapseButton-463aa3a0.js → OrSidebarCollapseButton-f44951ac.js} +1 -1
- package/dist/esm/v3/{OrSorting-aa200e88.js → OrSorting-6baec1ab.js} +2 -2
- package/dist/esm/v3/{OrTabs-63ce33ae.js → OrTabs-2ab1aefa.js} +2 -2
- package/dist/esm/v3/{OrTag-5d7c0e75.js → OrTag-2a3d7293.js} +1 -1
- package/dist/esm/v3/{OrTagInput-649f9b50.js → OrTagInput-ccb72239.js} +2 -2
- package/dist/esm/v3/{OrTags-cb152033.js → OrTags-69e90412.js} +2 -2
- package/dist/esm/v3/{OrTimePicker-f942db00.js → OrTimePicker-a3870a62.js} +4 -4
- package/dist/esm/v3/{OrTooltip-ad6e08ab.js → OrTooltip-5bf6890a.js} +1 -1
- package/dist/esm/v3/codemirrorView-020fe885.js +357 -0
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +52 -28
- 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 +22 -7
- package/dist/esm/v3/components/or-bottom-sheet-v3/OrBottomSheet.vue.d.ts +568 -25
- package/dist/esm/v3/components/or-bottom-sheet-v3/hooks/useBottomSheetSwipeState.d.ts +1 -1
- 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 +44 -17
- package/dist/esm/v3/components/or-card-collection-v3/index.js +8 -8
- 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-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-code-v3/OrCode.vue.d.ts +84 -35
- package/dist/esm/v3/components/or-code-v3/index.js +14 -9
- 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 -30
- package/dist/esm/v3/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v3/components/or-context-menu-v3/OrContextMenu.vue.d.ts +27 -13
- package/dist/esm/v3/components/or-context-menu-v3/index.js +3 -3
- package/dist/esm/v3/components/or-date-picker-v3/OrDatePicker.vue.d.ts +83 -88
- package/dist/esm/v3/components/or-date-picker-v3/index.js +6 -6
- 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 +109 -94
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +6 -6
- 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 +17 -9
- 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 +30 -11
- package/dist/esm/v3/components/or-date-time-picker-v3/partials/or-date-time-picker-time-select/OrDateTimePickerTimeSelect.vue.d.ts +43 -17
- 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 +39 -16
- 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 +54 -16
- package/dist/esm/v3/components/or-icon-button-v3/index.js +3 -3
- 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-input-v3/index.js +4 -4
- 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-inline-textarea-v3/index.js +4 -4
- 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-box-v3/partials/or-input-box-addon/OrInputBoxAddon.vue.d.ts +18 -7
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +88 -38
- package/dist/esm/v3/components/or-input-v3/index.js +4 -4
- 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 +26 -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 +33 -15
- package/dist/esm/v3/components/or-menu-v3/index.js +2 -2
- 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 +25 -13
- package/dist/esm/v3/components/or-modal-v3/index.js +4 -4
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-content/OrModalContent.vue.d.ts +7 -4
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-footer/OrModalFooter.vue.d.ts +7 -4
- package/dist/esm/v3/components/or-modal-v3/partials/or-modal-header/OrModalHeader.vue.d.ts +11 -6
- 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-notification-v3/index.js +4 -4
- 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-pagination-v3/index.js +3 -3
- 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 +92 -32
- package/dist/esm/v3/components/or-popover-v3/index.js +1 -1
- 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 +194 -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 +65 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/props.d.ts +5 -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 +9 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/theme.d.ts +17 -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-search-v3/index.js +5 -5
- 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 +133 -44
- package/dist/esm/v3/components/or-select-v3/index.js +6 -6
- package/dist/esm/v3/components/or-select-v3/partials/or-select-placeholder/OrSelectPlaceholder.vue.d.ts +14 -7
- 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/index.js +5 -5
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +4 -4
- 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-sorting-v3/OrSorting.vue.d.ts +45 -13
- package/dist/esm/v3/components/or-sorting-v3/index.js +3 -3
- 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 +73 -26
- package/dist/esm/v3/components/or-tabs-v3/index.js +3 -3
- package/dist/esm/v3/components/or-tag/OrTag.vue.d.ts +27 -10
- package/dist/esm/v3/components/or-tag-input-v3/OrTagInput.vue.d.ts +85 -37
- package/dist/esm/v3/components/or-tag-input-v3/index.js +6 -6
- package/dist/esm/v3/components/or-tag-v3/OrTag.vue.d.ts +23 -12
- package/dist/esm/v3/components/or-tag-v3/index.js +4 -4
- package/dist/esm/v3/components/or-tags-v3/OrTags.vue.d.ts +68 -23
- package/dist/esm/v3/components/or-tags-v3/index.js +5 -5
- 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 +83 -88
- package/dist/esm/v3/components/or-time-picker-v3/index.js +7 -7
- 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/index.js +4 -4
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/OrToastContainer.vue.d.ts +54 -24
- package/dist/esm/v3/components/or-toast-v3/or-toast-container-v3/index.js +4 -4
- 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 +33 -15
- package/dist/esm/v3/components/or-tooltip-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tree-v3/OrTree.vue.d.ts +19 -13
- package/dist/esm/v3/components/or-tree-v3/partials/or-tree-node/OrTreeNode.vue.d.ts +63 -31
- 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 +52 -28
- package/dist/esm/v3/{types-777d6e58.js → types-c4c1e2cc.js} +1 -1
- package/package.json +24 -4
- package/src/components/index.ts +1 -0
- package/src/components/or-code-v3/OrCode.vue +50 -64
- package/src/components/or-popover-v3/OrPopover.vue +1 -1
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +745 -0
- package/src/components/or-rich-text-editor-v3/index.ts +2 -0
- package/src/components/or-rich-text-editor-v3/props.ts +6 -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 +238 -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 +172 -0
- package/dist/bundled/v2/index-648acd9e.js +0 -1598
- package/dist/bundled/v2/index-64a3a364.js +0 -759
- package/dist/bundled/v2/index-c26082b9.js +0 -1892
- package/dist/bundled/v2/index-e72fe4a8.js +0 -361
- package/dist/bundled/v2/index-f31843f4.js +0 -94
- package/dist/bundled/v3/index-19d70079.js +0 -94
- package/dist/bundled/v3/index-22f7d3aa.js +0 -759
- package/dist/bundled/v3/index-792c62f6.js +0 -361
- package/dist/bundled/v3/index-bb6d92dd.js +0 -1892
- package/dist/bundled/v3/index-df2529d7.js +0 -1598
- /package/dist/bundled/v2/{OrDateTimePickerMonthSelect-e7037d50.js → OrDateTimePickerMonthSelect-c329e727.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-2c7e113b.js → OrDateTimePickerPopoverHeader-146c2f16.js} +0 -0
- /package/dist/bundled/v2/{OrDateTimePickerTimeSelect-7fd83e23.js → OrDateTimePickerTimeSelect-7286977a.js} +0 -0
- /package/dist/bundled/v3/{OrExpansionPanel.vue_vue_type_script_lang-de05b51f.js → OrExpansionPanel.vue_vue_type_script_lang-94976ae9.js} +0 -0
|
@@ -1,1598 +0,0 @@
|
|
|
1
|
-
import { ap as Parser, ao as NodeSet, an as NodeType, ax as DefaultBufferLength, N as NodeProp, ar as Tree, ae as IterMode } from './index-929b54f2.js';
|
|
2
|
-
|
|
3
|
-
/// A parse stack. These are used internally by the parser to track
|
|
4
|
-
/// parsing progress. They also provide some properties and methods
|
|
5
|
-
/// that external code such as a tokenizer can use to get information
|
|
6
|
-
/// about the parse state.
|
|
7
|
-
class Stack {
|
|
8
|
-
/// @internal
|
|
9
|
-
constructor(
|
|
10
|
-
/// The parse that this stack is part of @internal
|
|
11
|
-
p,
|
|
12
|
-
/// Holds state, input pos, buffer index triplets for all but the
|
|
13
|
-
/// top state @internal
|
|
14
|
-
stack,
|
|
15
|
-
/// The current parse state @internal
|
|
16
|
-
state,
|
|
17
|
-
// The position at which the next reduce should take place. This
|
|
18
|
-
// can be less than `this.pos` when skipped expressions have been
|
|
19
|
-
// added to the stack (which should be moved outside of the next
|
|
20
|
-
// reduction)
|
|
21
|
-
/// @internal
|
|
22
|
-
reducePos,
|
|
23
|
-
/// The input position up to which this stack has parsed.
|
|
24
|
-
pos,
|
|
25
|
-
/// The dynamic score of the stack, including dynamic precedence
|
|
26
|
-
/// and error-recovery penalties
|
|
27
|
-
/// @internal
|
|
28
|
-
score,
|
|
29
|
-
// The output buffer. Holds (type, start, end, size) quads
|
|
30
|
-
// representing nodes created by the parser, where `size` is
|
|
31
|
-
// amount of buffer array entries covered by this node.
|
|
32
|
-
/// @internal
|
|
33
|
-
buffer,
|
|
34
|
-
// The base offset of the buffer. When stacks are split, the split
|
|
35
|
-
// instance shared the buffer history with its parent up to
|
|
36
|
-
// `bufferBase`, which is the absolute offset (including the
|
|
37
|
-
// offset of previous splits) into the buffer at which this stack
|
|
38
|
-
// starts writing.
|
|
39
|
-
/// @internal
|
|
40
|
-
bufferBase,
|
|
41
|
-
/// @internal
|
|
42
|
-
curContext) {
|
|
43
|
-
let lookAhead = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 0;
|
|
44
|
-
let
|
|
45
|
-
// A parent stack from which this was split off, if any. This is
|
|
46
|
-
// set up so that it always points to a stack that has some
|
|
47
|
-
// additional buffer content, never to a stack with an equal
|
|
48
|
-
// `bufferBase`.
|
|
49
|
-
/// @internal
|
|
50
|
-
parent = arguments.length > 10 ? arguments[10] : undefined;
|
|
51
|
-
this.p = p;
|
|
52
|
-
this.stack = stack;
|
|
53
|
-
this.state = state;
|
|
54
|
-
this.reducePos = reducePos;
|
|
55
|
-
this.pos = pos;
|
|
56
|
-
this.score = score;
|
|
57
|
-
this.buffer = buffer;
|
|
58
|
-
this.bufferBase = bufferBase;
|
|
59
|
-
this.curContext = curContext;
|
|
60
|
-
this.lookAhead = lookAhead;
|
|
61
|
-
this.parent = parent;
|
|
62
|
-
}
|
|
63
|
-
/// @internal
|
|
64
|
-
toString() {
|
|
65
|
-
return `[${this.stack.filter((_, i) => i % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
|
|
66
|
-
}
|
|
67
|
-
// Start an empty stack
|
|
68
|
-
/// @internal
|
|
69
|
-
static start(p, state) {
|
|
70
|
-
let pos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
71
|
-
let cx = p.parser.context;
|
|
72
|
-
return new Stack(p, [], state, pos, pos, 0, [], 0, cx ? new StackContext(cx, cx.start) : null, 0, null);
|
|
73
|
-
}
|
|
74
|
-
/// The stack's current [context](#lr.ContextTracker) value, if
|
|
75
|
-
/// any. Its type will depend on the context tracker's type
|
|
76
|
-
/// parameter, or it will be `null` if there is no context
|
|
77
|
-
/// tracker.
|
|
78
|
-
get context() {
|
|
79
|
-
return this.curContext ? this.curContext.context : null;
|
|
80
|
-
}
|
|
81
|
-
// Push a state onto the stack, tracking its start position as well
|
|
82
|
-
// as the buffer base at that point.
|
|
83
|
-
/// @internal
|
|
84
|
-
pushState(state, start) {
|
|
85
|
-
this.stack.push(this.state, start, this.bufferBase + this.buffer.length);
|
|
86
|
-
this.state = state;
|
|
87
|
-
}
|
|
88
|
-
// Apply a reduce action
|
|
89
|
-
/// @internal
|
|
90
|
-
reduce(action) {
|
|
91
|
-
var _a;
|
|
92
|
-
let depth = action >> 19 /* Action.ReduceDepthShift */,
|
|
93
|
-
type = action & 65535 /* Action.ValueMask */;
|
|
94
|
-
let {
|
|
95
|
-
parser
|
|
96
|
-
} = this.p;
|
|
97
|
-
let dPrec = parser.dynamicPrecedence(type);
|
|
98
|
-
if (dPrec) this.score += dPrec;
|
|
99
|
-
if (depth == 0) {
|
|
100
|
-
this.pushState(parser.getGoto(this.state, type, true), this.reducePos);
|
|
101
|
-
// Zero-depth reductions are a special case—they add stuff to
|
|
102
|
-
// the stack without popping anything off.
|
|
103
|
-
if (type < parser.minRepeatTerm) this.storeNode(type, this.reducePos, this.reducePos, 4, true);
|
|
104
|
-
this.reduceContext(type, this.reducePos);
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
// Find the base index into `this.stack`, content after which will
|
|
108
|
-
// be dropped. Note that with `StayFlag` reductions we need to
|
|
109
|
-
// consume two extra frames (the dummy parent node for the skipped
|
|
110
|
-
// expression and the state that we'll be staying in, which should
|
|
111
|
-
// be moved to `this.state`).
|
|
112
|
-
let base = this.stack.length - (depth - 1) * 3 - (action & 262144 /* Action.StayFlag */ ? 6 : 0);
|
|
113
|
-
let start = base ? this.stack[base - 2] : this.p.ranges[0].from,
|
|
114
|
-
size = this.reducePos - start;
|
|
115
|
-
// This is a kludge to try and detect overly deep left-associative
|
|
116
|
-
// trees, which will not increase the parse stack depth and thus
|
|
117
|
-
// won't be caught by the regular stack-depth limit check.
|
|
118
|
-
if (size >= 2000 /* Recover.MinBigReduction */ && !((_a = this.p.parser.nodeSet.types[type]) === null || _a === void 0 ? void 0 : _a.isAnonymous)) {
|
|
119
|
-
if (start == this.p.lastBigReductionStart) {
|
|
120
|
-
this.p.bigReductionCount++;
|
|
121
|
-
this.p.lastBigReductionSize = size;
|
|
122
|
-
} else if (this.p.lastBigReductionSize < size) {
|
|
123
|
-
this.p.bigReductionCount = 1;
|
|
124
|
-
this.p.lastBigReductionStart = start;
|
|
125
|
-
this.p.lastBigReductionSize = size;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
let bufferBase = base ? this.stack[base - 1] : 0,
|
|
129
|
-
count = this.bufferBase + this.buffer.length - bufferBase;
|
|
130
|
-
// Store normal terms or `R -> R R` repeat reductions
|
|
131
|
-
if (type < parser.minRepeatTerm || action & 131072 /* Action.RepeatFlag */) {
|
|
132
|
-
let pos = parser.stateFlag(this.state, 1 /* StateFlag.Skipped */) ? this.pos : this.reducePos;
|
|
133
|
-
this.storeNode(type, start, pos, count + 4, true);
|
|
134
|
-
}
|
|
135
|
-
if (action & 262144 /* Action.StayFlag */) {
|
|
136
|
-
this.state = this.stack[base];
|
|
137
|
-
} else {
|
|
138
|
-
let baseStateID = this.stack[base - 3];
|
|
139
|
-
this.state = parser.getGoto(baseStateID, type, true);
|
|
140
|
-
}
|
|
141
|
-
while (this.stack.length > base) this.stack.pop();
|
|
142
|
-
this.reduceContext(type, start);
|
|
143
|
-
}
|
|
144
|
-
// Shift a value into the buffer
|
|
145
|
-
/// @internal
|
|
146
|
-
storeNode(term, start, end) {
|
|
147
|
-
let size = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 4;
|
|
148
|
-
let isReduce = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
149
|
-
if (term == 0 /* Term.Err */ && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
150
|
-
// Try to omit/merge adjacent error nodes
|
|
151
|
-
let cur = this,
|
|
152
|
-
top = this.buffer.length;
|
|
153
|
-
if (top == 0 && cur.parent) {
|
|
154
|
-
top = cur.bufferBase - cur.parent.bufferBase;
|
|
155
|
-
cur = cur.parent;
|
|
156
|
-
}
|
|
157
|
-
if (top > 0 && cur.buffer[top - 4] == 0 /* Term.Err */ && cur.buffer[top - 1] > -1) {
|
|
158
|
-
if (start == end) return;
|
|
159
|
-
if (cur.buffer[top - 2] >= start) {
|
|
160
|
-
cur.buffer[top - 2] = end;
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
if (!isReduce || this.pos == end) {
|
|
166
|
-
// Simple case, just append
|
|
167
|
-
this.buffer.push(term, start, end, size);
|
|
168
|
-
} else {
|
|
169
|
-
// There may be skipped nodes that have to be moved forward
|
|
170
|
-
let index = this.buffer.length;
|
|
171
|
-
if (index > 0 && this.buffer[index - 4] != 0 /* Term.Err */) while (index > 0 && this.buffer[index - 2] > end) {
|
|
172
|
-
// Move this record forward
|
|
173
|
-
this.buffer[index] = this.buffer[index - 4];
|
|
174
|
-
this.buffer[index + 1] = this.buffer[index - 3];
|
|
175
|
-
this.buffer[index + 2] = this.buffer[index - 2];
|
|
176
|
-
this.buffer[index + 3] = this.buffer[index - 1];
|
|
177
|
-
index -= 4;
|
|
178
|
-
if (size > 4) size -= 4;
|
|
179
|
-
}
|
|
180
|
-
this.buffer[index] = term;
|
|
181
|
-
this.buffer[index + 1] = start;
|
|
182
|
-
this.buffer[index + 2] = end;
|
|
183
|
-
this.buffer[index + 3] = size;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
// Apply a shift action
|
|
187
|
-
/// @internal
|
|
188
|
-
shift(action, next, nextEnd) {
|
|
189
|
-
let start = this.pos;
|
|
190
|
-
if (action & 131072 /* Action.GotoFlag */) {
|
|
191
|
-
this.pushState(action & 65535 /* Action.ValueMask */, this.pos);
|
|
192
|
-
} else if ((action & 262144 /* Action.StayFlag */) == 0) {
|
|
193
|
-
// Regular shift
|
|
194
|
-
let nextState = action,
|
|
195
|
-
{
|
|
196
|
-
parser
|
|
197
|
-
} = this.p;
|
|
198
|
-
if (nextEnd > this.pos || next <= parser.maxNode) {
|
|
199
|
-
this.pos = nextEnd;
|
|
200
|
-
if (!parser.stateFlag(nextState, 1 /* StateFlag.Skipped */)) this.reducePos = nextEnd;
|
|
201
|
-
}
|
|
202
|
-
this.pushState(nextState, start);
|
|
203
|
-
this.shiftContext(next, start);
|
|
204
|
-
if (next <= parser.maxNode) this.buffer.push(next, start, nextEnd, 4);
|
|
205
|
-
} else {
|
|
206
|
-
// Shift-and-stay, which means this is a skipped token
|
|
207
|
-
this.pos = nextEnd;
|
|
208
|
-
this.shiftContext(next, start);
|
|
209
|
-
if (next <= this.p.parser.maxNode) this.buffer.push(next, start, nextEnd, 4);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// Apply an action
|
|
213
|
-
/// @internal
|
|
214
|
-
apply(action, next, nextEnd) {
|
|
215
|
-
if (action & 65536 /* Action.ReduceFlag */) this.reduce(action);else this.shift(action, next, nextEnd);
|
|
216
|
-
}
|
|
217
|
-
// Add a prebuilt (reused) node into the buffer.
|
|
218
|
-
/// @internal
|
|
219
|
-
useNode(value, next) {
|
|
220
|
-
let index = this.p.reused.length - 1;
|
|
221
|
-
if (index < 0 || this.p.reused[index] != value) {
|
|
222
|
-
this.p.reused.push(value);
|
|
223
|
-
index++;
|
|
224
|
-
}
|
|
225
|
-
let start = this.pos;
|
|
226
|
-
this.reducePos = this.pos = start + value.length;
|
|
227
|
-
this.pushState(next, start);
|
|
228
|
-
this.buffer.push(index, start, this.reducePos, -1 /* size == -1 means this is a reused value */);
|
|
229
|
-
if (this.curContext) this.updateContext(this.curContext.tracker.reuse(this.curContext.context, value, this, this.p.stream.reset(this.pos - value.length)));
|
|
230
|
-
}
|
|
231
|
-
// Split the stack. Due to the buffer sharing and the fact
|
|
232
|
-
// that `this.stack` tends to stay quite shallow, this isn't very
|
|
233
|
-
// expensive.
|
|
234
|
-
/// @internal
|
|
235
|
-
split() {
|
|
236
|
-
let parent = this;
|
|
237
|
-
let off = parent.buffer.length;
|
|
238
|
-
// Because the top of the buffer (after this.pos) may be mutated
|
|
239
|
-
// to reorder reductions and skipped tokens, and shared buffers
|
|
240
|
-
// should be immutable, this copies any outstanding skipped tokens
|
|
241
|
-
// to the new buffer, and puts the base pointer before them.
|
|
242
|
-
while (off > 0 && parent.buffer[off - 2] > parent.reducePos) off -= 4;
|
|
243
|
-
let buffer = parent.buffer.slice(off),
|
|
244
|
-
base = parent.bufferBase + off;
|
|
245
|
-
// Make sure parent points to an actual parent with content, if there is such a parent.
|
|
246
|
-
while (parent && base == parent.bufferBase) parent = parent.parent;
|
|
247
|
-
return new Stack(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, buffer, base, this.curContext, this.lookAhead, parent);
|
|
248
|
-
}
|
|
249
|
-
// Try to recover from an error by 'deleting' (ignoring) one token.
|
|
250
|
-
/// @internal
|
|
251
|
-
recoverByDelete(next, nextEnd) {
|
|
252
|
-
let isNode = next <= this.p.parser.maxNode;
|
|
253
|
-
if (isNode) this.storeNode(next, this.pos, nextEnd, 4);
|
|
254
|
-
this.storeNode(0 /* Term.Err */, this.pos, nextEnd, isNode ? 8 : 4);
|
|
255
|
-
this.pos = this.reducePos = nextEnd;
|
|
256
|
-
this.score -= 190 /* Recover.Delete */;
|
|
257
|
-
}
|
|
258
|
-
/// Check if the given term would be able to be shifted (optionally
|
|
259
|
-
/// after some reductions) on this stack. This can be useful for
|
|
260
|
-
/// external tokenizers that want to make sure they only provide a
|
|
261
|
-
/// given token when it applies.
|
|
262
|
-
canShift(term) {
|
|
263
|
-
for (let sim = new SimulatedStack(this);;) {
|
|
264
|
-
let action = this.p.parser.stateSlot(sim.state, 4 /* ParseState.DefaultReduce */) || this.p.parser.hasAction(sim.state, term);
|
|
265
|
-
if (action == 0) return false;
|
|
266
|
-
if ((action & 65536 /* Action.ReduceFlag */) == 0) return true;
|
|
267
|
-
sim.reduce(action);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
// Apply up to Recover.MaxNext recovery actions that conceptually
|
|
271
|
-
// inserts some missing token or rule.
|
|
272
|
-
/// @internal
|
|
273
|
-
recoverByInsert(next) {
|
|
274
|
-
if (this.stack.length >= 300 /* Recover.MaxInsertStackDepth */) return [];
|
|
275
|
-
let nextStates = this.p.parser.nextStates(this.state);
|
|
276
|
-
if (nextStates.length > 4 /* Recover.MaxNext */ << 1 || this.stack.length >= 120 /* Recover.DampenInsertStackDepth */) {
|
|
277
|
-
let best = [];
|
|
278
|
-
for (let i = 0, s; i < nextStates.length; i += 2) {
|
|
279
|
-
if ((s = nextStates[i + 1]) != this.state && this.p.parser.hasAction(s, next)) best.push(nextStates[i], s);
|
|
280
|
-
}
|
|
281
|
-
if (this.stack.length < 120 /* Recover.DampenInsertStackDepth */) for (let i = 0; best.length < 4 /* Recover.MaxNext */ << 1 && i < nextStates.length; i += 2) {
|
|
282
|
-
let s = nextStates[i + 1];
|
|
283
|
-
if (!best.some((v, i) => i & 1 && v == s)) best.push(nextStates[i], s);
|
|
284
|
-
}
|
|
285
|
-
nextStates = best;
|
|
286
|
-
}
|
|
287
|
-
let result = [];
|
|
288
|
-
for (let i = 0; i < nextStates.length && result.length < 4 /* Recover.MaxNext */; i += 2) {
|
|
289
|
-
let s = nextStates[i + 1];
|
|
290
|
-
if (s == this.state) continue;
|
|
291
|
-
let stack = this.split();
|
|
292
|
-
stack.pushState(s, this.pos);
|
|
293
|
-
stack.storeNode(0 /* Term.Err */, stack.pos, stack.pos, 4, true);
|
|
294
|
-
stack.shiftContext(nextStates[i], this.pos);
|
|
295
|
-
stack.score -= 200 /* Recover.Insert */;
|
|
296
|
-
result.push(stack);
|
|
297
|
-
}
|
|
298
|
-
return result;
|
|
299
|
-
}
|
|
300
|
-
// Force a reduce, if possible. Return false if that can't
|
|
301
|
-
// be done.
|
|
302
|
-
/// @internal
|
|
303
|
-
forceReduce() {
|
|
304
|
-
let reduce = this.p.parser.stateSlot(this.state, 5 /* ParseState.ForcedReduce */);
|
|
305
|
-
if ((reduce & 65536 /* Action.ReduceFlag */) == 0) return false;
|
|
306
|
-
let {
|
|
307
|
-
parser
|
|
308
|
-
} = this.p;
|
|
309
|
-
if (!parser.validAction(this.state, reduce)) {
|
|
310
|
-
let depth = reduce >> 19 /* Action.ReduceDepthShift */,
|
|
311
|
-
term = reduce & 65535 /* Action.ValueMask */;
|
|
312
|
-
let target = this.stack.length - depth * 3;
|
|
313
|
-
if (target < 0 || parser.getGoto(this.stack[target], term, false) < 0) return false;
|
|
314
|
-
this.storeNode(0 /* Term.Err */, this.reducePos, this.reducePos, 4, true);
|
|
315
|
-
this.score -= 100 /* Recover.Reduce */;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
this.reducePos = this.pos;
|
|
319
|
-
this.reduce(reduce);
|
|
320
|
-
return true;
|
|
321
|
-
}
|
|
322
|
-
/// @internal
|
|
323
|
-
forceAll() {
|
|
324
|
-
while (!this.p.parser.stateFlag(this.state, 2 /* StateFlag.Accepting */)) {
|
|
325
|
-
if (!this.forceReduce()) {
|
|
326
|
-
this.storeNode(0 /* Term.Err */, this.pos, this.pos, 4, true);
|
|
327
|
-
break;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
return this;
|
|
331
|
-
}
|
|
332
|
-
/// Check whether this state has no further actions (assumed to be a direct descendant of the
|
|
333
|
-
/// top state, since any other states must be able to continue
|
|
334
|
-
/// somehow). @internal
|
|
335
|
-
get deadEnd() {
|
|
336
|
-
if (this.stack.length != 3) return false;
|
|
337
|
-
let {
|
|
338
|
-
parser
|
|
339
|
-
} = this.p;
|
|
340
|
-
return parser.data[parser.stateSlot(this.state, 1 /* ParseState.Actions */)] == 65535 /* Seq.End */ && !parser.stateSlot(this.state, 4 /* ParseState.DefaultReduce */);
|
|
341
|
-
}
|
|
342
|
-
/// Restart the stack (put it back in its start state). Only safe
|
|
343
|
-
/// when this.stack.length == 3 (state is directly below the top
|
|
344
|
-
/// state). @internal
|
|
345
|
-
restart() {
|
|
346
|
-
this.state = this.stack[0];
|
|
347
|
-
this.stack.length = 0;
|
|
348
|
-
}
|
|
349
|
-
/// @internal
|
|
350
|
-
sameState(other) {
|
|
351
|
-
if (this.state != other.state || this.stack.length != other.stack.length) return false;
|
|
352
|
-
for (let i = 0; i < this.stack.length; i += 3) if (this.stack[i] != other.stack[i]) return false;
|
|
353
|
-
return true;
|
|
354
|
-
}
|
|
355
|
-
/// Get the parser used by this stack.
|
|
356
|
-
get parser() {
|
|
357
|
-
return this.p.parser;
|
|
358
|
-
}
|
|
359
|
-
/// Test whether a given dialect (by numeric ID, as exported from
|
|
360
|
-
/// the terms file) is enabled.
|
|
361
|
-
dialectEnabled(dialectID) {
|
|
362
|
-
return this.p.parser.dialect.flags[dialectID];
|
|
363
|
-
}
|
|
364
|
-
shiftContext(term, start) {
|
|
365
|
-
if (this.curContext) this.updateContext(this.curContext.tracker.shift(this.curContext.context, term, this, this.p.stream.reset(start)));
|
|
366
|
-
}
|
|
367
|
-
reduceContext(term, start) {
|
|
368
|
-
if (this.curContext) this.updateContext(this.curContext.tracker.reduce(this.curContext.context, term, this, this.p.stream.reset(start)));
|
|
369
|
-
}
|
|
370
|
-
/// @internal
|
|
371
|
-
emitContext() {
|
|
372
|
-
let last = this.buffer.length - 1;
|
|
373
|
-
if (last < 0 || this.buffer[last] != -3) this.buffer.push(this.curContext.hash, this.reducePos, this.reducePos, -3);
|
|
374
|
-
}
|
|
375
|
-
/// @internal
|
|
376
|
-
emitLookAhead() {
|
|
377
|
-
let last = this.buffer.length - 1;
|
|
378
|
-
if (last < 0 || this.buffer[last] != -4) this.buffer.push(this.lookAhead, this.reducePos, this.reducePos, -4);
|
|
379
|
-
}
|
|
380
|
-
updateContext(context) {
|
|
381
|
-
if (context != this.curContext.context) {
|
|
382
|
-
let newCx = new StackContext(this.curContext.tracker, context);
|
|
383
|
-
if (newCx.hash != this.curContext.hash) this.emitContext();
|
|
384
|
-
this.curContext = newCx;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
/// @internal
|
|
388
|
-
setLookAhead(lookAhead) {
|
|
389
|
-
if (lookAhead > this.lookAhead) {
|
|
390
|
-
this.emitLookAhead();
|
|
391
|
-
this.lookAhead = lookAhead;
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
/// @internal
|
|
395
|
-
close() {
|
|
396
|
-
if (this.curContext && this.curContext.tracker.strict) this.emitContext();
|
|
397
|
-
if (this.lookAhead > 0) this.emitLookAhead();
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
class StackContext {
|
|
401
|
-
constructor(tracker, context) {
|
|
402
|
-
this.tracker = tracker;
|
|
403
|
-
this.context = context;
|
|
404
|
-
this.hash = tracker.strict ? tracker.hash(context) : 0;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
var Recover;
|
|
408
|
-
(function (Recover) {
|
|
409
|
-
Recover[Recover["Insert"] = 200] = "Insert";
|
|
410
|
-
Recover[Recover["Delete"] = 190] = "Delete";
|
|
411
|
-
Recover[Recover["Reduce"] = 100] = "Reduce";
|
|
412
|
-
Recover[Recover["MaxNext"] = 4] = "MaxNext";
|
|
413
|
-
Recover[Recover["MaxInsertStackDepth"] = 300] = "MaxInsertStackDepth";
|
|
414
|
-
Recover[Recover["DampenInsertStackDepth"] = 120] = "DampenInsertStackDepth";
|
|
415
|
-
Recover[Recover["MinBigReduction"] = 2000] = "MinBigReduction";
|
|
416
|
-
})(Recover || (Recover = {}));
|
|
417
|
-
// Used to cheaply run some reductions to scan ahead without mutating
|
|
418
|
-
// an entire stack
|
|
419
|
-
class SimulatedStack {
|
|
420
|
-
constructor(start) {
|
|
421
|
-
this.start = start;
|
|
422
|
-
this.state = start.state;
|
|
423
|
-
this.stack = start.stack;
|
|
424
|
-
this.base = this.stack.length;
|
|
425
|
-
}
|
|
426
|
-
reduce(action) {
|
|
427
|
-
let term = action & 65535 /* Action.ValueMask */,
|
|
428
|
-
depth = action >> 19 /* Action.ReduceDepthShift */;
|
|
429
|
-
if (depth == 0) {
|
|
430
|
-
if (this.stack == this.start.stack) this.stack = this.stack.slice();
|
|
431
|
-
this.stack.push(this.state, 0, 0);
|
|
432
|
-
this.base += 3;
|
|
433
|
-
} else {
|
|
434
|
-
this.base -= (depth - 1) * 3;
|
|
435
|
-
}
|
|
436
|
-
let goto = this.start.p.parser.getGoto(this.stack[this.base - 3], term, true);
|
|
437
|
-
this.state = goto;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
// This is given to `Tree.build` to build a buffer, and encapsulates
|
|
441
|
-
// the parent-stack-walking necessary to read the nodes.
|
|
442
|
-
class StackBufferCursor {
|
|
443
|
-
constructor(stack, pos, index) {
|
|
444
|
-
this.stack = stack;
|
|
445
|
-
this.pos = pos;
|
|
446
|
-
this.index = index;
|
|
447
|
-
this.buffer = stack.buffer;
|
|
448
|
-
if (this.index == 0) this.maybeNext();
|
|
449
|
-
}
|
|
450
|
-
static create(stack) {
|
|
451
|
-
let pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : stack.bufferBase + stack.buffer.length;
|
|
452
|
-
return new StackBufferCursor(stack, pos, pos - stack.bufferBase);
|
|
453
|
-
}
|
|
454
|
-
maybeNext() {
|
|
455
|
-
let next = this.stack.parent;
|
|
456
|
-
if (next != null) {
|
|
457
|
-
this.index = this.stack.bufferBase - next.bufferBase;
|
|
458
|
-
this.stack = next;
|
|
459
|
-
this.buffer = next.buffer;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
get id() {
|
|
463
|
-
return this.buffer[this.index - 4];
|
|
464
|
-
}
|
|
465
|
-
get start() {
|
|
466
|
-
return this.buffer[this.index - 3];
|
|
467
|
-
}
|
|
468
|
-
get end() {
|
|
469
|
-
return this.buffer[this.index - 2];
|
|
470
|
-
}
|
|
471
|
-
get size() {
|
|
472
|
-
return this.buffer[this.index - 1];
|
|
473
|
-
}
|
|
474
|
-
next() {
|
|
475
|
-
this.index -= 4;
|
|
476
|
-
this.pos -= 4;
|
|
477
|
-
if (this.index == 0) this.maybeNext();
|
|
478
|
-
}
|
|
479
|
-
fork() {
|
|
480
|
-
return new StackBufferCursor(this.stack, this.pos, this.index);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// See lezer-generator/src/encode.ts for comments about the encoding
|
|
485
|
-
// used here
|
|
486
|
-
function decodeArray(input) {
|
|
487
|
-
let Type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Uint16Array;
|
|
488
|
-
if (typeof input != "string") return input;
|
|
489
|
-
let array = null;
|
|
490
|
-
for (let pos = 0, out = 0; pos < input.length;) {
|
|
491
|
-
let value = 0;
|
|
492
|
-
for (;;) {
|
|
493
|
-
let next = input.charCodeAt(pos++),
|
|
494
|
-
stop = false;
|
|
495
|
-
if (next == 126 /* Encode.BigValCode */) {
|
|
496
|
-
value = 65535 /* Encode.BigVal */;
|
|
497
|
-
break;
|
|
498
|
-
}
|
|
499
|
-
if (next >= 92 /* Encode.Gap2 */) next--;
|
|
500
|
-
if (next >= 34 /* Encode.Gap1 */) next--;
|
|
501
|
-
let digit = next - 32 /* Encode.Start */;
|
|
502
|
-
if (digit >= 46 /* Encode.Base */) {
|
|
503
|
-
digit -= 46 /* Encode.Base */;
|
|
504
|
-
stop = true;
|
|
505
|
-
}
|
|
506
|
-
value += digit;
|
|
507
|
-
if (stop) break;
|
|
508
|
-
value *= 46 /* Encode.Base */;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
if (array) array[out++] = value;else array = new Type(value);
|
|
512
|
-
}
|
|
513
|
-
return array;
|
|
514
|
-
}
|
|
515
|
-
class CachedToken {
|
|
516
|
-
constructor() {
|
|
517
|
-
this.start = -1;
|
|
518
|
-
this.value = -1;
|
|
519
|
-
this.end = -1;
|
|
520
|
-
this.extended = -1;
|
|
521
|
-
this.lookAhead = 0;
|
|
522
|
-
this.mask = 0;
|
|
523
|
-
this.context = 0;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
const nullToken = new CachedToken();
|
|
527
|
-
/// [Tokenizers](#lr.ExternalTokenizer) interact with the input
|
|
528
|
-
/// through this interface. It presents the input as a stream of
|
|
529
|
-
/// characters, tracking lookahead and hiding the complexity of
|
|
530
|
-
/// [ranges](#common.Parser.parse^ranges) from tokenizer code.
|
|
531
|
-
class InputStream {
|
|
532
|
-
/// @internal
|
|
533
|
-
constructor(
|
|
534
|
-
/// @internal
|
|
535
|
-
input,
|
|
536
|
-
/// @internal
|
|
537
|
-
ranges) {
|
|
538
|
-
this.input = input;
|
|
539
|
-
this.ranges = ranges;
|
|
540
|
-
/// @internal
|
|
541
|
-
this.chunk = "";
|
|
542
|
-
/// @internal
|
|
543
|
-
this.chunkOff = 0;
|
|
544
|
-
/// Backup chunk
|
|
545
|
-
this.chunk2 = "";
|
|
546
|
-
this.chunk2Pos = 0;
|
|
547
|
-
/// The character code of the next code unit in the input, or -1
|
|
548
|
-
/// when the stream is at the end of the input.
|
|
549
|
-
this.next = -1;
|
|
550
|
-
/// @internal
|
|
551
|
-
this.token = nullToken;
|
|
552
|
-
this.rangeIndex = 0;
|
|
553
|
-
this.pos = this.chunkPos = ranges[0].from;
|
|
554
|
-
this.range = ranges[0];
|
|
555
|
-
this.end = ranges[ranges.length - 1].to;
|
|
556
|
-
this.readNext();
|
|
557
|
-
}
|
|
558
|
-
/// @internal
|
|
559
|
-
resolveOffset(offset, assoc) {
|
|
560
|
-
let range = this.range,
|
|
561
|
-
index = this.rangeIndex;
|
|
562
|
-
let pos = this.pos + offset;
|
|
563
|
-
while (pos < range.from) {
|
|
564
|
-
if (!index) return null;
|
|
565
|
-
let next = this.ranges[--index];
|
|
566
|
-
pos -= range.from - next.to;
|
|
567
|
-
range = next;
|
|
568
|
-
}
|
|
569
|
-
while (assoc < 0 ? pos > range.to : pos >= range.to) {
|
|
570
|
-
if (index == this.ranges.length - 1) return null;
|
|
571
|
-
let next = this.ranges[++index];
|
|
572
|
-
pos += next.from - range.to;
|
|
573
|
-
range = next;
|
|
574
|
-
}
|
|
575
|
-
return pos;
|
|
576
|
-
}
|
|
577
|
-
/// @internal
|
|
578
|
-
clipPos(pos) {
|
|
579
|
-
if (pos >= this.range.from && pos < this.range.to) return pos;
|
|
580
|
-
for (let range of this.ranges) if (range.to > pos) return Math.max(pos, range.from);
|
|
581
|
-
return this.end;
|
|
582
|
-
}
|
|
583
|
-
/// Look at a code unit near the stream position. `.peek(0)` equals
|
|
584
|
-
/// `.next`, `.peek(-1)` gives you the previous character, and so
|
|
585
|
-
/// on.
|
|
586
|
-
///
|
|
587
|
-
/// Note that looking around during tokenizing creates dependencies
|
|
588
|
-
/// on potentially far-away content, which may reduce the
|
|
589
|
-
/// effectiveness incremental parsing—when looking forward—or even
|
|
590
|
-
/// cause invalid reparses when looking backward more than 25 code
|
|
591
|
-
/// units, since the library does not track lookbehind.
|
|
592
|
-
peek(offset) {
|
|
593
|
-
let idx = this.chunkOff + offset,
|
|
594
|
-
pos,
|
|
595
|
-
result;
|
|
596
|
-
if (idx >= 0 && idx < this.chunk.length) {
|
|
597
|
-
pos = this.pos + offset;
|
|
598
|
-
result = this.chunk.charCodeAt(idx);
|
|
599
|
-
} else {
|
|
600
|
-
let resolved = this.resolveOffset(offset, 1);
|
|
601
|
-
if (resolved == null) return -1;
|
|
602
|
-
pos = resolved;
|
|
603
|
-
if (pos >= this.chunk2Pos && pos < this.chunk2Pos + this.chunk2.length) {
|
|
604
|
-
result = this.chunk2.charCodeAt(pos - this.chunk2Pos);
|
|
605
|
-
} else {
|
|
606
|
-
let i = this.rangeIndex,
|
|
607
|
-
range = this.range;
|
|
608
|
-
while (range.to <= pos) range = this.ranges[++i];
|
|
609
|
-
this.chunk2 = this.input.chunk(this.chunk2Pos = pos);
|
|
610
|
-
if (pos + this.chunk2.length > range.to) this.chunk2 = this.chunk2.slice(0, range.to - pos);
|
|
611
|
-
result = this.chunk2.charCodeAt(0);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
if (pos >= this.token.lookAhead) this.token.lookAhead = pos + 1;
|
|
615
|
-
return result;
|
|
616
|
-
}
|
|
617
|
-
/// Accept a token. By default, the end of the token is set to the
|
|
618
|
-
/// current stream position, but you can pass an offset (relative to
|
|
619
|
-
/// the stream position) to change that.
|
|
620
|
-
acceptToken(token) {
|
|
621
|
-
let endOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
622
|
-
let end = endOffset ? this.resolveOffset(endOffset, -1) : this.pos;
|
|
623
|
-
if (end == null || end < this.token.start) throw new RangeError("Token end out of bounds");
|
|
624
|
-
this.token.value = token;
|
|
625
|
-
this.token.end = end;
|
|
626
|
-
}
|
|
627
|
-
getChunk() {
|
|
628
|
-
if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
|
|
629
|
-
let {
|
|
630
|
-
chunk,
|
|
631
|
-
chunkPos
|
|
632
|
-
} = this;
|
|
633
|
-
this.chunk = this.chunk2;
|
|
634
|
-
this.chunkPos = this.chunk2Pos;
|
|
635
|
-
this.chunk2 = chunk;
|
|
636
|
-
this.chunk2Pos = chunkPos;
|
|
637
|
-
this.chunkOff = this.pos - this.chunkPos;
|
|
638
|
-
} else {
|
|
639
|
-
this.chunk2 = this.chunk;
|
|
640
|
-
this.chunk2Pos = this.chunkPos;
|
|
641
|
-
let nextChunk = this.input.chunk(this.pos);
|
|
642
|
-
let end = this.pos + nextChunk.length;
|
|
643
|
-
this.chunk = end > this.range.to ? nextChunk.slice(0, this.range.to - this.pos) : nextChunk;
|
|
644
|
-
this.chunkPos = this.pos;
|
|
645
|
-
this.chunkOff = 0;
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
readNext() {
|
|
649
|
-
if (this.chunkOff >= this.chunk.length) {
|
|
650
|
-
this.getChunk();
|
|
651
|
-
if (this.chunkOff == this.chunk.length) return this.next = -1;
|
|
652
|
-
}
|
|
653
|
-
return this.next = this.chunk.charCodeAt(this.chunkOff);
|
|
654
|
-
}
|
|
655
|
-
/// Move the stream forward N (defaults to 1) code units. Returns
|
|
656
|
-
/// the new value of [`next`](#lr.InputStream.next).
|
|
657
|
-
advance() {
|
|
658
|
-
let n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
659
|
-
this.chunkOff += n;
|
|
660
|
-
while (this.pos + n >= this.range.to) {
|
|
661
|
-
if (this.rangeIndex == this.ranges.length - 1) return this.setDone();
|
|
662
|
-
n -= this.range.to - this.pos;
|
|
663
|
-
this.range = this.ranges[++this.rangeIndex];
|
|
664
|
-
this.pos = this.range.from;
|
|
665
|
-
}
|
|
666
|
-
this.pos += n;
|
|
667
|
-
if (this.pos >= this.token.lookAhead) this.token.lookAhead = this.pos + 1;
|
|
668
|
-
return this.readNext();
|
|
669
|
-
}
|
|
670
|
-
setDone() {
|
|
671
|
-
this.pos = this.chunkPos = this.end;
|
|
672
|
-
this.range = this.ranges[this.rangeIndex = this.ranges.length - 1];
|
|
673
|
-
this.chunk = "";
|
|
674
|
-
return this.next = -1;
|
|
675
|
-
}
|
|
676
|
-
/// @internal
|
|
677
|
-
reset(pos, token) {
|
|
678
|
-
if (token) {
|
|
679
|
-
this.token = token;
|
|
680
|
-
token.start = pos;
|
|
681
|
-
token.lookAhead = pos + 1;
|
|
682
|
-
token.value = token.extended = -1;
|
|
683
|
-
} else {
|
|
684
|
-
this.token = nullToken;
|
|
685
|
-
}
|
|
686
|
-
if (this.pos != pos) {
|
|
687
|
-
this.pos = pos;
|
|
688
|
-
if (pos == this.end) {
|
|
689
|
-
this.setDone();
|
|
690
|
-
return this;
|
|
691
|
-
}
|
|
692
|
-
while (pos < this.range.from) this.range = this.ranges[--this.rangeIndex];
|
|
693
|
-
while (pos >= this.range.to) this.range = this.ranges[++this.rangeIndex];
|
|
694
|
-
if (pos >= this.chunkPos && pos < this.chunkPos + this.chunk.length) {
|
|
695
|
-
this.chunkOff = pos - this.chunkPos;
|
|
696
|
-
} else {
|
|
697
|
-
this.chunk = "";
|
|
698
|
-
this.chunkOff = 0;
|
|
699
|
-
}
|
|
700
|
-
this.readNext();
|
|
701
|
-
}
|
|
702
|
-
return this;
|
|
703
|
-
}
|
|
704
|
-
/// @internal
|
|
705
|
-
read(from, to) {
|
|
706
|
-
if (from >= this.chunkPos && to <= this.chunkPos + this.chunk.length) return this.chunk.slice(from - this.chunkPos, to - this.chunkPos);
|
|
707
|
-
if (from >= this.chunk2Pos && to <= this.chunk2Pos + this.chunk2.length) return this.chunk2.slice(from - this.chunk2Pos, to - this.chunk2Pos);
|
|
708
|
-
if (from >= this.range.from && to <= this.range.to) return this.input.read(from, to);
|
|
709
|
-
let result = "";
|
|
710
|
-
for (let r of this.ranges) {
|
|
711
|
-
if (r.from >= to) break;
|
|
712
|
-
if (r.to > from) result += this.input.read(Math.max(r.from, from), Math.min(r.to, to));
|
|
713
|
-
}
|
|
714
|
-
return result;
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
/// @internal
|
|
718
|
-
class TokenGroup {
|
|
719
|
-
constructor(data, id) {
|
|
720
|
-
this.data = data;
|
|
721
|
-
this.id = id;
|
|
722
|
-
}
|
|
723
|
-
token(input, stack) {
|
|
724
|
-
let {
|
|
725
|
-
parser
|
|
726
|
-
} = stack.p;
|
|
727
|
-
readToken(this.data, input, stack, this.id, parser.data, parser.tokenPrecTable);
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
TokenGroup.prototype.contextual = TokenGroup.prototype.fallback = TokenGroup.prototype.extend = false;
|
|
731
|
-
/// @hide
|
|
732
|
-
class LocalTokenGroup {
|
|
733
|
-
constructor(data, precTable, elseToken) {
|
|
734
|
-
this.precTable = precTable;
|
|
735
|
-
this.elseToken = elseToken;
|
|
736
|
-
this.data = typeof data == "string" ? decodeArray(data) : data;
|
|
737
|
-
}
|
|
738
|
-
token(input, stack) {
|
|
739
|
-
let start = input.pos,
|
|
740
|
-
skipped = 0;
|
|
741
|
-
for (;;) {
|
|
742
|
-
readToken(this.data, input, stack, 0, this.data, this.precTable);
|
|
743
|
-
if (input.token.value > -1) break;
|
|
744
|
-
if (this.elseToken == null) return;
|
|
745
|
-
if (input.next < 0) break;
|
|
746
|
-
input.advance();
|
|
747
|
-
input.reset(input.pos, input.token);
|
|
748
|
-
skipped++;
|
|
749
|
-
}
|
|
750
|
-
if (skipped) {
|
|
751
|
-
input.reset(start, input.token);
|
|
752
|
-
input.acceptToken(this.elseToken, skipped);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
LocalTokenGroup.prototype.contextual = TokenGroup.prototype.fallback = TokenGroup.prototype.extend = false;
|
|
757
|
-
/// `@external tokens` declarations in the grammar should resolve to
|
|
758
|
-
/// an instance of this class.
|
|
759
|
-
class ExternalTokenizer {
|
|
760
|
-
/// Create a tokenizer. The first argument is the function that,
|
|
761
|
-
/// given an input stream, scans for the types of tokens it
|
|
762
|
-
/// recognizes at the stream's position, and calls
|
|
763
|
-
/// [`acceptToken`](#lr.InputStream.acceptToken) when it finds
|
|
764
|
-
/// one.
|
|
765
|
-
constructor(
|
|
766
|
-
/// @internal
|
|
767
|
-
token) {
|
|
768
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
769
|
-
this.token = token;
|
|
770
|
-
this.contextual = !!options.contextual;
|
|
771
|
-
this.fallback = !!options.fallback;
|
|
772
|
-
this.extend = !!options.extend;
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
// Tokenizer data is stored a big uint16 array containing, for each
|
|
776
|
-
// state:
|
|
777
|
-
//
|
|
778
|
-
// - A group bitmask, indicating what token groups are reachable from
|
|
779
|
-
// this state, so that paths that can only lead to tokens not in
|
|
780
|
-
// any of the current groups can be cut off early.
|
|
781
|
-
//
|
|
782
|
-
// - The position of the end of the state's sequence of accepting
|
|
783
|
-
// tokens
|
|
784
|
-
//
|
|
785
|
-
// - The number of outgoing edges for the state
|
|
786
|
-
//
|
|
787
|
-
// - The accepting tokens, as (token id, group mask) pairs
|
|
788
|
-
//
|
|
789
|
-
// - The outgoing edges, as (start character, end character, state
|
|
790
|
-
// index) triples, with end character being exclusive
|
|
791
|
-
//
|
|
792
|
-
// This function interprets that data, running through a stream as
|
|
793
|
-
// long as new states with the a matching group mask can be reached,
|
|
794
|
-
// and updating `input.token` when it matches a token.
|
|
795
|
-
function readToken(data, input, stack, group, precTable, precOffset) {
|
|
796
|
-
let state = 0,
|
|
797
|
-
groupMask = 1 << group,
|
|
798
|
-
{
|
|
799
|
-
dialect
|
|
800
|
-
} = stack.p.parser;
|
|
801
|
-
scan: for (;;) {
|
|
802
|
-
if ((groupMask & data[state]) == 0) break;
|
|
803
|
-
let accEnd = data[state + 1];
|
|
804
|
-
// Check whether this state can lead to a token in the current group
|
|
805
|
-
// Accept tokens in this state, possibly overwriting
|
|
806
|
-
// lower-precedence / shorter tokens
|
|
807
|
-
for (let i = state + 3; i < accEnd; i += 2) if ((data[i + 1] & groupMask) > 0) {
|
|
808
|
-
let term = data[i];
|
|
809
|
-
if (dialect.allows(term) && (input.token.value == -1 || input.token.value == term || overrides(term, input.token.value, precTable, precOffset))) {
|
|
810
|
-
input.acceptToken(term);
|
|
811
|
-
break;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
let next = input.next,
|
|
815
|
-
low = 0,
|
|
816
|
-
high = data[state + 2];
|
|
817
|
-
// Special case for EOF
|
|
818
|
-
if (input.next < 0 && high > low && data[accEnd + high * 3 - 3] == 65535 /* Seq.End */ && data[accEnd + high * 3 - 3] == 65535 /* Seq.End */) {
|
|
819
|
-
state = data[accEnd + high * 3 - 1];
|
|
820
|
-
continue scan;
|
|
821
|
-
}
|
|
822
|
-
// Do a binary search on the state's edges
|
|
823
|
-
for (; low < high;) {
|
|
824
|
-
let mid = low + high >> 1;
|
|
825
|
-
let index = accEnd + mid + (mid << 1);
|
|
826
|
-
let from = data[index],
|
|
827
|
-
to = data[index + 1] || 0x10000;
|
|
828
|
-
if (next < from) high = mid;else if (next >= to) low = mid + 1;else {
|
|
829
|
-
state = data[index + 2];
|
|
830
|
-
input.advance();
|
|
831
|
-
continue scan;
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
break;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
function findOffset(data, start, term) {
|
|
838
|
-
for (let i = start, next; (next = data[i]) != 65535 /* Seq.End */; i++) if (next == term) return i - start;
|
|
839
|
-
return -1;
|
|
840
|
-
}
|
|
841
|
-
function overrides(token, prev, tableData, tableOffset) {
|
|
842
|
-
let iPrev = findOffset(tableData, tableOffset, prev);
|
|
843
|
-
return iPrev < 0 || findOffset(tableData, tableOffset, token) < iPrev;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
// Environment variable used to control console output
|
|
847
|
-
const verbose = typeof process != "undefined" && process.env && /\bparse\b/.test(process.env.LOG);
|
|
848
|
-
let stackIDs = null;
|
|
849
|
-
var Safety;
|
|
850
|
-
(function (Safety) {
|
|
851
|
-
Safety[Safety["Margin"] = 25] = "Margin";
|
|
852
|
-
})(Safety || (Safety = {}));
|
|
853
|
-
function cutAt(tree, pos, side) {
|
|
854
|
-
let cursor = tree.cursor(IterMode.IncludeAnonymous);
|
|
855
|
-
cursor.moveTo(pos);
|
|
856
|
-
for (;;) {
|
|
857
|
-
if (!(side < 0 ? cursor.childBefore(pos) : cursor.childAfter(pos))) for (;;) {
|
|
858
|
-
if ((side < 0 ? cursor.to < pos : cursor.from > pos) && !cursor.type.isError) return side < 0 ? Math.max(0, Math.min(cursor.to - 1, pos - 25 /* Safety.Margin */)) : Math.min(tree.length, Math.max(cursor.from + 1, pos + 25 /* Safety.Margin */));
|
|
859
|
-
if (side < 0 ? cursor.prevSibling() : cursor.nextSibling()) break;
|
|
860
|
-
if (!cursor.parent()) return side < 0 ? 0 : tree.length;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
class FragmentCursor {
|
|
865
|
-
constructor(fragments, nodeSet) {
|
|
866
|
-
this.fragments = fragments;
|
|
867
|
-
this.nodeSet = nodeSet;
|
|
868
|
-
this.i = 0;
|
|
869
|
-
this.fragment = null;
|
|
870
|
-
this.safeFrom = -1;
|
|
871
|
-
this.safeTo = -1;
|
|
872
|
-
this.trees = [];
|
|
873
|
-
this.start = [];
|
|
874
|
-
this.index = [];
|
|
875
|
-
this.nextFragment();
|
|
876
|
-
}
|
|
877
|
-
nextFragment() {
|
|
878
|
-
let fr = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
|
|
879
|
-
if (fr) {
|
|
880
|
-
this.safeFrom = fr.openStart ? cutAt(fr.tree, fr.from + fr.offset, 1) - fr.offset : fr.from;
|
|
881
|
-
this.safeTo = fr.openEnd ? cutAt(fr.tree, fr.to + fr.offset, -1) - fr.offset : fr.to;
|
|
882
|
-
while (this.trees.length) {
|
|
883
|
-
this.trees.pop();
|
|
884
|
-
this.start.pop();
|
|
885
|
-
this.index.pop();
|
|
886
|
-
}
|
|
887
|
-
this.trees.push(fr.tree);
|
|
888
|
-
this.start.push(-fr.offset);
|
|
889
|
-
this.index.push(0);
|
|
890
|
-
this.nextStart = this.safeFrom;
|
|
891
|
-
} else {
|
|
892
|
-
this.nextStart = 1e9;
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
// `pos` must be >= any previously given `pos` for this cursor
|
|
896
|
-
nodeAt(pos) {
|
|
897
|
-
if (pos < this.nextStart) return null;
|
|
898
|
-
while (this.fragment && this.safeTo <= pos) this.nextFragment();
|
|
899
|
-
if (!this.fragment) return null;
|
|
900
|
-
for (;;) {
|
|
901
|
-
let last = this.trees.length - 1;
|
|
902
|
-
if (last < 0) {
|
|
903
|
-
// End of tree
|
|
904
|
-
this.nextFragment();
|
|
905
|
-
return null;
|
|
906
|
-
}
|
|
907
|
-
let top = this.trees[last],
|
|
908
|
-
index = this.index[last];
|
|
909
|
-
if (index == top.children.length) {
|
|
910
|
-
this.trees.pop();
|
|
911
|
-
this.start.pop();
|
|
912
|
-
this.index.pop();
|
|
913
|
-
continue;
|
|
914
|
-
}
|
|
915
|
-
let next = top.children[index];
|
|
916
|
-
let start = this.start[last] + top.positions[index];
|
|
917
|
-
if (start > pos) {
|
|
918
|
-
this.nextStart = start;
|
|
919
|
-
return null;
|
|
920
|
-
}
|
|
921
|
-
if (next instanceof Tree) {
|
|
922
|
-
if (start == pos) {
|
|
923
|
-
if (start < this.safeFrom) return null;
|
|
924
|
-
let end = start + next.length;
|
|
925
|
-
if (end <= this.safeTo) {
|
|
926
|
-
let lookAhead = next.prop(NodeProp.lookAhead);
|
|
927
|
-
if (!lookAhead || end + lookAhead < this.fragment.to) return next;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
this.index[last]++;
|
|
931
|
-
if (start + next.length >= Math.max(this.safeFrom, pos)) {
|
|
932
|
-
// Enter this node
|
|
933
|
-
this.trees.push(next);
|
|
934
|
-
this.start.push(start);
|
|
935
|
-
this.index.push(0);
|
|
936
|
-
}
|
|
937
|
-
} else {
|
|
938
|
-
this.index[last]++;
|
|
939
|
-
this.nextStart = start + next.length;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
class TokenCache {
|
|
945
|
-
constructor(parser, stream) {
|
|
946
|
-
this.stream = stream;
|
|
947
|
-
this.tokens = [];
|
|
948
|
-
this.mainToken = null;
|
|
949
|
-
this.actions = [];
|
|
950
|
-
this.tokens = parser.tokenizers.map(_ => new CachedToken());
|
|
951
|
-
}
|
|
952
|
-
getActions(stack) {
|
|
953
|
-
let actionIndex = 0;
|
|
954
|
-
let main = null;
|
|
955
|
-
let {
|
|
956
|
-
parser
|
|
957
|
-
} = stack.p,
|
|
958
|
-
{
|
|
959
|
-
tokenizers
|
|
960
|
-
} = parser;
|
|
961
|
-
let mask = parser.stateSlot(stack.state, 3 /* ParseState.TokenizerMask */);
|
|
962
|
-
let context = stack.curContext ? stack.curContext.hash : 0;
|
|
963
|
-
let lookAhead = 0;
|
|
964
|
-
for (let i = 0; i < tokenizers.length; i++) {
|
|
965
|
-
if ((1 << i & mask) == 0) continue;
|
|
966
|
-
let tokenizer = tokenizers[i],
|
|
967
|
-
token = this.tokens[i];
|
|
968
|
-
if (main && !tokenizer.fallback) continue;
|
|
969
|
-
if (tokenizer.contextual || token.start != stack.pos || token.mask != mask || token.context != context) {
|
|
970
|
-
this.updateCachedToken(token, tokenizer, stack);
|
|
971
|
-
token.mask = mask;
|
|
972
|
-
token.context = context;
|
|
973
|
-
}
|
|
974
|
-
if (token.lookAhead > token.end + 25 /* Safety.Margin */) lookAhead = Math.max(token.lookAhead, lookAhead);
|
|
975
|
-
if (token.value != 0 /* Term.Err */) {
|
|
976
|
-
let startIndex = actionIndex;
|
|
977
|
-
if (token.extended > -1) actionIndex = this.addActions(stack, token.extended, token.end, actionIndex);
|
|
978
|
-
actionIndex = this.addActions(stack, token.value, token.end, actionIndex);
|
|
979
|
-
if (!tokenizer.extend) {
|
|
980
|
-
main = token;
|
|
981
|
-
if (actionIndex > startIndex) break;
|
|
982
|
-
}
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
while (this.actions.length > actionIndex) this.actions.pop();
|
|
986
|
-
if (lookAhead) stack.setLookAhead(lookAhead);
|
|
987
|
-
if (!main && stack.pos == this.stream.end) {
|
|
988
|
-
main = new CachedToken();
|
|
989
|
-
main.value = stack.p.parser.eofTerm;
|
|
990
|
-
main.start = main.end = stack.pos;
|
|
991
|
-
actionIndex = this.addActions(stack, main.value, main.end, actionIndex);
|
|
992
|
-
}
|
|
993
|
-
this.mainToken = main;
|
|
994
|
-
return this.actions;
|
|
995
|
-
}
|
|
996
|
-
getMainToken(stack) {
|
|
997
|
-
if (this.mainToken) return this.mainToken;
|
|
998
|
-
let main = new CachedToken(),
|
|
999
|
-
{
|
|
1000
|
-
pos,
|
|
1001
|
-
p
|
|
1002
|
-
} = stack;
|
|
1003
|
-
main.start = pos;
|
|
1004
|
-
main.end = Math.min(pos + 1, p.stream.end);
|
|
1005
|
-
main.value = pos == p.stream.end ? p.parser.eofTerm : 0 /* Term.Err */;
|
|
1006
|
-
return main;
|
|
1007
|
-
}
|
|
1008
|
-
updateCachedToken(token, tokenizer, stack) {
|
|
1009
|
-
let start = this.stream.clipPos(stack.pos);
|
|
1010
|
-
tokenizer.token(this.stream.reset(start, token), stack);
|
|
1011
|
-
if (token.value > -1) {
|
|
1012
|
-
let {
|
|
1013
|
-
parser
|
|
1014
|
-
} = stack.p;
|
|
1015
|
-
for (let i = 0; i < parser.specialized.length; i++) if (parser.specialized[i] == token.value) {
|
|
1016
|
-
let result = parser.specializers[i](this.stream.read(token.start, token.end), stack);
|
|
1017
|
-
if (result >= 0 && stack.p.parser.dialect.allows(result >> 1)) {
|
|
1018
|
-
if ((result & 1) == 0 /* Specialize.Specialize */) token.value = result >> 1;else token.extended = result >> 1;
|
|
1019
|
-
break;
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
} else {
|
|
1023
|
-
token.value = 0 /* Term.Err */;
|
|
1024
|
-
token.end = this.stream.clipPos(start + 1);
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
putAction(action, token, end, index) {
|
|
1028
|
-
// Don't add duplicate actions
|
|
1029
|
-
for (let i = 0; i < index; i += 3) if (this.actions[i] == action) return index;
|
|
1030
|
-
this.actions[index++] = action;
|
|
1031
|
-
this.actions[index++] = token;
|
|
1032
|
-
this.actions[index++] = end;
|
|
1033
|
-
return index;
|
|
1034
|
-
}
|
|
1035
|
-
addActions(stack, token, end, index) {
|
|
1036
|
-
let {
|
|
1037
|
-
state
|
|
1038
|
-
} = stack,
|
|
1039
|
-
{
|
|
1040
|
-
parser
|
|
1041
|
-
} = stack.p,
|
|
1042
|
-
{
|
|
1043
|
-
data
|
|
1044
|
-
} = parser;
|
|
1045
|
-
for (let set = 0; set < 2; set++) {
|
|
1046
|
-
for (let i = parser.stateSlot(state, set ? 2 /* ParseState.Skip */ : 1 /* ParseState.Actions */);; i += 3) {
|
|
1047
|
-
if (data[i] == 65535 /* Seq.End */) {
|
|
1048
|
-
if (data[i + 1] == 1 /* Seq.Next */) {
|
|
1049
|
-
i = pair(data, i + 2);
|
|
1050
|
-
} else {
|
|
1051
|
-
if (index == 0 && data[i + 1] == 2 /* Seq.Other */) index = this.putAction(pair(data, i + 2), token, end, index);
|
|
1052
|
-
break;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
if (data[i] == token) index = this.putAction(pair(data, i + 1), token, end, index);
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
return index;
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
var Rec;
|
|
1062
|
-
(function (Rec) {
|
|
1063
|
-
Rec[Rec["Distance"] = 5] = "Distance";
|
|
1064
|
-
Rec[Rec["MaxRemainingPerStep"] = 3] = "MaxRemainingPerStep";
|
|
1065
|
-
// When two stacks have been running independently long enough to
|
|
1066
|
-
// add this many elements to their buffers, prune one.
|
|
1067
|
-
Rec[Rec["MinBufferLengthPrune"] = 500] = "MinBufferLengthPrune";
|
|
1068
|
-
Rec[Rec["ForceReduceLimit"] = 10] = "ForceReduceLimit";
|
|
1069
|
-
// Once a stack reaches this depth (in .stack.length) force-reduce
|
|
1070
|
-
// it back to CutTo to avoid creating trees that overflow the stack
|
|
1071
|
-
// on recursive traversal.
|
|
1072
|
-
Rec[Rec["CutDepth"] = 15000] = "CutDepth";
|
|
1073
|
-
Rec[Rec["CutTo"] = 9000] = "CutTo";
|
|
1074
|
-
Rec[Rec["MaxLeftAssociativeReductionCount"] = 300] = "MaxLeftAssociativeReductionCount";
|
|
1075
|
-
// The maximum number of non-recovering stacks to explore (to avoid
|
|
1076
|
-
// getting bogged down with exponentially multiplying stacks in
|
|
1077
|
-
// ambiguous content)
|
|
1078
|
-
Rec[Rec["MaxStackCount"] = 12] = "MaxStackCount";
|
|
1079
|
-
})(Rec || (Rec = {}));
|
|
1080
|
-
class Parse {
|
|
1081
|
-
constructor(parser, input, fragments, ranges) {
|
|
1082
|
-
this.parser = parser;
|
|
1083
|
-
this.input = input;
|
|
1084
|
-
this.ranges = ranges;
|
|
1085
|
-
this.recovering = 0;
|
|
1086
|
-
this.nextStackID = 0x2654; // ♔, ♕, ♖, ♗, ♘, ♙, ♠, ♡, ♢, ♣, ♤, ♥, ♦, ♧
|
|
1087
|
-
this.minStackPos = 0;
|
|
1088
|
-
this.reused = [];
|
|
1089
|
-
this.stoppedAt = null;
|
|
1090
|
-
this.lastBigReductionStart = -1;
|
|
1091
|
-
this.lastBigReductionSize = 0;
|
|
1092
|
-
this.bigReductionCount = 0;
|
|
1093
|
-
this.stream = new InputStream(input, ranges);
|
|
1094
|
-
this.tokens = new TokenCache(parser, this.stream);
|
|
1095
|
-
this.topTerm = parser.top[1];
|
|
1096
|
-
let {
|
|
1097
|
-
from
|
|
1098
|
-
} = ranges[0];
|
|
1099
|
-
this.stacks = [Stack.start(this, parser.top[0], from)];
|
|
1100
|
-
this.fragments = fragments.length && this.stream.end - from > parser.bufferLength * 4 ? new FragmentCursor(fragments, parser.nodeSet) : null;
|
|
1101
|
-
}
|
|
1102
|
-
get parsedPos() {
|
|
1103
|
-
return this.minStackPos;
|
|
1104
|
-
}
|
|
1105
|
-
// Move the parser forward. This will process all parse stacks at
|
|
1106
|
-
// `this.pos` and try to advance them to a further position. If no
|
|
1107
|
-
// stack for such a position is found, it'll start error-recovery.
|
|
1108
|
-
//
|
|
1109
|
-
// When the parse is finished, this will return a syntax tree. When
|
|
1110
|
-
// not, it returns `null`.
|
|
1111
|
-
advance() {
|
|
1112
|
-
let stacks = this.stacks,
|
|
1113
|
-
pos = this.minStackPos;
|
|
1114
|
-
// This will hold stacks beyond `pos`.
|
|
1115
|
-
let newStacks = this.stacks = [];
|
|
1116
|
-
let stopped, stoppedTokens;
|
|
1117
|
-
// If a large amount of reductions happened with the same start
|
|
1118
|
-
// position, force the stack out of that production in order to
|
|
1119
|
-
// avoid creating a tree too deep to recurse through.
|
|
1120
|
-
// (This is an ugly kludge, because unfortunately there is no
|
|
1121
|
-
// straightforward, cheap way to check for this happening, due to
|
|
1122
|
-
// the history of reductions only being available in an
|
|
1123
|
-
// expensive-to-access format in the stack buffers.)
|
|
1124
|
-
if (this.bigReductionCount > 300 /* Rec.MaxLeftAssociativeReductionCount */ && stacks.length == 1) {
|
|
1125
|
-
let [s] = stacks;
|
|
1126
|
-
while (s.forceReduce() && s.stack.length && s.stack[s.stack.length - 2] >= this.lastBigReductionStart) {}
|
|
1127
|
-
this.bigReductionCount = this.lastBigReductionSize = 0;
|
|
1128
|
-
}
|
|
1129
|
-
// Keep advancing any stacks at `pos` until they either move
|
|
1130
|
-
// forward or can't be advanced. Gather stacks that can't be
|
|
1131
|
-
// advanced further in `stopped`.
|
|
1132
|
-
for (let i = 0; i < stacks.length; i++) {
|
|
1133
|
-
let stack = stacks[i];
|
|
1134
|
-
for (;;) {
|
|
1135
|
-
this.tokens.mainToken = null;
|
|
1136
|
-
if (stack.pos > pos) {
|
|
1137
|
-
newStacks.push(stack);
|
|
1138
|
-
} else if (this.advanceStack(stack, newStacks, stacks)) {
|
|
1139
|
-
continue;
|
|
1140
|
-
} else {
|
|
1141
|
-
if (!stopped) {
|
|
1142
|
-
stopped = [];
|
|
1143
|
-
stoppedTokens = [];
|
|
1144
|
-
}
|
|
1145
|
-
stopped.push(stack);
|
|
1146
|
-
let tok = this.tokens.getMainToken(stack);
|
|
1147
|
-
stoppedTokens.push(tok.value, tok.end);
|
|
1148
|
-
}
|
|
1149
|
-
break;
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
if (!newStacks.length) {
|
|
1153
|
-
let finished = stopped && findFinished(stopped);
|
|
1154
|
-
if (finished) return this.stackToTree(finished);
|
|
1155
|
-
if (this.parser.strict) {
|
|
1156
|
-
if (verbose && stopped) console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none"));
|
|
1157
|
-
throw new SyntaxError("No parse at " + pos);
|
|
1158
|
-
}
|
|
1159
|
-
if (!this.recovering) this.recovering = 5 /* Rec.Distance */;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
if (this.recovering && stopped) {
|
|
1163
|
-
let finished = this.stoppedAt != null && stopped[0].pos > this.stoppedAt ? stopped[0] : this.runRecovery(stopped, stoppedTokens, newStacks);
|
|
1164
|
-
if (finished) return this.stackToTree(finished.forceAll());
|
|
1165
|
-
}
|
|
1166
|
-
if (this.recovering) {
|
|
1167
|
-
let maxRemaining = this.recovering == 1 ? 1 : this.recovering * 3 /* Rec.MaxRemainingPerStep */;
|
|
1168
|
-
if (newStacks.length > maxRemaining) {
|
|
1169
|
-
newStacks.sort((a, b) => b.score - a.score);
|
|
1170
|
-
while (newStacks.length > maxRemaining) newStacks.pop();
|
|
1171
|
-
}
|
|
1172
|
-
if (newStacks.some(s => s.reducePos > pos)) this.recovering--;
|
|
1173
|
-
} else if (newStacks.length > 1) {
|
|
1174
|
-
// Prune stacks that are in the same state, or that have been
|
|
1175
|
-
// running without splitting for a while, to avoid getting stuck
|
|
1176
|
-
// with multiple successful stacks running endlessly on.
|
|
1177
|
-
outer: for (let i = 0; i < newStacks.length - 1; i++) {
|
|
1178
|
-
let stack = newStacks[i];
|
|
1179
|
-
for (let j = i + 1; j < newStacks.length; j++) {
|
|
1180
|
-
let other = newStacks[j];
|
|
1181
|
-
if (stack.sameState(other) || stack.buffer.length > 500 /* Rec.MinBufferLengthPrune */ && other.buffer.length > 500 /* Rec.MinBufferLengthPrune */) {
|
|
1182
|
-
if ((stack.score - other.score || stack.buffer.length - other.buffer.length) > 0) {
|
|
1183
|
-
newStacks.splice(j--, 1);
|
|
1184
|
-
} else {
|
|
1185
|
-
newStacks.splice(i--, 1);
|
|
1186
|
-
continue outer;
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
if (newStacks.length > 12 /* Rec.MaxStackCount */) newStacks.splice(12 /* Rec.MaxStackCount */, newStacks.length - 12 /* Rec.MaxStackCount */);
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
this.minStackPos = newStacks[0].pos;
|
|
1195
|
-
for (let i = 1; i < newStacks.length; i++) if (newStacks[i].pos < this.minStackPos) this.minStackPos = newStacks[i].pos;
|
|
1196
|
-
return null;
|
|
1197
|
-
}
|
|
1198
|
-
stopAt(pos) {
|
|
1199
|
-
if (this.stoppedAt != null && this.stoppedAt < pos) throw new RangeError("Can't move stoppedAt forward");
|
|
1200
|
-
this.stoppedAt = pos;
|
|
1201
|
-
}
|
|
1202
|
-
// Returns an updated version of the given stack, or null if the
|
|
1203
|
-
// stack can't advance normally. When `split` and `stacks` are
|
|
1204
|
-
// given, stacks split off by ambiguous operations will be pushed to
|
|
1205
|
-
// `split`, or added to `stacks` if they move `pos` forward.
|
|
1206
|
-
advanceStack(stack, stacks, split) {
|
|
1207
|
-
let start = stack.pos,
|
|
1208
|
-
{
|
|
1209
|
-
parser
|
|
1210
|
-
} = this;
|
|
1211
|
-
let base = verbose ? this.stackID(stack) + " -> " : "";
|
|
1212
|
-
if (this.stoppedAt != null && start > this.stoppedAt) return stack.forceReduce() ? stack : null;
|
|
1213
|
-
if (this.fragments) {
|
|
1214
|
-
let strictCx = stack.curContext && stack.curContext.tracker.strict,
|
|
1215
|
-
cxHash = strictCx ? stack.curContext.hash : 0;
|
|
1216
|
-
for (let cached = this.fragments.nodeAt(start); cached;) {
|
|
1217
|
-
let match = this.parser.nodeSet.types[cached.type.id] == cached.type ? parser.getGoto(stack.state, cached.type.id) : -1;
|
|
1218
|
-
if (match > -1 && cached.length && (!strictCx || (cached.prop(NodeProp.contextHash) || 0) == cxHash)) {
|
|
1219
|
-
stack.useNode(cached, match);
|
|
1220
|
-
if (verbose) console.log(base + this.stackID(stack) + ` (via reuse of ${parser.getName(cached.type.id)})`);
|
|
1221
|
-
return true;
|
|
1222
|
-
}
|
|
1223
|
-
if (!(cached instanceof Tree) || cached.children.length == 0 || cached.positions[0] > 0) break;
|
|
1224
|
-
let inner = cached.children[0];
|
|
1225
|
-
if (inner instanceof Tree && cached.positions[0] == 0) cached = inner;else break;
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
let defaultReduce = parser.stateSlot(stack.state, 4 /* ParseState.DefaultReduce */);
|
|
1229
|
-
if (defaultReduce > 0) {
|
|
1230
|
-
stack.reduce(defaultReduce);
|
|
1231
|
-
if (verbose) console.log(base + this.stackID(stack) + ` (via always-reduce ${parser.getName(defaultReduce & 65535 /* Action.ValueMask */)})`);
|
|
1232
|
-
return true;
|
|
1233
|
-
}
|
|
1234
|
-
if (stack.stack.length >= 15000 /* Rec.CutDepth */) {
|
|
1235
|
-
while (stack.stack.length > 9000 /* Rec.CutTo */ && stack.forceReduce()) {}
|
|
1236
|
-
}
|
|
1237
|
-
let actions = this.tokens.getActions(stack);
|
|
1238
|
-
for (let i = 0; i < actions.length;) {
|
|
1239
|
-
let action = actions[i++],
|
|
1240
|
-
term = actions[i++],
|
|
1241
|
-
end = actions[i++];
|
|
1242
|
-
let last = i == actions.length || !split;
|
|
1243
|
-
let localStack = last ? stack : stack.split();
|
|
1244
|
-
localStack.apply(action, term, end);
|
|
1245
|
-
if (verbose) console.log(base + this.stackID(localStack) + ` (via ${(action & 65536 /* Action.ReduceFlag */) == 0 ? "shift" : `reduce of ${parser.getName(action & 65535 /* Action.ValueMask */)}`} for ${parser.getName(term)} @ ${start}${localStack == stack ? "" : ", split"})`);
|
|
1246
|
-
if (last) return true;else if (localStack.pos > start) stacks.push(localStack);else split.push(localStack);
|
|
1247
|
-
}
|
|
1248
|
-
return false;
|
|
1249
|
-
}
|
|
1250
|
-
// Advance a given stack forward as far as it will go. Returns the
|
|
1251
|
-
// (possibly updated) stack if it got stuck, or null if it moved
|
|
1252
|
-
// forward and was given to `pushStackDedup`.
|
|
1253
|
-
advanceFully(stack, newStacks) {
|
|
1254
|
-
let pos = stack.pos;
|
|
1255
|
-
for (;;) {
|
|
1256
|
-
if (!this.advanceStack(stack, null, null)) return false;
|
|
1257
|
-
if (stack.pos > pos) {
|
|
1258
|
-
pushStackDedup(stack, newStacks);
|
|
1259
|
-
return true;
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
runRecovery(stacks, tokens, newStacks) {
|
|
1264
|
-
let finished = null,
|
|
1265
|
-
restarted = false;
|
|
1266
|
-
for (let i = 0; i < stacks.length; i++) {
|
|
1267
|
-
let stack = stacks[i],
|
|
1268
|
-
token = tokens[i << 1],
|
|
1269
|
-
tokenEnd = tokens[(i << 1) + 1];
|
|
1270
|
-
let base = verbose ? this.stackID(stack) + " -> " : "";
|
|
1271
|
-
if (stack.deadEnd) {
|
|
1272
|
-
if (restarted) continue;
|
|
1273
|
-
restarted = true;
|
|
1274
|
-
stack.restart();
|
|
1275
|
-
if (verbose) console.log(base + this.stackID(stack) + " (restarted)");
|
|
1276
|
-
let done = this.advanceFully(stack, newStacks);
|
|
1277
|
-
if (done) continue;
|
|
1278
|
-
}
|
|
1279
|
-
let force = stack.split(),
|
|
1280
|
-
forceBase = base;
|
|
1281
|
-
for (let j = 0; force.forceReduce() && j < 10 /* Rec.ForceReduceLimit */; j++) {
|
|
1282
|
-
if (verbose) console.log(forceBase + this.stackID(force) + " (via force-reduce)");
|
|
1283
|
-
let done = this.advanceFully(force, newStacks);
|
|
1284
|
-
if (done) break;
|
|
1285
|
-
if (verbose) forceBase = this.stackID(force) + " -> ";
|
|
1286
|
-
}
|
|
1287
|
-
for (let insert of stack.recoverByInsert(token)) {
|
|
1288
|
-
if (verbose) console.log(base + this.stackID(insert) + " (via recover-insert)");
|
|
1289
|
-
this.advanceFully(insert, newStacks);
|
|
1290
|
-
}
|
|
1291
|
-
if (this.stream.end > stack.pos) {
|
|
1292
|
-
if (tokenEnd == stack.pos) {
|
|
1293
|
-
tokenEnd++;
|
|
1294
|
-
token = 0 /* Term.Err */;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
stack.recoverByDelete(token, tokenEnd);
|
|
1298
|
-
if (verbose) console.log(base + this.stackID(stack) + ` (via recover-delete ${this.parser.getName(token)})`);
|
|
1299
|
-
pushStackDedup(stack, newStacks);
|
|
1300
|
-
} else if (!finished || finished.score < stack.score) {
|
|
1301
|
-
finished = stack;
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
return finished;
|
|
1305
|
-
}
|
|
1306
|
-
// Convert the stack's buffer to a syntax tree.
|
|
1307
|
-
stackToTree(stack) {
|
|
1308
|
-
stack.close();
|
|
1309
|
-
return Tree.build({
|
|
1310
|
-
buffer: StackBufferCursor.create(stack),
|
|
1311
|
-
nodeSet: this.parser.nodeSet,
|
|
1312
|
-
topID: this.topTerm,
|
|
1313
|
-
maxBufferLength: this.parser.bufferLength,
|
|
1314
|
-
reused: this.reused,
|
|
1315
|
-
start: this.ranges[0].from,
|
|
1316
|
-
length: stack.pos - this.ranges[0].from,
|
|
1317
|
-
minRepeatType: this.parser.minRepeatTerm
|
|
1318
|
-
});
|
|
1319
|
-
}
|
|
1320
|
-
stackID(stack) {
|
|
1321
|
-
let id = (stackIDs || (stackIDs = new WeakMap())).get(stack);
|
|
1322
|
-
if (!id) stackIDs.set(stack, id = String.fromCodePoint(this.nextStackID++));
|
|
1323
|
-
return id + stack;
|
|
1324
|
-
}
|
|
1325
|
-
}
|
|
1326
|
-
function pushStackDedup(stack, newStacks) {
|
|
1327
|
-
for (let i = 0; i < newStacks.length; i++) {
|
|
1328
|
-
let other = newStacks[i];
|
|
1329
|
-
if (other.pos == stack.pos && other.sameState(stack)) {
|
|
1330
|
-
if (newStacks[i].score < stack.score) newStacks[i] = stack;
|
|
1331
|
-
return;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
newStacks.push(stack);
|
|
1335
|
-
}
|
|
1336
|
-
class Dialect {
|
|
1337
|
-
constructor(source, flags, disabled) {
|
|
1338
|
-
this.source = source;
|
|
1339
|
-
this.flags = flags;
|
|
1340
|
-
this.disabled = disabled;
|
|
1341
|
-
}
|
|
1342
|
-
allows(term) {
|
|
1343
|
-
return !this.disabled || this.disabled[term] == 0;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
const id = x => x;
|
|
1347
|
-
/// Context trackers are used to track stateful context (such as
|
|
1348
|
-
/// indentation in the Python grammar, or parent elements in the XML
|
|
1349
|
-
/// grammar) needed by external tokenizers. You declare them in a
|
|
1350
|
-
/// grammar file as `@context exportName from "module"`.
|
|
1351
|
-
///
|
|
1352
|
-
/// Context values should be immutable, and can be updated (replaced)
|
|
1353
|
-
/// on shift or reduce actions.
|
|
1354
|
-
///
|
|
1355
|
-
/// The export used in a `@context` declaration should be of this
|
|
1356
|
-
/// type.
|
|
1357
|
-
class ContextTracker {
|
|
1358
|
-
/// Define a context tracker.
|
|
1359
|
-
constructor(spec) {
|
|
1360
|
-
this.start = spec.start;
|
|
1361
|
-
this.shift = spec.shift || id;
|
|
1362
|
-
this.reduce = spec.reduce || id;
|
|
1363
|
-
this.reuse = spec.reuse || id;
|
|
1364
|
-
this.hash = spec.hash || (() => 0);
|
|
1365
|
-
this.strict = spec.strict !== false;
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
/// Holds the parse tables for a given grammar, as generated by
|
|
1369
|
-
/// `lezer-generator`, and provides [methods](#common.Parser) to parse
|
|
1370
|
-
/// content with.
|
|
1371
|
-
class LRParser extends Parser {
|
|
1372
|
-
/// @internal
|
|
1373
|
-
constructor(spec) {
|
|
1374
|
-
super();
|
|
1375
|
-
/// @internal
|
|
1376
|
-
this.wrappers = [];
|
|
1377
|
-
if (spec.version != 14 /* File.Version */) throw new RangeError(`Parser version (${spec.version}) doesn't match runtime version (${14 /* File.Version */})`);
|
|
1378
|
-
let nodeNames = spec.nodeNames.split(" ");
|
|
1379
|
-
this.minRepeatTerm = nodeNames.length;
|
|
1380
|
-
for (let i = 0; i < spec.repeatNodeCount; i++) nodeNames.push("");
|
|
1381
|
-
let topTerms = Object.keys(spec.topRules).map(r => spec.topRules[r][1]);
|
|
1382
|
-
let nodeProps = [];
|
|
1383
|
-
for (let i = 0; i < nodeNames.length; i++) nodeProps.push([]);
|
|
1384
|
-
function setProp(nodeID, prop, value) {
|
|
1385
|
-
nodeProps[nodeID].push([prop, prop.deserialize(String(value))]);
|
|
1386
|
-
}
|
|
1387
|
-
if (spec.nodeProps) for (let propSpec of spec.nodeProps) {
|
|
1388
|
-
let prop = propSpec[0];
|
|
1389
|
-
if (typeof prop == "string") prop = NodeProp[prop];
|
|
1390
|
-
for (let i = 1; i < propSpec.length;) {
|
|
1391
|
-
let next = propSpec[i++];
|
|
1392
|
-
if (next >= 0) {
|
|
1393
|
-
setProp(next, prop, propSpec[i++]);
|
|
1394
|
-
} else {
|
|
1395
|
-
let value = propSpec[i + -next];
|
|
1396
|
-
for (let j = -next; j > 0; j--) setProp(propSpec[i++], prop, value);
|
|
1397
|
-
i++;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
}
|
|
1401
|
-
this.nodeSet = new NodeSet(nodeNames.map((name, i) => NodeType.define({
|
|
1402
|
-
name: i >= this.minRepeatTerm ? undefined : name,
|
|
1403
|
-
id: i,
|
|
1404
|
-
props: nodeProps[i],
|
|
1405
|
-
top: topTerms.indexOf(i) > -1,
|
|
1406
|
-
error: i == 0,
|
|
1407
|
-
skipped: spec.skippedNodes && spec.skippedNodes.indexOf(i) > -1
|
|
1408
|
-
})));
|
|
1409
|
-
if (spec.propSources) this.nodeSet = this.nodeSet.extend(...spec.propSources);
|
|
1410
|
-
this.strict = false;
|
|
1411
|
-
this.bufferLength = DefaultBufferLength;
|
|
1412
|
-
let tokenArray = decodeArray(spec.tokenData);
|
|
1413
|
-
this.context = spec.context;
|
|
1414
|
-
this.specializerSpecs = spec.specialized || [];
|
|
1415
|
-
this.specialized = new Uint16Array(this.specializerSpecs.length);
|
|
1416
|
-
for (let i = 0; i < this.specializerSpecs.length; i++) this.specialized[i] = this.specializerSpecs[i].term;
|
|
1417
|
-
this.specializers = this.specializerSpecs.map(getSpecializer);
|
|
1418
|
-
this.states = decodeArray(spec.states, Uint32Array);
|
|
1419
|
-
this.data = decodeArray(spec.stateData);
|
|
1420
|
-
this.goto = decodeArray(spec.goto);
|
|
1421
|
-
this.maxTerm = spec.maxTerm;
|
|
1422
|
-
this.tokenizers = spec.tokenizers.map(value => typeof value == "number" ? new TokenGroup(tokenArray, value) : value);
|
|
1423
|
-
this.topRules = spec.topRules;
|
|
1424
|
-
this.dialects = spec.dialects || {};
|
|
1425
|
-
this.dynamicPrecedences = spec.dynamicPrecedences || null;
|
|
1426
|
-
this.tokenPrecTable = spec.tokenPrec;
|
|
1427
|
-
this.termNames = spec.termNames || null;
|
|
1428
|
-
this.maxNode = this.nodeSet.types.length - 1;
|
|
1429
|
-
this.dialect = this.parseDialect();
|
|
1430
|
-
this.top = this.topRules[Object.keys(this.topRules)[0]];
|
|
1431
|
-
}
|
|
1432
|
-
createParse(input, fragments, ranges) {
|
|
1433
|
-
let parse = new Parse(this, input, fragments, ranges);
|
|
1434
|
-
for (let w of this.wrappers) parse = w(parse, input, fragments, ranges);
|
|
1435
|
-
return parse;
|
|
1436
|
-
}
|
|
1437
|
-
/// Get a goto table entry @internal
|
|
1438
|
-
getGoto(state, term) {
|
|
1439
|
-
let loose = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1440
|
-
let table = this.goto;
|
|
1441
|
-
if (term >= table[0]) return -1;
|
|
1442
|
-
for (let pos = table[term + 1];;) {
|
|
1443
|
-
let groupTag = table[pos++],
|
|
1444
|
-
last = groupTag & 1;
|
|
1445
|
-
let target = table[pos++];
|
|
1446
|
-
if (last && loose) return target;
|
|
1447
|
-
for (let end = pos + (groupTag >> 1); pos < end; pos++) if (table[pos] == state) return target;
|
|
1448
|
-
if (last) return -1;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
/// Check if this state has an action for a given terminal @internal
|
|
1452
|
-
hasAction(state, terminal) {
|
|
1453
|
-
let data = this.data;
|
|
1454
|
-
for (let set = 0; set < 2; set++) {
|
|
1455
|
-
for (let i = this.stateSlot(state, set ? 2 /* ParseState.Skip */ : 1 /* ParseState.Actions */), next;; i += 3) {
|
|
1456
|
-
if ((next = data[i]) == 65535 /* Seq.End */) {
|
|
1457
|
-
if (data[i + 1] == 1 /* Seq.Next */) next = data[i = pair(data, i + 2)];else if (data[i + 1] == 2 /* Seq.Other */) return pair(data, i + 2);else break;
|
|
1458
|
-
}
|
|
1459
|
-
if (next == terminal || next == 0 /* Term.Err */) return pair(data, i + 1);
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
return 0;
|
|
1463
|
-
}
|
|
1464
|
-
/// @internal
|
|
1465
|
-
stateSlot(state, slot) {
|
|
1466
|
-
return this.states[state * 6 /* ParseState.Size */ + slot];
|
|
1467
|
-
}
|
|
1468
|
-
/// @internal
|
|
1469
|
-
stateFlag(state, flag) {
|
|
1470
|
-
return (this.stateSlot(state, 0 /* ParseState.Flags */) & flag) > 0;
|
|
1471
|
-
}
|
|
1472
|
-
/// @internal
|
|
1473
|
-
validAction(state, action) {
|
|
1474
|
-
if (action == this.stateSlot(state, 4 /* ParseState.DefaultReduce */)) return true;
|
|
1475
|
-
for (let i = this.stateSlot(state, 1 /* ParseState.Actions */);; i += 3) {
|
|
1476
|
-
if (this.data[i] == 65535 /* Seq.End */) {
|
|
1477
|
-
if (this.data[i + 1] == 1 /* Seq.Next */) i = pair(this.data, i + 2);else return false;
|
|
1478
|
-
}
|
|
1479
|
-
if (action == pair(this.data, i + 1)) return true;
|
|
1480
|
-
}
|
|
1481
|
-
}
|
|
1482
|
-
/// Get the states that can follow this one through shift actions or
|
|
1483
|
-
/// goto jumps. @internal
|
|
1484
|
-
nextStates(state) {
|
|
1485
|
-
let result = [];
|
|
1486
|
-
for (let i = this.stateSlot(state, 1 /* ParseState.Actions */);; i += 3) {
|
|
1487
|
-
if (this.data[i] == 65535 /* Seq.End */) {
|
|
1488
|
-
if (this.data[i + 1] == 1 /* Seq.Next */) i = pair(this.data, i + 2);else break;
|
|
1489
|
-
}
|
|
1490
|
-
if ((this.data[i + 2] & 65536 /* Action.ReduceFlag */ >> 16) == 0) {
|
|
1491
|
-
let value = this.data[i + 1];
|
|
1492
|
-
if (!result.some((v, i) => i & 1 && v == value)) result.push(this.data[i], value);
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
return result;
|
|
1496
|
-
}
|
|
1497
|
-
/// Configure the parser. Returns a new parser instance that has the
|
|
1498
|
-
/// given settings modified. Settings not provided in `config` are
|
|
1499
|
-
/// kept from the original parser.
|
|
1500
|
-
configure(config) {
|
|
1501
|
-
// Hideous reflection-based kludge to make it easy to create a
|
|
1502
|
-
// slightly modified copy of a parser.
|
|
1503
|
-
let copy = Object.assign(Object.create(LRParser.prototype), this);
|
|
1504
|
-
if (config.props) copy.nodeSet = this.nodeSet.extend(...config.props);
|
|
1505
|
-
if (config.top) {
|
|
1506
|
-
let info = this.topRules[config.top];
|
|
1507
|
-
if (!info) throw new RangeError(`Invalid top rule name ${config.top}`);
|
|
1508
|
-
copy.top = info;
|
|
1509
|
-
}
|
|
1510
|
-
if (config.tokenizers) copy.tokenizers = this.tokenizers.map(t => {
|
|
1511
|
-
let found = config.tokenizers.find(r => r.from == t);
|
|
1512
|
-
return found ? found.to : t;
|
|
1513
|
-
});
|
|
1514
|
-
if (config.specializers) {
|
|
1515
|
-
copy.specializers = this.specializers.slice();
|
|
1516
|
-
copy.specializerSpecs = this.specializerSpecs.map((s, i) => {
|
|
1517
|
-
let found = config.specializers.find(r => r.from == s.external);
|
|
1518
|
-
if (!found) return s;
|
|
1519
|
-
let spec = Object.assign(Object.assign({}, s), {
|
|
1520
|
-
external: found.to
|
|
1521
|
-
});
|
|
1522
|
-
copy.specializers[i] = getSpecializer(spec);
|
|
1523
|
-
return spec;
|
|
1524
|
-
});
|
|
1525
|
-
}
|
|
1526
|
-
if (config.contextTracker) copy.context = config.contextTracker;
|
|
1527
|
-
if (config.dialect) copy.dialect = this.parseDialect(config.dialect);
|
|
1528
|
-
if (config.strict != null) copy.strict = config.strict;
|
|
1529
|
-
if (config.wrap) copy.wrappers = copy.wrappers.concat(config.wrap);
|
|
1530
|
-
if (config.bufferLength != null) copy.bufferLength = config.bufferLength;
|
|
1531
|
-
return copy;
|
|
1532
|
-
}
|
|
1533
|
-
/// Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
|
|
1534
|
-
/// are registered for this parser.
|
|
1535
|
-
hasWrappers() {
|
|
1536
|
-
return this.wrappers.length > 0;
|
|
1537
|
-
}
|
|
1538
|
-
/// Returns the name associated with a given term. This will only
|
|
1539
|
-
/// work for all terms when the parser was generated with the
|
|
1540
|
-
/// `--names` option. By default, only the names of tagged terms are
|
|
1541
|
-
/// stored.
|
|
1542
|
-
getName(term) {
|
|
1543
|
-
return this.termNames ? this.termNames[term] : String(term <= this.maxNode && this.nodeSet.types[term].name || term);
|
|
1544
|
-
}
|
|
1545
|
-
/// The eof term id is always allocated directly after the node
|
|
1546
|
-
/// types. @internal
|
|
1547
|
-
get eofTerm() {
|
|
1548
|
-
return this.maxNode + 1;
|
|
1549
|
-
}
|
|
1550
|
-
/// The type of top node produced by the parser.
|
|
1551
|
-
get topNode() {
|
|
1552
|
-
return this.nodeSet.types[this.top[1]];
|
|
1553
|
-
}
|
|
1554
|
-
/// @internal
|
|
1555
|
-
dynamicPrecedence(term) {
|
|
1556
|
-
let prec = this.dynamicPrecedences;
|
|
1557
|
-
return prec == null ? 0 : prec[term] || 0;
|
|
1558
|
-
}
|
|
1559
|
-
/// @internal
|
|
1560
|
-
parseDialect(dialect) {
|
|
1561
|
-
let values = Object.keys(this.dialects),
|
|
1562
|
-
flags = values.map(() => false);
|
|
1563
|
-
if (dialect) for (let part of dialect.split(" ")) {
|
|
1564
|
-
let id = values.indexOf(part);
|
|
1565
|
-
if (id >= 0) flags[id] = true;
|
|
1566
|
-
}
|
|
1567
|
-
let disabled = null;
|
|
1568
|
-
for (let i = 0; i < values.length; i++) if (!flags[i]) {
|
|
1569
|
-
for (let j = this.dialects[values[i]], id; (id = this.data[j++]) != 65535 /* Seq.End */;) (disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id] = 1;
|
|
1570
|
-
}
|
|
1571
|
-
return new Dialect(dialect, flags, disabled);
|
|
1572
|
-
}
|
|
1573
|
-
/// Used by the output of the parser generator. Not available to
|
|
1574
|
-
/// user code. @hide
|
|
1575
|
-
static deserialize(spec) {
|
|
1576
|
-
return new LRParser(spec);
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
function pair(data, off) {
|
|
1580
|
-
return data[off] | data[off + 1] << 16;
|
|
1581
|
-
}
|
|
1582
|
-
function findFinished(stacks) {
|
|
1583
|
-
let best = null;
|
|
1584
|
-
for (let stack of stacks) {
|
|
1585
|
-
let stopped = stack.p.stoppedAt;
|
|
1586
|
-
if ((stack.pos == stack.p.stream.end || stopped != null && stack.pos > stopped) && stack.p.parser.stateFlag(stack.state, 2 /* StateFlag.Accepting */) && (!best || best.score < stack.score)) best = stack;
|
|
1587
|
-
}
|
|
1588
|
-
return best;
|
|
1589
|
-
}
|
|
1590
|
-
function getSpecializer(spec) {
|
|
1591
|
-
if (spec.external) {
|
|
1592
|
-
let mask = spec.extend ? 1 /* Specialize.Extend */ : 0 /* Specialize.Specialize */;
|
|
1593
|
-
return (value, stack) => spec.external(value, stack) << 1 | mask;
|
|
1594
|
-
}
|
|
1595
|
-
return spec.get;
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
export { ContextTracker as C, ExternalTokenizer as E, LRParser as L, LocalTokenGroup as a };
|