@pareto-engineering/design-system 5.3.0 → 5.4.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/README.md +54 -0
- package/dist/DatePicker-DHuh_8q6.js +1305 -0
- package/dist/ExposePlainTextPlugin-DeW6mVaE.js +33 -0
- package/dist/FormBuilder-653sa2uJ.js +28728 -0
- package/dist/Lexical-BIl3XjnU.js +8899 -0
- package/dist/LexicalComposerContext-D_q7RDyF.js +56 -0
- package/dist/TreeViewPlugin-BqY3Z-6y.js +2412 -0
- package/dist/YAxis-C5dCrcDo.js +1116 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/assets/AnimatedBlobs.css +1 -0
- package/dist/assets/AreaChart.css +1 -0
- package/dist/assets/BarChart.css +1 -0
- package/dist/assets/BlurOverlay.css +1 -0
- package/dist/assets/CustomLegend.css +1 -0
- package/dist/assets/CustomTooltipContent.css +1 -0
- package/dist/assets/DatePicker.css +1 -0
- package/dist/assets/Description.css +1 -0
- package/dist/assets/DotInfo.css +1 -0
- package/dist/assets/DragAndDrop.css +1 -0
- package/dist/assets/DraggableItem.css +1 -0
- package/dist/assets/Figure.css +1 -0
- package/dist/assets/FormBuilder.css +1 -0
- package/dist/assets/Group.css +1 -0
- package/dist/assets/HamburgerButton.css +1 -0
- package/dist/assets/IconList.css +1 -0
- package/dist/assets/Label.css +1 -0
- package/dist/assets/Label2.css +1 -0
- package/dist/assets/LoadingCircle.css +1 -0
- package/dist/assets/MetaCard.css +1 -0
- package/dist/assets/People.css +1 -0
- package/dist/assets/PieChart.css +1 -0
- package/dist/assets/Popover.css +1 -0
- package/dist/assets/ProgressBar.css +1 -0
- package/dist/assets/Quote.css +1 -0
- package/dist/assets/RadioInput.css +1 -0
- package/dist/assets/Removable.css +1 -0
- package/dist/assets/SVG.css +1 -0
- package/dist/assets/SnapScroller.css +1 -0
- package/dist/assets/SocialMediaShareButton.css +1 -0
- package/dist/assets/Spinner.css +1 -0
- package/dist/assets/TextSteps.css +1 -0
- package/dist/assets/ThroughPutIndicator.css +1 -0
- package/dist/assets/Timestamp.css +1 -0
- package/dist/assets/Tip.css +1 -0
- package/dist/assets/ToggleSwitch.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/assets/XMLEditor.css +1 -0
- package/dist/assets/YlabelsDropDown.css +1 -0
- package/dist/assets/exports.css +0 -0
- package/dist/debounce-Cm69Z_cF.js +209 -0
- package/dist/exports.module-DmUnHWIJ.js +20 -0
- package/dist/generateCategoricalChart-BBPxYd_a.js +15749 -0
- package/dist/index-BUor0nOw.js +12623 -0
- package/dist/index-C_b9PQD8.js +1360 -0
- package/dist/index-CxkFVI6N.js +667 -0
- package/dist/index.js +137 -0
- package/dist/stories/StyleGuide/helpers.js +132 -0
- package/dist/stories/a/AppContext.stories.js +85 -0
- package/dist/stories/a/AreaChart.stories.js +182 -0
- package/dist/stories/a/BarChart.stories.js +173 -0
- package/dist/stories/a/BlurOverlay.stories.js +79 -0
- package/dist/stories/a/ContentTree.stories.js +112 -0
- package/dist/stories/a/Conversation.stories.js +113 -0
- package/dist/stories/a/DatePicker.stories.js +128 -0
- package/dist/stories/a/DotInfo.stories.js +73 -0
- package/dist/stories/a/Figure.stories.js +69 -0
- package/dist/stories/a/HamburgerButton.stories.js +65 -0
- package/dist/stories/a/IconList.stories.js +85 -0
- package/dist/stories/a/Label.stories.js +79 -0
- package/dist/stories/a/LoadingCircle.stories.js +69 -0
- package/dist/stories/a/MetaCard.stories.js +67 -0
- package/dist/stories/a/Notification.stories.js +124 -0
- package/dist/stories/a/NotificationStack.stories.js +102 -0
- package/dist/stories/a/People.stories.js +96 -0
- package/dist/stories/a/PieChart.stories.js +79 -0
- package/dist/stories/a/Popover.stories.js +147 -0
- package/dist/stories/a/ProgressBar.stories.js +86 -0
- package/dist/stories/a/Quote.stories.js +87 -0
- package/dist/stories/a/Removable.stories.js +62 -0
- package/dist/stories/a/SVG.stories.js +155 -0
- package/dist/stories/a/SnapScroller.stories.js +105 -0
- package/dist/stories/a/Spinner.stories.js +62 -0
- package/dist/stories/a/TextSteps.stories.js +57 -0
- package/dist/stories/a/Timestamp.stories.js +92 -0
- package/dist/stories/a/Tip.stories.js +67 -0
- package/dist/stories/a/ToggleSwitch.stories.js +67 -0
- package/dist/stories/a/Tooltip.stories.js +107 -0
- package/dist/stories/a/XMLEditor.stories.js +59 -0
- package/dist/stories/b/Button/Button.stories.js +154 -0
- package/dist/stories/b/Button/Group.stories.js +59 -0
- package/dist/stories/b/Card/Card.stories.js +85 -0
- package/dist/stories/b/Card/Group.stories.js +83 -0
- package/dist/stories/b/Logo.stories.js +69 -0
- package/dist/stories/b/Page.stories.js +94 -0
- package/dist/stories/b/SocialMediaButton.stories.js +95 -0
- package/dist/stories/b/ThemeSelector.stories.js +86 -0
- package/dist/stories/b/Title.stories.js +82 -0
- package/dist/stories/c/Modal.stories.js +76 -0
- package/dist/stories/c/Shortener.stories.js +73 -0
- package/dist/stories/c/SocialMediaShareButton.stories.js +72 -0
- package/dist/stories/colors.js +63 -0
- package/dist/stories/f/Checkbox.stories.js +133 -0
- package/dist/stories/f/ChoicesInput.stories.js +167 -0
- package/dist/stories/f/Description.stories.js +75 -0
- package/dist/stories/f/EditorInput.stories.js +104 -0
- package/dist/stories/f/FileUpload.stories.js +100 -0
- package/dist/stories/f/Label.stories.js +66 -0
- package/dist/stories/f/LinkInput.stories.js +121 -0
- package/dist/stories/f/RadioInput.stories.js +74 -0
- package/dist/stories/f/RatingsInput.stories.js +116 -0
- package/dist/stories/f/SelectInput.stories.js +160 -0
- package/dist/stories/f/TextInput.stories.js +148 -0
- package/dist/stories/f/TextareaInput.stories.js +138 -0
- package/dist/stories/g/DragAndDrop.stories.js +150 -0
- package/dist/stories/g/ExpandableLexicalPreview.stories.js +68 -0
- package/dist/stories/g/FormBuilder.stories.js +140 -0
- package/dist/stories/utils/Router.js +12 -0
- package/dist/stories/utils/generateNodeId.js +7 -0
- package/dist/stories/utils/lorem.js +18 -0
- package/dist/stories/utils/testData.js +66 -0
- package/dist/throttle-BCrS-Wew.js +24 -0
- package/dist/ui/a/AnimatedBlobs/AnimatedBlobs.js +75 -0
- package/dist/ui/a/AnimatedBlobs/index.js +4 -0
- package/dist/ui/a/AnimatedGradient/AnimatedGradient.js +41 -0
- package/dist/ui/a/AnimatedGradient/index.js +4 -0
- package/dist/ui/a/AnimatedGradient/webGIRenderer.js +814 -0
- package/dist/ui/a/AppContext/Context.js +5 -0
- package/dist/ui/a/AppContext/ContextProvider.js +73 -0
- package/dist/ui/a/AppContext/index.js +10 -0
- package/dist/ui/a/AppContext/useApp.js +6 -0
- package/dist/ui/a/AppContext/useTheme.js +25 -0
- package/dist/ui/a/BlurOverlay/BlurOverlay.js +53 -0
- package/dist/ui/a/BlurOverlay/index.js +4 -0
- package/dist/ui/a/Charts/AreaChart/AreaChart.js +697 -0
- package/dist/ui/a/Charts/AreaChart/index.js +4 -0
- package/dist/ui/a/Charts/BarChart/BarChart.js +165 -0
- package/dist/ui/a/Charts/BarChart/index.js +4 -0
- package/dist/ui/a/Charts/Common/CustomLegend/CustomLegend.js +96 -0
- package/dist/ui/a/Charts/Common/CustomLegend/index.js +4 -0
- package/dist/ui/a/Charts/Common/CustomTooltipContent/CustomTooltipContent.js +137 -0
- package/dist/ui/a/Charts/Common/CustomTooltipContent/index.js +4 -0
- package/dist/ui/a/Charts/Common/YLabelsDropDown/YlabelsDropDown.js +107 -0
- package/dist/ui/a/Charts/Common/YLabelsDropDown/index.js +4 -0
- package/dist/ui/a/Charts/Common/index.js +8 -0
- package/dist/ui/a/Charts/PieChart/PieChart.js +1227 -0
- package/dist/ui/a/Charts/PieChart/index.js +4 -0
- package/dist/ui/a/Charts/index.js +8 -0
- package/dist/ui/a/ContentTree/ContentTree.js +10 -0
- package/dist/ui/a/ContentTree/common/Tree/Tree.js +51 -0
- package/dist/ui/a/ContentTree/common/Tree/index.js +4 -0
- package/dist/ui/a/ContentTree/common/index.js +8 -0
- package/dist/ui/a/ContentTree/common/useContentTree.js +44 -0
- package/dist/ui/a/ContentTree/common/useFirstVisibleNode.js +20 -0
- package/dist/ui/a/ContentTree/index.js +4 -0
- package/dist/ui/a/Conversation/Context.js +5 -0
- package/dist/ui/a/Conversation/Conversation.js +51 -0
- package/dist/ui/a/Conversation/common/Message/Message.js +97 -0
- package/dist/ui/a/Conversation/common/Message/index.js +4 -0
- package/dist/ui/a/Conversation/common/index.js +4 -0
- package/dist/ui/a/Conversation/index.js +8 -0
- package/dist/ui/a/Conversation/useConversation.js +6 -0
- package/dist/ui/a/DatePicker/DatePicker.js +9 -0
- package/dist/ui/a/DatePicker/index.js +4 -0
- package/dist/ui/a/DotInfo/DotInfo.js +76 -0
- package/dist/ui/a/DotInfo/index.js +4 -0
- package/dist/ui/a/Figure/Figure.js +59 -0
- package/dist/ui/a/Figure/index.js +4 -0
- package/dist/ui/a/HamburgerButton/HamburgerButton.js +71 -0
- package/dist/ui/a/HamburgerButton/index.js +4 -0
- package/dist/ui/a/IconList/IconList.js +64 -0
- package/dist/ui/a/IconList/common/Item/Item.js +58 -0
- package/dist/ui/a/IconList/common/Item/index.js +4 -0
- package/dist/ui/a/IconList/common/index.js +4 -0
- package/dist/ui/a/IconList/index.js +4 -0
- package/dist/ui/a/Label/Label.js +72 -0
- package/dist/ui/a/Label/index.js +4 -0
- package/dist/ui/a/LoadingCircle/LoadingCircle.js +96 -0
- package/dist/ui/a/LoadingCircle/index.js +4 -0
- package/dist/ui/a/MetaCard/MetaCard.js +54 -0
- package/dist/ui/a/MetaCard/index.js +4 -0
- package/dist/ui/a/Notification/Notification.js +50 -0
- package/dist/ui/a/Notification/index.js +4 -0
- package/dist/ui/a/NotificationStack/NotificationStack.js +8 -0
- package/dist/ui/a/NotificationStack/index.js +4 -0
- package/dist/ui/a/People/People.js +65 -0
- package/dist/ui/a/People/common/Person/Person.js +82 -0
- package/dist/ui/a/People/common/Person/index.js +4 -0
- package/dist/ui/a/People/common/index.js +4 -0
- package/dist/ui/a/People/index.js +4 -0
- package/dist/ui/a/Popover/Popover.js +124 -0
- package/dist/ui/a/Popover/index.js +4 -0
- package/dist/ui/a/ProgressBar/ProgressBar.js +70 -0
- package/dist/ui/a/ProgressBar/index.js +4 -0
- package/dist/ui/a/Quote/Quote.js +73 -0
- package/dist/ui/a/Quote/index.js +4 -0
- package/dist/ui/a/Removable/Removable.js +55 -0
- package/dist/ui/a/Removable/index.js +4 -0
- package/dist/ui/a/SVG/SVG.js +152 -0
- package/dist/ui/a/SVG/common/UseSVG/UseSVG.js +59 -0
- package/dist/ui/a/SVG/common/UseSVG/index.js +4 -0
- package/dist/ui/a/SVG/common/index.js +4 -0
- package/dist/ui/a/SVG/index.js +4 -0
- package/dist/ui/a/SnapScroller/SnapScroller.js +72 -0
- package/dist/ui/a/SnapScroller/index.js +4 -0
- package/dist/ui/a/Spinner/Spinner.js +48 -0
- package/dist/ui/a/Spinner/index.js +4 -0
- package/dist/ui/a/TextSteps/TextSteps.js +58 -0
- package/dist/ui/a/TextSteps/index.js +4 -0
- package/dist/ui/a/ThroughPutIndicator/ThroughPutIndicator.js +57 -0
- package/dist/ui/a/ThroughPutIndicator/index.js +4 -0
- package/dist/ui/a/Timestamp/Timestamp.js +250 -0
- package/dist/ui/a/Timestamp/index.js +4 -0
- package/dist/ui/a/Tip/Tip.js +74 -0
- package/dist/ui/a/Tip/index.js +4 -0
- package/dist/ui/a/ToggleSwitch/ToggleSwitch.js +77 -0
- package/dist/ui/a/ToggleSwitch/index.js +4 -0
- package/dist/ui/a/Tooltip/Tooltip.js +101 -0
- package/dist/ui/a/Tooltip/index.js +4 -0
- package/dist/ui/a/XMLEditor/XMLEditor.js +2447 -0
- package/dist/ui/a/XMLEditor/common/index.js +4 -0
- package/dist/ui/a/XMLEditor/common/theme.js +4 -0
- package/dist/ui/a/XMLEditor/index.js +4 -0
- package/dist/ui/a/index.js +74 -0
- package/dist/ui/b/Button/Button.js +51 -0
- package/dist/ui/b/Button/common/Group/Group.js +48 -0
- package/dist/ui/b/Button/common/Group/index.js +4 -0
- package/dist/ui/b/Button/common/index.js +4 -0
- package/dist/ui/b/Button/index.js +4 -0
- package/dist/ui/b/Card/Card.js +51 -0
- package/dist/ui/b/Card/common/Group/Group.js +50 -0
- package/dist/ui/b/Card/common/Group/index.js +4 -0
- package/dist/ui/b/Card/common/Section/Section.js +54 -0
- package/dist/ui/b/Card/common/Section/index.js +4 -0
- package/dist/ui/b/Card/common/index.js +6 -0
- package/dist/ui/b/Card/index.js +4 -0
- package/dist/ui/b/Logo/Logo.js +39 -0
- package/dist/ui/b/Logo/index.js +4 -0
- package/dist/ui/b/Page/Context.js +5 -0
- package/dist/ui/b/Page/Page.js +42 -0
- package/dist/ui/b/Page/common/PageHelmet/PageHelmet.js +40 -0
- package/dist/ui/b/Page/common/PageHelmet/index.js +4 -0
- package/dist/ui/b/Page/common/Section/Section.js +67 -0
- package/dist/ui/b/Page/common/Section/index.js +4 -0
- package/dist/ui/b/Page/common/index.js +6 -0
- package/dist/ui/b/Page/index.js +8 -0
- package/dist/ui/b/Page/usePage.js +6 -0
- package/dist/ui/b/SocialMediaButton/SocialMediaButton.js +40 -0
- package/dist/ui/b/SocialMediaButton/index.js +4 -0
- package/dist/ui/b/ThemeSelector/ThemeSelector.js +40 -0
- package/dist/ui/b/ThemeSelector/index.js +4 -0
- package/dist/ui/b/Title/Title.js +126 -0
- package/dist/ui/b/Title/index.js +4 -0
- package/dist/ui/b/index.js +13 -0
- package/dist/ui/c/Modal/Modal.js +8 -0
- package/dist/ui/c/Modal/common/ModalHeader/ModalHeader.js +50 -0
- package/dist/ui/c/Modal/common/ModalHeader/index.js +4 -0
- package/dist/ui/c/Modal/common/index.js +4 -0
- package/dist/ui/c/Modal/index.js +4 -0
- package/dist/ui/c/Shortener/Shortener.js +10 -0
- package/dist/ui/c/Shortener/index.js +4 -0
- package/dist/ui/c/SocialMediaShareButton/SocialMediaShareButton.js +80 -0
- package/dist/ui/c/SocialMediaShareButton/index.js +4 -0
- package/dist/ui/c/index.js +7 -0
- package/dist/ui/d/index.js +1 -0
- package/dist/ui/f/FormInput/FormInput.js +9 -0
- package/dist/ui/f/FormInput/index.js +4 -0
- package/dist/ui/f/common/Debugger/Debugger.js +10 -0
- package/dist/ui/f/common/Debugger/index.js +4 -0
- package/dist/ui/f/common/Description/Description.js +62 -0
- package/dist/ui/f/common/Description/index.js +4 -0
- package/dist/ui/f/common/Label/Label.js +74 -0
- package/dist/ui/f/common/Label/index.js +4 -0
- package/dist/ui/f/common/index.js +12 -0
- package/dist/ui/f/common/utils/index.js +6 -0
- package/dist/ui/f/common/utils/lookUpInputValueFromFetchedOptions.js +1039 -0
- package/dist/ui/f/common/utils/validators.js +7 -0
- package/dist/ui/f/fields/Checkbox/Checkbox.js +11 -0
- package/dist/ui/f/fields/Checkbox/index.js +4 -0
- package/dist/ui/f/fields/ChoicesInput/ChoicesInput.js +11 -0
- package/dist/ui/f/fields/ChoicesInput/common/Choice/Choice.js +112 -0
- package/dist/ui/f/fields/ChoicesInput/common/Choice/index.js +4 -0
- package/dist/ui/f/fields/ChoicesInput/common/index.js +4 -0
- package/dist/ui/f/fields/ChoicesInput/index.js +4 -0
- package/dist/ui/f/fields/EditorInput/EditorInput.js +15 -0
- package/dist/ui/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +44 -0
- package/dist/ui/f/fields/EditorInput/common/BlockFormatDropDown/index.js +4 -0
- package/dist/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +43 -0
- package/dist/ui/f/fields/EditorInput/common/ColorPicker/index.js +4 -0
- package/dist/ui/f/fields/EditorInput/common/ExposePlainTextPlugin.js +7 -0
- package/dist/ui/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +44 -0
- package/dist/ui/f/fields/EditorInput/common/FontSizeDropDown/index.js +4 -0
- package/dist/ui/f/fields/EditorInput/common/StopPropagationPlugin.js +18 -0
- package/dist/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +11 -0
- package/dist/ui/f/fields/EditorInput/common/ToolbarPlugin/index.js +4 -0
- package/dist/ui/f/fields/EditorInput/common/TreeViewPlugin.js +7 -0
- package/dist/ui/f/fields/EditorInput/common/index.js +13 -0
- package/dist/ui/f/fields/EditorInput/index.js +4 -0
- package/dist/ui/f/fields/FileUpload/FileUpload.js +11 -0
- package/dist/ui/f/fields/FileUpload/common/Preview/Preview.js +42 -0
- package/dist/ui/f/fields/FileUpload/common/Preview/index.js +4 -0
- package/dist/ui/f/fields/FileUpload/common/index.js +4 -0
- package/dist/ui/f/fields/FileUpload/index.js +8 -0
- package/dist/ui/f/fields/FileUpload/utils.js +48 -0
- package/dist/ui/f/fields/LatexPreviewInput/LatexPreviewInput.js +10 -0
- package/dist/ui/f/fields/LatexPreviewInput/convertLatexToHtml.js +51108 -0
- package/dist/ui/f/fields/LatexPreviewInput/index.js +6 -0
- package/dist/ui/f/fields/LinkInput/LinkInput.js +11 -0
- package/dist/ui/f/fields/LinkInput/index.js +4 -0
- package/dist/ui/f/fields/QueryChoices/QueryChoices.js +8 -0
- package/dist/ui/f/fields/QueryChoices/index.js +4 -0
- package/dist/ui/f/fields/QueryCombobox/QueryCombobox.js +9 -0
- package/dist/ui/f/fields/QueryCombobox/common/Combobox/Combobox.js +47 -0
- package/dist/ui/f/fields/QueryCombobox/common/Combobox/index.js +4 -0
- package/dist/ui/f/fields/QueryCombobox/common/Menu/Menu.js +78 -0
- package/dist/ui/f/fields/QueryCombobox/common/Menu/index.js +4 -0
- package/dist/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +47 -0
- package/dist/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +4 -0
- package/dist/ui/f/fields/QueryCombobox/common/index.js +7 -0
- package/dist/ui/f/fields/QueryCombobox/index.js +4 -0
- package/dist/ui/f/fields/QuerySelect/QuerySelect.js +12 -0
- package/dist/ui/f/fields/QuerySelect/index.js +4 -0
- package/dist/ui/f/fields/RadioInput/RadioInput.js +78 -0
- package/dist/ui/f/fields/RadioInput/index.js +4 -0
- package/dist/ui/f/fields/RatingsInput/RatingsInput.js +11 -0
- package/dist/ui/f/fields/RatingsInput/common/Rating/Rating.js +127 -0
- package/dist/ui/f/fields/RatingsInput/common/Rating/index.js +4 -0
- package/dist/ui/f/fields/RatingsInput/common/index.js +4 -0
- package/dist/ui/f/fields/RatingsInput/index.js +4 -0
- package/dist/ui/f/fields/SelectInput/SelectInput.js +9 -0
- package/dist/ui/f/fields/SelectInput/common/Menu/Menu.js +79 -0
- package/dist/ui/f/fields/SelectInput/common/Menu/index.js +4 -0
- package/dist/ui/f/fields/SelectInput/common/Multiple/Multiple.js +47 -0
- package/dist/ui/f/fields/SelectInput/common/Multiple/index.js +4 -0
- package/dist/ui/f/fields/SelectInput/common/Single/Single.js +44 -0
- package/dist/ui/f/fields/SelectInput/common/Single/index.js +4 -0
- package/dist/ui/f/fields/SelectInput/common/index.js +7 -0
- package/dist/ui/f/fields/SelectInput/index.js +4 -0
- package/dist/ui/f/fields/TextInput/TextInput.js +11 -0
- package/dist/ui/f/fields/TextInput/index.js +4 -0
- package/dist/ui/f/fields/TextareaInput/TextareaInput.js +11 -0
- package/dist/ui/f/fields/TextareaInput/index.js +4 -0
- package/dist/ui/f/fields/ToggleInput/ToggleInput.js +42 -0
- package/dist/ui/f/fields/ToggleInput/index.js +4 -0
- package/dist/ui/f/fields/index.js +25 -0
- package/dist/ui/f/index.js +35 -0
- package/dist/ui/g/DragAndDrop/DragAndDrop.js +89 -0
- package/dist/ui/g/DragAndDrop/common/DraggableItem/DraggableItem.js +64 -0
- package/dist/ui/g/DragAndDrop/common/DraggableItem/index.js +4 -0
- package/dist/ui/g/DragAndDrop/common/index.js +4 -0
- package/dist/ui/g/DragAndDrop/index.js +4 -0
- package/dist/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +15 -0
- package/dist/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +40 -0
- package/dist/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +4 -0
- package/dist/ui/g/ExpandableLexicalPreview/common/index.js +4 -0
- package/dist/ui/g/ExpandableLexicalPreview/index.js +4 -0
- package/dist/ui/g/FormBuilder/FormBuilder.js +8 -0
- package/dist/ui/g/FormBuilder/common/Builder/Builder.js +13 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/ActionsContainer/ActionsContainer.js +43 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/ActionsContainer/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +46 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/InputBuilder/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/Section/Section.js +14 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/Section/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/Builder/common/index.js +6 -0
- package/dist/ui/g/FormBuilder/common/Builder/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/Renderer/Renderer.js +15 -0
- package/dist/ui/g/FormBuilder/common/Renderer/common/Section/Section.js +14 -0
- package/dist/ui/g/FormBuilder/common/Renderer/common/Section/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/Renderer/common/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/Renderer/index.js +4 -0
- package/dist/ui/g/FormBuilder/common/index.js +5 -0
- package/dist/ui/g/FormBuilder/index.js +4 -0
- package/dist/ui/g/index.js +7 -0
- package/dist/ui/index.js +137 -0
- package/dist/ui/utils/applyCharacterLimit.js +31 -0
- package/dist/ui/utils/formatting.js +90 -0
- package/dist/ui/utils/hooks/index.js +8 -0
- package/dist/ui/utils/hooks/useDynamicPosition.js +61 -0
- package/dist/ui/utils/hooks/useOutsideClick.js +14 -0
- package/dist/ui/utils/hooks/useWindowSize.js +16 -0
- package/dist/ui/utils/index.js +16 -0
- package/dist/vite.svg +1 -0
- package/package.json +44 -36
- package/.eslintrc.js +0 -3
- package/.storybook/main.js +0 -32
- package/.storybook/preview.js +0 -45
- package/.storybook/webpackFinal.js +0 -68
- package/babel.config.js +0 -55
- package/dist/cjs/a/AnimatedBlobs/AnimatedBlobs.js +0 -89
- package/dist/cjs/a/AnimatedBlobs/index.js +0 -13
- package/dist/cjs/a/AnimatedBlobs/styles.scss +0 -87
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +0 -59
- package/dist/cjs/a/AnimatedGradient/index.js +0 -13
- package/dist/cjs/a/AnimatedGradient/styles.scss +0 -15
- package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +0 -527
- package/dist/cjs/a/AppContext/Context.js +0 -10
- package/dist/cjs/a/AppContext/ContextProvider.js +0 -87
- package/dist/cjs/a/AppContext/index.js +0 -34
- package/dist/cjs/a/AppContext/useApp.js +0 -11
- package/dist/cjs/a/AppContext/useTheme.js +0 -38
- package/dist/cjs/a/BlurOverlay/BlurOverlay.js +0 -58
- package/dist/cjs/a/BlurOverlay/index.js +0 -13
- package/dist/cjs/a/BlurOverlay/styles.scss +0 -33
- package/dist/cjs/a/Charts/AreaChart/AreaChart.js +0 -256
- package/dist/cjs/a/Charts/AreaChart/index.js +0 -13
- package/dist/cjs/a/Charts/AreaChart/styles.scss +0 -70
- package/dist/cjs/a/Charts/BarChart/BarChart.js +0 -138
- package/dist/cjs/a/Charts/BarChart/index.js +0 -13
- package/dist/cjs/a/Charts/BarChart/styles.scss +0 -48
- package/dist/cjs/a/Charts/Common/CustomLegend/CustomLegend.js +0 -106
- package/dist/cjs/a/Charts/Common/CustomLegend/index.js +0 -13
- package/dist/cjs/a/Charts/Common/CustomLegend/styles.scss +0 -75
- package/dist/cjs/a/Charts/Common/CustomTooltipContent/CustomTooltipContent.js +0 -194
- package/dist/cjs/a/Charts/Common/CustomTooltipContent/index.js +0 -13
- package/dist/cjs/a/Charts/Common/CustomTooltipContent/styles.scss +0 -26
- package/dist/cjs/a/Charts/Common/YLabelsDropDown/YlabelsDropDown.js +0 -97
- package/dist/cjs/a/Charts/Common/YLabelsDropDown/index.js +0 -13
- package/dist/cjs/a/Charts/Common/YLabelsDropDown/styles.scss +0 -89
- package/dist/cjs/a/Charts/Common/index.js +0 -26
- package/dist/cjs/a/Charts/PieChart/PieChart.js +0 -130
- package/dist/cjs/a/Charts/PieChart/index.js +0 -13
- package/dist/cjs/a/Charts/PieChart/styles.scss +0 -136
- package/dist/cjs/a/Charts/index.js +0 -26
- package/dist/cjs/a/ContentTree/ContentTree.js +0 -77
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +0 -111
- package/dist/cjs/a/ContentTree/common/Tree/index.js +0 -13
- package/dist/cjs/a/ContentTree/common/index.js +0 -27
- package/dist/cjs/a/ContentTree/common/useContentTree.js +0 -79
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +0 -61
- package/dist/cjs/a/ContentTree/index.js +0 -13
- package/dist/cjs/a/ContentTree/styles.scss +0 -56
- package/dist/cjs/a/Conversation/Context.js +0 -10
- package/dist/cjs/a/Conversation/Conversation.js +0 -85
- package/dist/cjs/a/Conversation/common/Message/Message.js +0 -103
- package/dist/cjs/a/Conversation/common/Message/index.js +0 -13
- package/dist/cjs/a/Conversation/common/index.js +0 -12
- package/dist/cjs/a/Conversation/index.js +0 -27
- package/dist/cjs/a/Conversation/styles.scss +0 -86
- package/dist/cjs/a/Conversation/useConversation.js +0 -11
- package/dist/cjs/a/DatePicker/DatePicker.js +0 -162
- package/dist/cjs/a/DatePicker/index.js +0 -13
- package/dist/cjs/a/DatePicker/styles.scss +0 -380
- package/dist/cjs/a/DotInfo/DotInfo.js +0 -86
- package/dist/cjs/a/DotInfo/index.js +0 -13
- package/dist/cjs/a/DotInfo/styles.scss +0 -20
- package/dist/cjs/a/Figure/Figure.js +0 -72
- package/dist/cjs/a/Figure/index.js +0 -13
- package/dist/cjs/a/Figure/styles.scss +0 -19
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +0 -82
- package/dist/cjs/a/HamburgerButton/index.js +0 -13
- package/dist/cjs/a/HamburgerButton/styles.scss +0 -183
- package/dist/cjs/a/IconList/IconList.js +0 -74
- package/dist/cjs/a/IconList/common/Item/Item.js +0 -72
- package/dist/cjs/a/IconList/common/Item/index.js +0 -13
- package/dist/cjs/a/IconList/common/index.js +0 -12
- package/dist/cjs/a/IconList/index.js +0 -13
- package/dist/cjs/a/IconList/styles.scss +0 -37
- package/dist/cjs/a/Label/Label.js +0 -79
- package/dist/cjs/a/Label/index.js +0 -13
- package/dist/cjs/a/Label/styles.scss +0 -35
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +0 -102
- package/dist/cjs/a/LoadingCircle/index.js +0 -13
- package/dist/cjs/a/LoadingCircle/styles.scss +0 -47
- package/dist/cjs/a/MetaCard/MetaCard.js +0 -64
- package/dist/cjs/a/MetaCard/index.js +0 -13
- package/dist/cjs/a/MetaCard/styles.scss +0 -45
- package/dist/cjs/a/Notification/Notification.js +0 -113
- package/dist/cjs/a/Notification/index.js +0 -13
- package/dist/cjs/a/Notification/styles.scss +0 -67
- package/dist/cjs/a/NotificationStack/NotificationStack.js +0 -68
- package/dist/cjs/a/NotificationStack/index.js +0 -13
- package/dist/cjs/a/NotificationStack/styles.scss +0 -23
- package/dist/cjs/a/People/People.js +0 -77
- package/dist/cjs/a/People/common/Person/Person.js +0 -88
- package/dist/cjs/a/People/common/Person/index.js +0 -13
- package/dist/cjs/a/People/common/index.js +0 -12
- package/dist/cjs/a/People/index.js +0 -13
- package/dist/cjs/a/People/styles.scss +0 -60
- package/dist/cjs/a/Popover/Popover.js +0 -117
- package/dist/cjs/a/Popover/index.js +0 -13
- package/dist/cjs/a/Popover/styles.scss +0 -34
- package/dist/cjs/a/ProgressBar/ProgressBar.js +0 -81
- package/dist/cjs/a/ProgressBar/index.js +0 -13
- package/dist/cjs/a/ProgressBar/styles.scss +0 -47
- package/dist/cjs/a/Quote/Quote.js +0 -92
- package/dist/cjs/a/Quote/index.js +0 -13
- package/dist/cjs/a/Quote/styles.scss +0 -35
- package/dist/cjs/a/Removable/Removable.js +0 -71
- package/dist/cjs/a/Removable/index.js +0 -13
- package/dist/cjs/a/Removable/styles.scss +0 -33
- package/dist/cjs/a/SVG/SVG.js +0 -133
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +0 -71
- package/dist/cjs/a/SVG/common/UseSVG/index.js +0 -13
- package/dist/cjs/a/SVG/common/index.js +0 -12
- package/dist/cjs/a/SVG/index.js +0 -13
- package/dist/cjs/a/SVG/styles.scss +0 -57
- package/dist/cjs/a/SnapScroller/SnapScroller.js +0 -92
- package/dist/cjs/a/SnapScroller/index.js +0 -13
- package/dist/cjs/a/SnapScroller/styles.scss +0 -77
- package/dist/cjs/a/Spinner/Spinner.js +0 -62
- package/dist/cjs/a/Spinner/index.js +0 -13
- package/dist/cjs/a/Spinner/styles.scss +0 -23
- package/dist/cjs/a/TextSteps/TextSteps.js +0 -67
- package/dist/cjs/a/TextSteps/index.js +0 -13
- package/dist/cjs/a/TextSteps/styles.scss +0 -29
- package/dist/cjs/a/ThroughPutIndicator/ThroughPutIndicator.js +0 -78
- package/dist/cjs/a/ThroughPutIndicator/index.js +0 -13
- package/dist/cjs/a/ThroughPutIndicator/styles.scss +0 -35
- package/dist/cjs/a/Timestamp/Timestamp.js +0 -122
- package/dist/cjs/a/Timestamp/index.js +0 -13
- package/dist/cjs/a/Timestamp/styles.scss +0 -7
- package/dist/cjs/a/Tip/Tip.js +0 -85
- package/dist/cjs/a/Tip/index.js +0 -13
- package/dist/cjs/a/Tip/styles.scss +0 -16
- package/dist/cjs/a/ToggleSwitch/ToggleSwitch.js +0 -87
- package/dist/cjs/a/ToggleSwitch/index.js +0 -13
- package/dist/cjs/a/ToggleSwitch/styles.scss +0 -58
- package/dist/cjs/a/Tooltip/Tooltip.js +0 -104
- package/dist/cjs/a/Tooltip/index.js +0 -13
- package/dist/cjs/a/Tooltip/styles.scss +0 -89
- package/dist/cjs/a/XMLEditor/XMLEditor.js +0 -128
- package/dist/cjs/a/XMLEditor/common/index.js +0 -13
- package/dist/cjs/a/XMLEditor/common/theme.js +0 -186
- package/dist/cjs/a/XMLEditor/index.js +0 -13
- package/dist/cjs/a/XMLEditor/styles.scss +0 -24
- package/dist/cjs/a/index.js +0 -259
- package/dist/cjs/b/Button/Button.js +0 -111
- package/dist/cjs/b/Button/common/Group/Group.js +0 -54
- package/dist/cjs/b/Button/common/Group/index.js +0 -13
- package/dist/cjs/b/Button/common/Group/styles.scss +0 -11
- package/dist/cjs/b/Button/common/index.js +0 -12
- package/dist/cjs/b/Button/index.js +0 -13
- package/dist/cjs/b/Button/styles.scss +0 -173
- package/dist/cjs/b/Card/Card.js +0 -73
- package/dist/cjs/b/Card/common/Group/Group.js +0 -70
- package/dist/cjs/b/Card/common/Group/index.js +0 -13
- package/dist/cjs/b/Card/common/Group/styles.scss +0 -35
- package/dist/cjs/b/Card/common/Section/Section.js +0 -58
- package/dist/cjs/b/Card/common/Section/index.js +0 -13
- package/dist/cjs/b/Card/common/index.js +0 -19
- package/dist/cjs/b/Card/index.js +0 -13
- package/dist/cjs/b/Card/styles.scss +0 -57
- package/dist/cjs/b/Logo/Logo.js +0 -123
- package/dist/cjs/b/Logo/index.js +0 -13
- package/dist/cjs/b/Logo/styles.scss +0 -11
- package/dist/cjs/b/Page/Context.js +0 -10
- package/dist/cjs/b/Page/Page.js +0 -106
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +0 -186
- package/dist/cjs/b/Page/common/PageHelmet/index.js +0 -13
- package/dist/cjs/b/Page/common/Section/Section.js +0 -66
- package/dist/cjs/b/Page/common/Section/index.js +0 -13
- package/dist/cjs/b/Page/common/index.js +0 -19
- package/dist/cjs/b/Page/index.js +0 -27
- package/dist/cjs/b/Page/styles.scss +0 -38
- package/dist/cjs/b/Page/usePage.js +0 -11
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +0 -116
- package/dist/cjs/b/SocialMediaButton/index.js +0 -13
- package/dist/cjs/b/SocialMediaButton/styles.scss +0 -35
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +0 -74
- package/dist/cjs/b/ThemeSelector/index.js +0 -13
- package/dist/cjs/b/ThemeSelector/styles.scss +0 -52
- package/dist/cjs/b/Title/Title.js +0 -110
- package/dist/cjs/b/Title/index.js +0 -13
- package/dist/cjs/b/index.js +0 -54
- package/dist/cjs/c/Modal/Modal.js +0 -82
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +0 -76
- package/dist/cjs/c/Modal/common/ModalHeader/index.js +0 -13
- package/dist/cjs/c/Modal/common/index.js +0 -12
- package/dist/cjs/c/Modal/index.js +0 -13
- package/dist/cjs/c/Modal/styles.scss +0 -44
- package/dist/cjs/c/Shortener/Shortener.js +0 -102
- package/dist/cjs/c/Shortener/index.js +0 -13
- package/dist/cjs/c/Shortener/styles.scss +0 -7
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +0 -102
- package/dist/cjs/c/SocialMediaShareButton/index.js +0 -13
- package/dist/cjs/c/SocialMediaShareButton/styles.scss +0 -39
- package/dist/cjs/c/index.js +0 -26
- package/dist/cjs/d/index.js +0 -2
- package/dist/cjs/f/FormInput/FormInput.js +0 -154
- package/dist/cjs/f/FormInput/index.js +0 -13
- package/dist/cjs/f/FormInput/styles.scss +0 -11
- package/dist/cjs/f/common/Debugger/Debugger.js +0 -68
- package/dist/cjs/f/common/Debugger/index.js +0 -13
- package/dist/cjs/f/common/Debugger/styles.scss +0 -12
- package/dist/cjs/f/common/Description/Description.js +0 -75
- package/dist/cjs/f/common/Description/index.js +0 -13
- package/dist/cjs/f/common/Description/styles.scss +0 -9
- package/dist/cjs/f/common/Label/Label.js +0 -82
- package/dist/cjs/f/common/Label/index.js +0 -13
- package/dist/cjs/f/common/Label/styles.scss +0 -9
- package/dist/cjs/f/common/index.js +0 -43
- package/dist/cjs/f/common/utils/index.js +0 -19
- package/dist/cjs/f/common/utils/lookUpInputValueFromFetchedOptions.js +0 -29
- package/dist/cjs/f/common/utils/validators.js +0 -17
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +0 -117
- package/dist/cjs/f/fields/Checkbox/index.js +0 -13
- package/dist/cjs/f/fields/Checkbox/styles.scss +0 -16
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +0 -151
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +0 -105
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +0 -13
- package/dist/cjs/f/fields/ChoicesInput/common/index.js +0 -12
- package/dist/cjs/f/fields/ChoicesInput/index.js +0 -13
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +0 -79
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +0 -238
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +0 -256
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/index.js +0 -13
- package/dist/cjs/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +0 -55
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +0 -98
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/index.js +0 -13
- package/dist/cjs/f/fields/EditorInput/common/ColorPicker/styles.scss +0 -36
- package/dist/cjs/f/fields/EditorInput/common/ExposePlainTextPlugin.js +0 -47
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +0 -94
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/index.js +0 -13
- package/dist/cjs/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +0 -55
- package/dist/cjs/f/fields/EditorInput/common/StopPropagationPlugin.js +0 -25
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +0 -289
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/index.js +0 -13
- package/dist/cjs/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +0 -56
- package/dist/cjs/f/fields/EditorInput/common/TreeViewPlugin.js +0 -18
- package/dist/cjs/f/fields/EditorInput/common/index.js +0 -55
- package/dist/cjs/f/fields/EditorInput/index.js +0 -13
- package/dist/cjs/f/fields/EditorInput/styles.scss +0 -240
- package/dist/cjs/f/fields/FileUpload/FileUpload.js +0 -248
- package/dist/cjs/f/fields/FileUpload/common/Preview/Preview.js +0 -135
- package/dist/cjs/f/fields/FileUpload/common/Preview/index.js +0 -13
- package/dist/cjs/f/fields/FileUpload/common/Preview/styles.scss +0 -96
- package/dist/cjs/f/fields/FileUpload/common/index.js +0 -12
- package/dist/cjs/f/fields/FileUpload/index.js +0 -32
- package/dist/cjs/f/fields/FileUpload/styles.scss +0 -73
- package/dist/cjs/f/fields/FileUpload/utils.js +0 -48
- package/dist/cjs/f/fields/LatexPreviewInput/LatexPreviewInput.js +0 -78
- package/dist/cjs/f/fields/LatexPreviewInput/convertLatexToHtml.js +0 -46
- package/dist/cjs/f/fields/LatexPreviewInput/index.js +0 -20
- package/dist/cjs/f/fields/LatexPreviewInput/styles.scss +0 -25
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +0 -152
- package/dist/cjs/f/fields/LinkInput/index.js +0 -13
- package/dist/cjs/f/fields/LinkInput/styles.scss +0 -90
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +0 -137
- package/dist/cjs/f/fields/QueryChoices/index.js +0 -13
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +0 -241
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +0 -238
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +0 -13
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +0 -83
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +0 -13
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -331
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +0 -13
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +0 -26
- package/dist/cjs/f/fields/QueryCombobox/index.js +0 -13
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +0 -134
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +0 -198
- package/dist/cjs/f/fields/QuerySelect/index.js +0 -13
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +0 -132
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +0 -117
- package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +0 -13
- package/dist/cjs/f/fields/RatingsInput/common/index.js +0 -12
- package/dist/cjs/f/fields/RatingsInput/index.js +0 -13
- package/dist/cjs/f/fields/RatingsInput/styles.scss +0 -48
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +0 -149
- package/dist/cjs/f/fields/SelectInput/common/Menu/Menu.js +0 -83
- package/dist/cjs/f/fields/SelectInput/common/Menu/index.js +0 -13
- package/dist/cjs/f/fields/SelectInput/common/Multiple/Multiple.js +0 -242
- package/dist/cjs/f/fields/SelectInput/common/Multiple/index.js +0 -13
- package/dist/cjs/f/fields/SelectInput/common/Single/Single.js +0 -115
- package/dist/cjs/f/fields/SelectInput/common/Single/index.js +0 -13
- package/dist/cjs/f/fields/SelectInput/common/index.js +0 -26
- package/dist/cjs/f/fields/SelectInput/index.js +0 -13
- package/dist/cjs/f/fields/SelectInput/styles.scss +0 -191
- package/dist/cjs/f/fields/TextInput/TextInput.js +0 -150
- package/dist/cjs/f/fields/TextInput/index.js +0 -13
- package/dist/cjs/f/fields/TextInput/styles.scss +0 -81
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +0 -151
- package/dist/cjs/f/fields/TextareaInput/index.js +0 -13
- package/dist/cjs/f/fields/TextareaInput/styles.scss +0 -53
- package/dist/cjs/f/fields/ToggleInput/ToggleInput.js +0 -126
- package/dist/cjs/f/fields/ToggleInput/index.js +0 -13
- package/dist/cjs/f/fields/ToggleInput/styles.scss +0 -22
- package/dist/cjs/f/fields/index.js +0 -127
- package/dist/cjs/f/index.js +0 -39
- package/dist/cjs/form-reset.scss +0 -86
- package/dist/cjs/form.scss +0 -34
- package/dist/cjs/g/DragAndDrop/DragAndDrop.js +0 -104
- package/dist/cjs/g/DragAndDrop/common/DraggableItem/DraggableItem.js +0 -76
- package/dist/cjs/g/DragAndDrop/common/DraggableItem/index.js +0 -13
- package/dist/cjs/g/DragAndDrop/common/DraggableItem/styles.scss +0 -12
- package/dist/cjs/g/DragAndDrop/common/index.js +0 -12
- package/dist/cjs/g/DragAndDrop/index.js +0 -13
- package/dist/cjs/g/DragAndDrop/styles.scss +0 -8
- package/dist/cjs/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +0 -139
- package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +0 -79
- package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +0 -13
- package/dist/cjs/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +0 -9
- package/dist/cjs/g/ExpandableLexicalPreview/common/index.js +0 -12
- package/dist/cjs/g/ExpandableLexicalPreview/index.js +0 -13
- package/dist/cjs/g/ExpandableLexicalPreview/styles.scss +0 -33
- package/dist/cjs/g/FormBuilder/FormBuilder.js +0 -127
- package/dist/cjs/g/FormBuilder/common/Builder/Builder.js +0 -193
- package/dist/cjs/g/FormBuilder/common/Builder/common/ActionsContainer/ActionsContainer.js +0 -80
- package/dist/cjs/g/FormBuilder/common/Builder/common/ActionsContainer/index.js +0 -13
- package/dist/cjs/g/FormBuilder/common/Builder/common/ActionsContainer/styles.scss +0 -59
- package/dist/cjs/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +0 -254
- package/dist/cjs/g/FormBuilder/common/Builder/common/InputBuilder/index.js +0 -13
- package/dist/cjs/g/FormBuilder/common/Builder/common/InputBuilder/styles.scss +0 -169
- package/dist/cjs/g/FormBuilder/common/Builder/common/Section/Section.js +0 -148
- package/dist/cjs/g/FormBuilder/common/Builder/common/Section/index.js +0 -13
- package/dist/cjs/g/FormBuilder/common/Builder/common/Section/styles.scss +0 -71
- package/dist/cjs/g/FormBuilder/common/Builder/common/index.js +0 -26
- package/dist/cjs/g/FormBuilder/common/Builder/index.js +0 -13
- package/dist/cjs/g/FormBuilder/common/Builder/styles.scss +0 -63
- package/dist/cjs/g/FormBuilder/common/Renderer/Renderer.js +0 -194
- package/dist/cjs/g/FormBuilder/common/Renderer/common/Section/Section.js +0 -95
- package/dist/cjs/g/FormBuilder/common/Renderer/common/Section/index.js +0 -13
- package/dist/cjs/g/FormBuilder/common/Renderer/common/index.js +0 -12
- package/dist/cjs/g/FormBuilder/common/Renderer/index.js +0 -13
- package/dist/cjs/g/FormBuilder/common/Renderer/styles.scss +0 -30
- package/dist/cjs/g/FormBuilder/common/index.js +0 -19
- package/dist/cjs/g/FormBuilder/index.js +0 -13
- package/dist/cjs/g/FormBuilder/styles.scss +0 -25
- package/dist/cjs/g/index.js +0 -26
- package/dist/cjs/index.js +0 -93
- package/dist/cjs/test/QueryLoader/QueryLoader.js +0 -36
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -63
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +0 -40
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +0 -13
- package/dist/cjs/test/QueryLoader/common/index.js +0 -12
- package/dist/cjs/test/QueryLoader/index.js +0 -13
- package/dist/cjs/test/index.js +0 -12
- package/dist/cjs/utils/applyCharacterLimit.js +0 -75
- package/dist/cjs/utils/formatting.js +0 -128
- package/dist/cjs/utils/hooks/index.js +0 -27
- package/dist/cjs/utils/hooks/useDynamicPosition.js +0 -91
- package/dist/cjs/utils/hooks/useOutsideClick.js +0 -25
- package/dist/cjs/utils/hooks/useWindowSize.js +0 -30
- package/dist/cjs/utils/index.js +0 -62
- package/dist/es/a/AnimatedBlobs/AnimatedBlobs.js +0 -77
- package/dist/es/a/AnimatedBlobs/index.js +0 -1
- package/dist/es/a/AnimatedBlobs/styles.scss +0 -87
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +0 -49
- package/dist/es/a/AnimatedGradient/index.js +0 -1
- package/dist/es/a/AnimatedGradient/styles.scss +0 -15
- package/dist/es/a/AnimatedGradient/webGIRenderer.js +0 -491
- package/dist/es/a/AppContext/Context.js +0 -2
- package/dist/es/a/AppContext/ContextProvider.js +0 -77
- package/dist/es/a/AppContext/index.js +0 -5
- package/dist/es/a/AppContext/useApp.js +0 -3
- package/dist/es/a/AppContext/useTheme.js +0 -31
- package/dist/es/a/BlurOverlay/BlurOverlay.js +0 -45
- package/dist/es/a/BlurOverlay/index.js +0 -2
- package/dist/es/a/BlurOverlay/styles.scss +0 -33
- package/dist/es/a/Charts/AreaChart/AreaChart.js +0 -246
- package/dist/es/a/Charts/AreaChart/index.js +0 -1
- package/dist/es/a/Charts/AreaChart/styles.scss +0 -70
- package/dist/es/a/Charts/BarChart/BarChart.js +0 -129
- package/dist/es/a/Charts/BarChart/index.js +0 -1
- package/dist/es/a/Charts/BarChart/styles.scss +0 -48
- package/dist/es/a/Charts/Common/CustomLegend/CustomLegend.js +0 -94
- package/dist/es/a/Charts/Common/CustomLegend/index.js +0 -1
- package/dist/es/a/Charts/Common/CustomLegend/styles.scss +0 -75
- package/dist/es/a/Charts/Common/CustomTooltipContent/CustomTooltipContent.js +0 -175
- package/dist/es/a/Charts/Common/CustomTooltipContent/index.js +0 -1
- package/dist/es/a/Charts/Common/CustomTooltipContent/styles.scss +0 -26
- package/dist/es/a/Charts/Common/YLabelsDropDown/YlabelsDropDown.js +0 -86
- package/dist/es/a/Charts/Common/YLabelsDropDown/index.js +0 -1
- package/dist/es/a/Charts/Common/YLabelsDropDown/styles.scss +0 -89
- package/dist/es/a/Charts/Common/index.js +0 -3
- package/dist/es/a/Charts/PieChart/PieChart.js +0 -120
- package/dist/es/a/Charts/PieChart/index.js +0 -1
- package/dist/es/a/Charts/PieChart/styles.scss +0 -136
- package/dist/es/a/Charts/index.js +0 -3
- package/dist/es/a/ContentTree/ContentTree.js +0 -66
- package/dist/es/a/ContentTree/common/Tree/Tree.js +0 -101
- package/dist/es/a/ContentTree/common/Tree/index.js +0 -2
- package/dist/es/a/ContentTree/common/index.js +0 -3
- package/dist/es/a/ContentTree/common/useContentTree.js +0 -73
- package/dist/es/a/ContentTree/common/useFirstVisibleNode.js +0 -54
- package/dist/es/a/ContentTree/index.js +0 -2
- package/dist/es/a/ContentTree/styles.scss +0 -56
- package/dist/es/a/Conversation/Context.js +0 -2
- package/dist/es/a/Conversation/Conversation.js +0 -73
- package/dist/es/a/Conversation/common/Message/Message.js +0 -93
- package/dist/es/a/Conversation/common/Message/index.js +0 -2
- package/dist/es/a/Conversation/common/index.js +0 -1
- package/dist/es/a/Conversation/index.js +0 -4
- package/dist/es/a/Conversation/styles.scss +0 -86
- package/dist/es/a/Conversation/useConversation.js +0 -3
- package/dist/es/a/DatePicker/DatePicker.js +0 -154
- package/dist/es/a/DatePicker/index.js +0 -2
- package/dist/es/a/DatePicker/styles.scss +0 -380
- package/dist/es/a/DotInfo/DotInfo.js +0 -74
- package/dist/es/a/DotInfo/index.js +0 -2
- package/dist/es/a/DotInfo/styles.scss +0 -20
- package/dist/es/a/Figure/Figure.js +0 -60
- package/dist/es/a/Figure/index.js +0 -2
- package/dist/es/a/Figure/styles.scss +0 -19
- package/dist/es/a/HamburgerButton/HamburgerButton.js +0 -72
- package/dist/es/a/HamburgerButton/index.js +0 -2
- package/dist/es/a/HamburgerButton/styles.scss +0 -183
- package/dist/es/a/IconList/IconList.js +0 -64
- package/dist/es/a/IconList/common/Item/Item.js +0 -63
- package/dist/es/a/IconList/common/Item/index.js +0 -2
- package/dist/es/a/IconList/common/index.js +0 -1
- package/dist/es/a/IconList/index.js +0 -2
- package/dist/es/a/IconList/styles.scss +0 -37
- package/dist/es/a/Label/Label.js +0 -69
- package/dist/es/a/Label/index.js +0 -2
- package/dist/es/a/Label/styles.scss +0 -35
- package/dist/es/a/LoadingCircle/LoadingCircle.js +0 -90
- package/dist/es/a/LoadingCircle/index.js +0 -2
- package/dist/es/a/LoadingCircle/styles.scss +0 -47
- package/dist/es/a/MetaCard/MetaCard.js +0 -52
- package/dist/es/a/MetaCard/index.js +0 -1
- package/dist/es/a/MetaCard/styles.scss +0 -45
- package/dist/es/a/Notification/Notification.js +0 -107
- package/dist/es/a/Notification/index.js +0 -1
- package/dist/es/a/Notification/styles.scss +0 -67
- package/dist/es/a/NotificationStack/NotificationStack.js +0 -62
- package/dist/es/a/NotificationStack/index.js +0 -1
- package/dist/es/a/NotificationStack/styles.scss +0 -23
- package/dist/es/a/People/People.js +0 -65
- package/dist/es/a/People/common/Person/Person.js +0 -78
- package/dist/es/a/People/common/Person/index.js +0 -2
- package/dist/es/a/People/common/index.js +0 -1
- package/dist/es/a/People/index.js +0 -2
- package/dist/es/a/People/styles.scss +0 -60
- package/dist/es/a/Popover/Popover.js +0 -106
- package/dist/es/a/Popover/index.js +0 -2
- package/dist/es/a/Popover/styles.scss +0 -34
- package/dist/es/a/ProgressBar/ProgressBar.js +0 -69
- package/dist/es/a/ProgressBar/index.js +0 -2
- package/dist/es/a/ProgressBar/styles.scss +0 -47
- package/dist/es/a/Quote/Quote.js +0 -80
- package/dist/es/a/Quote/index.js +0 -2
- package/dist/es/a/Quote/styles.scss +0 -35
- package/dist/es/a/Removable/Removable.js +0 -59
- package/dist/es/a/Removable/index.js +0 -2
- package/dist/es/a/Removable/styles.scss +0 -33
- package/dist/es/a/SVG/SVG.js +0 -125
- package/dist/es/a/SVG/common/UseSVG/UseSVG.js +0 -59
- package/dist/es/a/SVG/common/UseSVG/index.js +0 -2
- package/dist/es/a/SVG/common/index.js +0 -1
- package/dist/es/a/SVG/index.js +0 -2
- package/dist/es/a/SVG/styles.scss +0 -57
- package/dist/es/a/SnapScroller/SnapScroller.js +0 -82
- package/dist/es/a/SnapScroller/index.js +0 -2
- package/dist/es/a/SnapScroller/styles.scss +0 -77
- package/dist/es/a/Spinner/Spinner.js +0 -50
- package/dist/es/a/Spinner/index.js +0 -2
- package/dist/es/a/Spinner/styles.scss +0 -23
- package/dist/es/a/TextSteps/TextSteps.js +0 -56
- package/dist/es/a/TextSteps/index.js +0 -1
- package/dist/es/a/TextSteps/styles.scss +0 -29
- package/dist/es/a/ThroughPutIndicator/ThroughPutIndicator.js +0 -66
- package/dist/es/a/ThroughPutIndicator/index.js +0 -2
- package/dist/es/a/ThroughPutIndicator/styles.scss +0 -35
- package/dist/es/a/Timestamp/Timestamp.js +0 -112
- package/dist/es/a/Timestamp/index.js +0 -2
- package/dist/es/a/Timestamp/styles.scss +0 -7
- package/dist/es/a/Tip/Tip.js +0 -73
- package/dist/es/a/Tip/index.js +0 -2
- package/dist/es/a/Tip/styles.scss +0 -16
- package/dist/es/a/ToggleSwitch/ToggleSwitch.js +0 -75
- package/dist/es/a/ToggleSwitch/index.js +0 -2
- package/dist/es/a/ToggleSwitch/styles.scss +0 -58
- package/dist/es/a/Tooltip/Tooltip.js +0 -94
- package/dist/es/a/Tooltip/index.js +0 -2
- package/dist/es/a/Tooltip/styles.scss +0 -89
- package/dist/es/a/XMLEditor/XMLEditor.js +0 -117
- package/dist/es/a/XMLEditor/common/index.js +0 -1
- package/dist/es/a/XMLEditor/common/theme.js +0 -180
- package/dist/es/a/XMLEditor/index.js +0 -1
- package/dist/es/a/XMLEditor/styles.scss +0 -24
- package/dist/es/a/index.js +0 -32
- package/dist/es/b/Button/Button.js +0 -105
- package/dist/es/b/Button/common/Group/Group.js +0 -44
- package/dist/es/b/Button/common/Group/index.js +0 -1
- package/dist/es/b/Button/common/Group/styles.scss +0 -11
- package/dist/es/b/Button/common/index.js +0 -1
- package/dist/es/b/Button/index.js +0 -2
- package/dist/es/b/Button/styles.scss +0 -173
- package/dist/es/b/Card/Card.js +0 -61
- package/dist/es/b/Card/common/Group/Group.js +0 -62
- package/dist/es/b/Card/common/Group/index.js +0 -1
- package/dist/es/b/Card/common/Group/styles.scss +0 -35
- package/dist/es/b/Card/common/Section/Section.js +0 -48
- package/dist/es/b/Card/common/Section/index.js +0 -1
- package/dist/es/b/Card/common/index.js +0 -2
- package/dist/es/b/Card/index.js +0 -1
- package/dist/es/b/Card/styles.scss +0 -57
- package/dist/es/b/Logo/Logo.js +0 -113
- package/dist/es/b/Logo/index.js +0 -2
- package/dist/es/b/Logo/styles.scss +0 -11
- package/dist/es/b/Page/Context.js +0 -2
- package/dist/es/b/Page/Page.js +0 -100
- package/dist/es/b/Page/common/PageHelmet/PageHelmet.js +0 -174
- package/dist/es/b/Page/common/PageHelmet/index.js +0 -2
- package/dist/es/b/Page/common/Section/Section.js +0 -59
- package/dist/es/b/Page/common/Section/index.js +0 -2
- package/dist/es/b/Page/common/index.js +0 -2
- package/dist/es/b/Page/index.js +0 -4
- package/dist/es/b/Page/styles.scss +0 -38
- package/dist/es/b/Page/usePage.js +0 -3
- package/dist/es/b/SocialMediaButton/SocialMediaButton.js +0 -108
- package/dist/es/b/SocialMediaButton/index.js +0 -2
- package/dist/es/b/SocialMediaButton/styles.scss +0 -35
- package/dist/es/b/ThemeSelector/ThemeSelector.js +0 -64
- package/dist/es/b/ThemeSelector/index.js +0 -2
- package/dist/es/b/ThemeSelector/styles.scss +0 -52
- package/dist/es/b/Title/Title.js +0 -102
- package/dist/es/b/Title/index.js +0 -2
- package/dist/es/b/index.js +0 -7
- package/dist/es/c/Modal/Modal.js +0 -70
- package/dist/es/c/Modal/common/ModalHeader/ModalHeader.js +0 -64
- package/dist/es/c/Modal/common/ModalHeader/index.js +0 -1
- package/dist/es/c/Modal/common/index.js +0 -1
- package/dist/es/c/Modal/index.js +0 -2
- package/dist/es/c/Modal/styles.scss +0 -44
- package/dist/es/c/Shortener/Shortener.js +0 -91
- package/dist/es/c/Shortener/index.js +0 -2
- package/dist/es/c/Shortener/styles.scss +0 -7
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +0 -92
- package/dist/es/c/SocialMediaShareButton/index.js +0 -2
- package/dist/es/c/SocialMediaShareButton/styles.scss +0 -39
- package/dist/es/c/index.js +0 -3
- package/dist/es/d/index.js +0 -1
- package/dist/es/f/FormInput/FormInput.js +0 -146
- package/dist/es/f/FormInput/index.js +0 -2
- package/dist/es/f/FormInput/styles.scss +0 -11
- package/dist/es/f/common/Debugger/Debugger.js +0 -58
- package/dist/es/f/common/Debugger/index.js +0 -2
- package/dist/es/f/common/Debugger/styles.scss +0 -12
- package/dist/es/f/common/Description/Description.js +0 -65
- package/dist/es/f/common/Description/index.js +0 -2
- package/dist/es/f/common/Description/styles.scss +0 -9
- package/dist/es/f/common/Label/Label.js +0 -69
- package/dist/es/f/common/Label/index.js +0 -2
- package/dist/es/f/common/Label/styles.scss +0 -9
- package/dist/es/f/common/index.js +0 -4
- package/dist/es/f/common/utils/index.js +0 -2
- package/dist/es/f/common/utils/lookUpInputValueFromFetchedOptions.js +0 -20
- package/dist/es/f/common/utils/validators.js +0 -10
- package/dist/es/f/fields/Checkbox/Checkbox.js +0 -110
- package/dist/es/f/fields/Checkbox/index.js +0 -2
- package/dist/es/f/fields/Checkbox/styles.scss +0 -16
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +0 -143
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +0 -98
- package/dist/es/f/fields/ChoicesInput/common/Choice/index.js +0 -2
- package/dist/es/f/fields/ChoicesInput/common/index.js +0 -1
- package/dist/es/f/fields/ChoicesInput/index.js +0 -2
- package/dist/es/f/fields/ChoicesInput/styles.scss +0 -79
- package/dist/es/f/fields/EditorInput/EditorInput.js +0 -227
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.js +0 -246
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/index.js +0 -2
- package/dist/es/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +0 -55
- package/dist/es/f/fields/EditorInput/common/ColorPicker/ColorPicker.js +0 -87
- package/dist/es/f/fields/EditorInput/common/ColorPicker/index.js +0 -2
- package/dist/es/f/fields/EditorInput/common/ColorPicker/styles.scss +0 -36
- package/dist/es/f/fields/EditorInput/common/ExposePlainTextPlugin.js +0 -39
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.js +0 -81
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/index.js +0 -2
- package/dist/es/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +0 -55
- package/dist/es/f/fields/EditorInput/common/StopPropagationPlugin.js +0 -19
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.js +0 -277
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/index.js +0 -2
- package/dist/es/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +0 -56
- package/dist/es/f/fields/EditorInput/common/TreeViewPlugin.js +0 -11
- package/dist/es/f/fields/EditorInput/common/index.js +0 -7
- package/dist/es/f/fields/EditorInput/index.js +0 -2
- package/dist/es/f/fields/EditorInput/styles.scss +0 -240
- package/dist/es/f/fields/FileUpload/FileUpload.js +0 -237
- package/dist/es/f/fields/FileUpload/common/Preview/Preview.js +0 -125
- package/dist/es/f/fields/FileUpload/common/Preview/index.js +0 -2
- package/dist/es/f/fields/FileUpload/common/Preview/styles.scss +0 -96
- package/dist/es/f/fields/FileUpload/common/index.js +0 -2
- package/dist/es/f/fields/FileUpload/index.js +0 -3
- package/dist/es/f/fields/FileUpload/styles.scss +0 -73
- package/dist/es/f/fields/FileUpload/utils.js +0 -40
- package/dist/es/f/fields/LatexPreviewInput/LatexPreviewInput.js +0 -70
- package/dist/es/f/fields/LatexPreviewInput/convertLatexToHtml.js +0 -31
- package/dist/es/f/fields/LatexPreviewInput/index.js +0 -3
- package/dist/es/f/fields/LatexPreviewInput/styles.scss +0 -25
- package/dist/es/f/fields/LinkInput/LinkInput.js +0 -146
- package/dist/es/f/fields/LinkInput/index.js +0 -2
- package/dist/es/f/fields/LinkInput/styles.scss +0 -90
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +0 -126
- package/dist/es/f/fields/QueryChoices/index.js +0 -2
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +0 -229
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +0 -231
- package/dist/es/f/fields/QueryCombobox/common/Combobox/index.js +0 -2
- package/dist/es/f/fields/QueryCombobox/common/Menu/Menu.js +0 -73
- package/dist/es/f/fields/QueryCombobox/common/Menu/index.js +0 -2
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -324
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/index.js +0 -2
- package/dist/es/f/fields/QueryCombobox/common/index.js +0 -3
- package/dist/es/f/fields/QueryCombobox/index.js +0 -2
- package/dist/es/f/fields/QueryCombobox/styles.scss +0 -134
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +0 -186
- package/dist/es/f/fields/QuerySelect/index.js +0 -2
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +0 -121
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +0 -109
- package/dist/es/f/fields/RatingsInput/common/Rating/index.js +0 -2
- package/dist/es/f/fields/RatingsInput/common/index.js +0 -1
- package/dist/es/f/fields/RatingsInput/index.js +0 -2
- package/dist/es/f/fields/RatingsInput/styles.scss +0 -48
- package/dist/es/f/fields/SelectInput/SelectInput.js +0 -141
- package/dist/es/f/fields/SelectInput/common/Menu/Menu.js +0 -73
- package/dist/es/f/fields/SelectInput/common/Menu/index.js +0 -2
- package/dist/es/f/fields/SelectInput/common/Multiple/Multiple.js +0 -233
- package/dist/es/f/fields/SelectInput/common/Multiple/index.js +0 -2
- package/dist/es/f/fields/SelectInput/common/Single/Single.js +0 -107
- package/dist/es/f/fields/SelectInput/common/Single/index.js +0 -2
- package/dist/es/f/fields/SelectInput/common/index.js +0 -3
- package/dist/es/f/fields/SelectInput/index.js +0 -2
- package/dist/es/f/fields/SelectInput/styles.scss +0 -191
- package/dist/es/f/fields/TextInput/TextInput.js +0 -144
- package/dist/es/f/fields/TextInput/index.js +0 -2
- package/dist/es/f/fields/TextInput/styles.scss +0 -81
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +0 -145
- package/dist/es/f/fields/TextareaInput/index.js +0 -2
- package/dist/es/f/fields/TextareaInput/styles.scss +0 -53
- package/dist/es/f/fields/ToggleInput/ToggleInput.js +0 -116
- package/dist/es/f/fields/ToggleInput/index.js +0 -2
- package/dist/es/f/fields/ToggleInput/styles.scss +0 -22
- package/dist/es/f/fields/index.js +0 -14
- package/dist/es/f/index.js +0 -3
- package/dist/es/form-reset.scss +0 -86
- package/dist/es/form.scss +0 -34
- package/dist/es/g/DragAndDrop/DragAndDrop.js +0 -95
- package/dist/es/g/DragAndDrop/common/DraggableItem/DraggableItem.js +0 -68
- package/dist/es/g/DragAndDrop/common/DraggableItem/index.js +0 -2
- package/dist/es/g/DragAndDrop/common/DraggableItem/styles.scss +0 -12
- package/dist/es/g/DragAndDrop/common/index.js +0 -1
- package/dist/es/g/DragAndDrop/index.js +0 -2
- package/dist/es/g/DragAndDrop/styles.scss +0 -8
- package/dist/es/g/ExpandableLexicalPreview/ExpandableLexicalPreview.js +0 -128
- package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.js +0 -70
- package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +0 -2
- package/dist/es/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +0 -9
- package/dist/es/g/ExpandableLexicalPreview/common/index.js +0 -1
- package/dist/es/g/ExpandableLexicalPreview/index.js +0 -2
- package/dist/es/g/ExpandableLexicalPreview/styles.scss +0 -33
- package/dist/es/g/FormBuilder/FormBuilder.js +0 -117
- package/dist/es/g/FormBuilder/common/Builder/Builder.js +0 -178
- package/dist/es/g/FormBuilder/common/Builder/common/ActionsContainer/ActionsContainer.js +0 -70
- package/dist/es/g/FormBuilder/common/Builder/common/ActionsContainer/index.js +0 -2
- package/dist/es/g/FormBuilder/common/Builder/common/ActionsContainer/styles.scss +0 -59
- package/dist/es/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.js +0 -241
- package/dist/es/g/FormBuilder/common/Builder/common/InputBuilder/index.js +0 -2
- package/dist/es/g/FormBuilder/common/Builder/common/InputBuilder/styles.scss +0 -169
- package/dist/es/g/FormBuilder/common/Builder/common/Section/Section.js +0 -135
- package/dist/es/g/FormBuilder/common/Builder/common/Section/index.js +0 -2
- package/dist/es/g/FormBuilder/common/Builder/common/Section/styles.scss +0 -71
- package/dist/es/g/FormBuilder/common/Builder/common/index.js +0 -3
- package/dist/es/g/FormBuilder/common/Builder/index.js +0 -2
- package/dist/es/g/FormBuilder/common/Builder/styles.scss +0 -63
- package/dist/es/g/FormBuilder/common/Renderer/Renderer.js +0 -187
- package/dist/es/g/FormBuilder/common/Renderer/common/Section/Section.js +0 -88
- package/dist/es/g/FormBuilder/common/Renderer/common/Section/index.js +0 -2
- package/dist/es/g/FormBuilder/common/Renderer/common/index.js +0 -1
- package/dist/es/g/FormBuilder/common/Renderer/index.js +0 -2
- package/dist/es/g/FormBuilder/common/Renderer/styles.scss +0 -30
- package/dist/es/g/FormBuilder/common/index.js +0 -2
- package/dist/es/g/FormBuilder/index.js +0 -2
- package/dist/es/g/FormBuilder/styles.scss +0 -25
- package/dist/es/g/index.js +0 -3
- package/dist/es/index.js +0 -8
- package/dist/es/test/QueryLoader/QueryLoader.js +0 -30
- package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -63
- package/dist/es/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +0 -30
- package/dist/es/test/QueryLoader/common/PreloadedTestData/index.js +0 -2
- package/dist/es/test/QueryLoader/common/index.js +0 -1
- package/dist/es/test/QueryLoader/index.js +0 -2
- package/dist/es/test/index.js +0 -1
- package/dist/es/utils/applyCharacterLimit.js +0 -67
- package/dist/es/utils/formatting.js +0 -117
- package/dist/es/utils/hooks/index.js +0 -3
- package/dist/es/utils/hooks/useDynamicPosition.js +0 -83
- package/dist/es/utils/hooks/useOutsideClick.js +0 -19
- package/dist/es/utils/hooks/useWindowSize.js +0 -22
- package/dist/es/utils/index.js +0 -3
- package/jest.config.js +0 -28
- package/src/stories/Introduction.stories.mdx +0 -193
- package/src/stories/StyleGuide/Sprites.stories.mdx +0 -25
- package/src/stories/StyleGuide/ai-icons.stories.mdx +0 -27
- package/src/stories/StyleGuide/colors.stories.mdx +0 -73
- package/src/stories/StyleGuide/cssClasses.stories.mdx +0 -16
- package/src/stories/StyleGuide/helpers.js +0 -64
- package/src/stories/StyleGuide/icons.stories.mdx +0 -29
- package/src/stories/StyleGuide/typography.stories.mdx +0 -55
- package/src/stories/a/AppContext.stories.jsx +0 -44
- package/src/stories/a/AreaChart.stories.jsx +0 -118
- package/src/stories/a/BarChart.stories.jsx +0 -89
- package/src/stories/a/BlurOverlay.stories.jsx +0 -39
- package/src/stories/a/ContentTree.stories.jsx +0 -662
- package/src/stories/a/Conversation.stories.jsx +0 -92
- package/src/stories/a/DatePicker.stories.jsx +0 -96
- package/src/stories/a/DotInfo.stories.jsx +0 -33
- package/src/stories/a/Figure.stories.jsx +0 -26
- package/src/stories/a/HamburgerButton.stories.jsx +0 -27
- package/src/stories/a/IconList.stories.jsx +0 -51
- package/src/stories/a/Label.stories.jsx +0 -49
- package/src/stories/a/LoadingCircle.stories.jsx +0 -28
- package/src/stories/a/MetaCard.stories.jsx +0 -35
- package/src/stories/a/Notification.stories.jsx +0 -86
- package/src/stories/a/NotificationStack.stories.jsx +0 -59
- package/src/stories/a/People.stories.jsx +0 -92
- package/src/stories/a/PieChart.stories.jsx +0 -53
- package/src/stories/a/Popover.stories.jsx +0 -106
- package/src/stories/a/ProgressBar.stories.jsx +0 -84
- package/src/stories/a/Quote.stories.jsx +0 -49
- package/src/stories/a/Removable.stories.jsx +0 -22
- package/src/stories/a/SVG.stories.jsx +0 -97
- package/src/stories/a/SnapScroller.stories.jsx +0 -98
- package/src/stories/a/Spinner.stories.jsx +0 -25
- package/src/stories/a/TextSteps.stories.jsx +0 -19
- package/src/stories/a/Timestamp.stories.jsx +0 -98
- package/src/stories/a/Tip.stories.jsx +0 -29
- package/src/stories/a/ToggleSwitch.stories.jsx +0 -28
- package/src/stories/a/Tooltip.stories.jsx +0 -75
- package/src/stories/a/XMLEditor.stories.jsx +0 -26
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/b/Button/Button.stories.jsx +0 -125
- package/src/stories/b/Button/Group.stories.jsx +0 -35
- package/src/stories/b/Card/Card.stories.jsx +0 -59
- package/src/stories/b/Card/Group.stories.jsx +0 -59
- package/src/stories/b/Logo.stories.jsx +0 -46
- package/src/stories/b/Page.stories.jsx +0 -76
- package/src/stories/b/SocialMediaButton.stories.jsx +0 -58
- package/src/stories/b/ThemeSelector.stories.jsx +0 -49
- package/src/stories/b/Title.stories.jsx +0 -47
- package/src/stories/c/Modal.stories.jsx +0 -49
- package/src/stories/c/Shortener.stories.jsx +0 -34
- package/src/stories/c/SocialMediaShareButton.stories.jsx +0 -33
- package/src/stories/colors.js +0 -74
- package/src/stories/f/Checkbox.stories.jsx +0 -102
- package/src/stories/f/ChoicesInput.stories.jsx +0 -139
- package/src/stories/f/Description.stories.jsx +0 -40
- package/src/stories/f/EditorInput.stories.jsx +0 -81
- package/src/stories/f/FileUpload.stories.jsx +0 -68
- package/src/stories/f/FormInput.stories.jsx +0 -451
- package/src/stories/f/Label.stories.jsx +0 -27
- package/src/stories/f/LinkInput.stories.jsx +0 -93
- package/src/stories/f/QueryChoices.stories.jsx +0 -144
- package/src/stories/f/QueryCombobox.stories.jsx +0 -323
- package/src/stories/f/QuerySelect.stories.jsx +0 -150
- package/src/stories/f/RatingsInput.stories.jsx +0 -77
- package/src/stories/f/SelectInput.stories.jsx +0 -126
- package/src/stories/f/TextInput.stories.jsx +0 -120
- package/src/stories/f/TextareaInput.stories.jsx +0 -107
- package/src/stories/f/__generated__/FormInputAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/f/__generated__/FormInputAllTeamsQuery.graphql.js +0 -139
- package/src/stories/f/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/f/__generated__/QueryComboboxAllTeamsQuery.graphql.js +0 -139
- package/src/stories/f/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/g/DragAndDrop.stories.jsx +0 -114
- package/src/stories/g/ExpandableLexicalPreview.stories.jsx +0 -37
- package/src/stories/g/FormBuilder.stories.jsx +0 -114
- package/src/stories/original/Button.jsx +0 -55
- package/src/stories/original/Button.stories.js +0 -39
- package/src/stories/original/Header.jsx +0 -64
- package/src/stories/original/Header.stories.js +0 -22
- package/src/stories/original/Introduction.mdx +0 -211
- package/src/stories/original/Page.jsx +0 -76
- package/src/stories/original/Page.stories.js +0 -26
- package/src/stories/original/assets/code-brackets.svg +0 -1
- package/src/stories/original/assets/colors.svg +0 -1
- package/src/stories/original/assets/comments.svg +0 -1
- package/src/stories/original/assets/direction.svg +0 -1
- package/src/stories/original/assets/flow.svg +0 -1
- package/src/stories/original/assets/plugin.svg +0 -1
- package/src/stories/original/assets/repo.svg +0 -1
- package/src/stories/original/assets/stackalt.svg +0 -1
- package/src/stories/original/button.css +0 -30
- package/src/stories/original/header.css +0 -32
- package/src/stories/original/page.css +0 -69
- package/src/stories/r/PrivateRoute.stories.jsx +0 -16
- package/src/stories/r/SwitchRouteMap.stories.jsx +0 -14
- package/src/stories/test/QueryLoader.stories.jsx +0 -36
- package/src/stories/utils/Router.jsx +0 -20
- package/src/stories/utils/generateNodeId.js +0 -12
- package/src/stories/utils/lorem.js +0 -15
- package/src/stories/utils/relay/EnvironmentProvider.jsx +0 -14
- package/src/stories/utils/relay/environment.js +0 -5
- package/src/stories/utils/relay/index.js +0 -4
- package/src/stories/utils/relay/mockRelayOperation.js +0 -14
- package/src/stories/utils/relay/mockResolvers.js +0 -299
- package/src/stories/utils/testData.js +0 -63
- package/src/ui/a/AnimatedBlobs/AnimatedBlobs.jsx +0 -96
- package/src/ui/a/AnimatedBlobs/index.js +0 -1
- package/src/ui/a/AnimatedBlobs/styles.scss +0 -87
- package/src/ui/a/AnimatedGradient/AnimatedGradient.jsx +0 -70
- package/src/ui/a/AnimatedGradient/index.js +0 -1
- package/src/ui/a/AnimatedGradient/styles.scss +0 -15
- package/src/ui/a/AnimatedGradient/webGIRenderer.js +0 -541
- package/src/ui/a/AppContext/Context.js +0 -3
- package/src/ui/a/AppContext/ContextProvider.jsx +0 -90
- package/src/ui/a/AppContext/index.js +0 -5
- package/src/ui/a/AppContext/useApp.js +0 -4
- package/src/ui/a/AppContext/useTheme.js +0 -43
- package/src/ui/a/BlurOverlay/BlurOverlay.jsx +0 -69
- package/src/ui/a/BlurOverlay/index.js +0 -2
- package/src/ui/a/BlurOverlay/styles.scss +0 -33
- package/src/ui/a/Charts/AreaChart/AreaChart.jsx +0 -306
- package/src/ui/a/Charts/AreaChart/index.js +0 -1
- package/src/ui/a/Charts/AreaChart/styles.scss +0 -70
- package/src/ui/a/Charts/BarChart/BarChart.jsx +0 -168
- package/src/ui/a/Charts/BarChart/index.js +0 -1
- package/src/ui/a/Charts/BarChart/styles.scss +0 -48
- package/src/ui/a/Charts/Common/CustomLegend/CustomLegend.jsx +0 -132
- package/src/ui/a/Charts/Common/CustomLegend/index.js +0 -1
- package/src/ui/a/Charts/Common/CustomLegend/styles.scss +0 -75
- package/src/ui/a/Charts/Common/CustomTooltipContent/CustomTooltipContent.jsx +0 -201
- package/src/ui/a/Charts/Common/CustomTooltipContent/index.js +0 -1
- package/src/ui/a/Charts/Common/CustomTooltipContent/styles.scss +0 -26
- package/src/ui/a/Charts/Common/YLabelsDropDown/YlabelsDropDown.jsx +0 -121
- package/src/ui/a/Charts/Common/YLabelsDropDown/index.js +0 -1
- package/src/ui/a/Charts/Common/YLabelsDropDown/styles.scss +0 -89
- package/src/ui/a/Charts/Common/index.js +0 -3
- package/src/ui/a/Charts/PieChart/PieChart.jsx +0 -163
- package/src/ui/a/Charts/PieChart/index.js +0 -1
- package/src/ui/a/Charts/PieChart/styles.scss +0 -136
- package/src/ui/a/Charts/index.js +0 -3
- package/src/ui/a/ContentTree/ContentTree.jsx +0 -88
- package/src/ui/a/ContentTree/common/Tree/Tree.jsx +0 -150
- package/src/ui/a/ContentTree/common/Tree/index.js +0 -2
- package/src/ui/a/ContentTree/common/index.js +0 -3
- package/src/ui/a/ContentTree/common/useContentTree.js +0 -83
- package/src/ui/a/ContentTree/common/useFirstVisibleNode.js +0 -59
- package/src/ui/a/ContentTree/index.js +0 -2
- package/src/ui/a/ContentTree/styles.scss +0 -56
- package/src/ui/a/Conversation/Context.js +0 -3
- package/src/ui/a/Conversation/Conversation.jsx +0 -105
- package/src/ui/a/Conversation/common/Message/Message.jsx +0 -129
- package/src/ui/a/Conversation/common/Message/index.js +0 -2
- package/src/ui/a/Conversation/common/index.js +0 -1
- package/src/ui/a/Conversation/index.js +0 -4
- package/src/ui/a/Conversation/styles.scss +0 -86
- package/src/ui/a/Conversation/useConversation.js +0 -4
- package/src/ui/a/DatePicker/DatePicker.jsx +0 -201
- package/src/ui/a/DatePicker/index.js +0 -2
- package/src/ui/a/DatePicker/styles.scss +0 -380
- package/src/ui/a/DotInfo/DotInfo.jsx +0 -101
- package/src/ui/a/DotInfo/index.js +0 -2
- package/src/ui/a/DotInfo/styles.scss +0 -20
- package/src/ui/a/Figure/Figure.jsx +0 -82
- package/src/ui/a/Figure/index.js +0 -2
- package/src/ui/a/Figure/styles.scss +0 -19
- package/src/ui/a/HamburgerButton/HamburgerButton.jsx +0 -97
- package/src/ui/a/HamburgerButton/index.js +0 -2
- package/src/ui/a/HamburgerButton/styles.scss +0 -183
- package/src/ui/a/IconList/IconList.jsx +0 -89
- package/src/ui/a/IconList/common/Item/Item.jsx +0 -81
- package/src/ui/a/IconList/common/Item/index.js +0 -2
- package/src/ui/a/IconList/common/index.js +0 -1
- package/src/ui/a/IconList/index.js +0 -2
- package/src/ui/a/IconList/styles.scss +0 -37
- package/src/ui/a/Label/Label.jsx +0 -96
- package/src/ui/a/Label/index.js +0 -2
- package/src/ui/a/Label/styles.scss +0 -35
- package/src/ui/a/LoadingCircle/LoadingCircle.jsx +0 -118
- package/src/ui/a/LoadingCircle/index.js +0 -2
- package/src/ui/a/LoadingCircle/styles.scss +0 -47
- package/src/ui/a/MetaCard/MetaCard.jsx +0 -75
- package/src/ui/a/MetaCard/index.js +0 -1
- package/src/ui/a/MetaCard/styles.scss +0 -45
- package/src/ui/a/Notification/Notification.jsx +0 -142
- package/src/ui/a/Notification/index.js +0 -1
- package/src/ui/a/Notification/styles.scss +0 -67
- package/src/ui/a/NotificationStack/NotificationStack.jsx +0 -89
- package/src/ui/a/NotificationStack/index.js +0 -1
- package/src/ui/a/NotificationStack/styles.scss +0 -23
- package/src/ui/a/People/People.jsx +0 -92
- package/src/ui/a/People/common/Person/Person.jsx +0 -99
- package/src/ui/a/People/common/Person/index.js +0 -2
- package/src/ui/a/People/common/index.js +0 -1
- package/src/ui/a/People/index.js +0 -2
- package/src/ui/a/People/styles.scss +0 -60
- package/src/ui/a/Popover/Popover.jsx +0 -155
- package/src/ui/a/Popover/index.js +0 -2
- package/src/ui/a/Popover/styles.scss +0 -34
- package/src/ui/a/ProgressBar/ProgressBar.jsx +0 -95
- package/src/ui/a/ProgressBar/index.js +0 -2
- package/src/ui/a/ProgressBar/styles.scss +0 -47
- package/src/ui/a/Quote/Quote.jsx +0 -97
- package/src/ui/a/Quote/index.js +0 -2
- package/src/ui/a/Quote/styles.scss +0 -35
- package/src/ui/a/Removable/Removable.jsx +0 -78
- package/src/ui/a/Removable/index.js +0 -2
- package/src/ui/a/Removable/styles.scss +0 -33
- package/src/ui/a/SVG/SVG.jsx +0 -183
- package/src/ui/a/SVG/common/UseSVG/UseSVG.jsx +0 -74
- package/src/ui/a/SVG/common/UseSVG/index.js +0 -2
- package/src/ui/a/SVG/common/index.js +0 -1
- package/src/ui/a/SVG/index.js +0 -2
- package/src/ui/a/SVG/styles.scss +0 -57
- package/src/ui/a/SnapScroller/SnapScroller.jsx +0 -105
- package/src/ui/a/SnapScroller/index.js +0 -2
- package/src/ui/a/SnapScroller/styles.scss +0 -77
- package/src/ui/a/Spinner/Spinner.jsx +0 -69
- package/src/ui/a/Spinner/index.js +0 -2
- package/src/ui/a/Spinner/styles.scss +0 -23
- package/src/ui/a/TextSteps/TextSteps.jsx +0 -80
- package/src/ui/a/TextSteps/index.js +0 -1
- package/src/ui/a/TextSteps/styles.scss +0 -29
- package/src/ui/a/ThroughPutIndicator/ThroughPutIndicator.jsx +0 -90
- package/src/ui/a/ThroughPutIndicator/index.js +0 -2
- package/src/ui/a/ThroughPutIndicator/styles.scss +0 -35
- package/src/ui/a/Timestamp/Timestamp.jsx +0 -166
- package/src/ui/a/Timestamp/index.js +0 -2
- package/src/ui/a/Timestamp/styles.scss +0 -7
- package/src/ui/a/Tip/Tip.jsx +0 -99
- package/src/ui/a/Tip/index.js +0 -2
- package/src/ui/a/Tip/styles.scss +0 -16
- package/src/ui/a/ToggleSwitch/ToggleSwitch.jsx +0 -99
- package/src/ui/a/ToggleSwitch/index.js +0 -2
- package/src/ui/a/ToggleSwitch/styles.scss +0 -58
- package/src/ui/a/Tooltip/Tooltip.jsx +0 -135
- package/src/ui/a/Tooltip/index.js +0 -2
- package/src/ui/a/Tooltip/styles.scss +0 -89
- package/src/ui/a/XMLEditor/XMLEditor.jsx +0 -202
- package/src/ui/a/XMLEditor/common/index.js +0 -1
- package/src/ui/a/XMLEditor/common/theme.jsx +0 -184
- package/src/ui/a/XMLEditor/index.js +0 -1
- package/src/ui/a/XMLEditor/styles.scss +0 -24
- package/src/ui/a/index.js +0 -34
- package/src/ui/b/Button/Button.jsx +0 -139
- package/src/ui/b/Button/common/Group/Group.jsx +0 -65
- package/src/ui/b/Button/common/Group/index.js +0 -1
- package/src/ui/b/Button/common/Group/styles.scss +0 -11
- package/src/ui/b/Button/common/index.js +0 -1
- package/src/ui/b/Button/index.js +0 -2
- package/src/ui/b/Button/styles.scss +0 -173
- package/src/ui/b/Card/Card.jsx +0 -88
- package/src/ui/b/Card/common/Group/Group.jsx +0 -88
- package/src/ui/b/Card/common/Group/index.js +0 -1
- package/src/ui/b/Card/common/Group/styles.scss +0 -35
- package/src/ui/b/Card/common/Section/Section.jsx +0 -70
- package/src/ui/b/Card/common/Section/index.js +0 -1
- package/src/ui/b/Card/common/index.js +0 -2
- package/src/ui/b/Card/index.js +0 -1
- package/src/ui/b/Card/styles.scss +0 -57
- package/src/ui/b/Logo/Logo.jsx +0 -150
- package/src/ui/b/Logo/index.js +0 -2
- package/src/ui/b/Logo/styles.scss +0 -11
- package/src/ui/b/Page/Context.js +0 -3
- package/src/ui/b/Page/Page.jsx +0 -127
- package/src/ui/b/Page/common/PageHelmet/PageHelmet.jsx +0 -289
- package/src/ui/b/Page/common/PageHelmet/index.js +0 -2
- package/src/ui/b/Page/common/Section/Section.jsx +0 -83
- package/src/ui/b/Page/common/Section/index.js +0 -2
- package/src/ui/b/Page/common/index.js +0 -2
- package/src/ui/b/Page/index.js +0 -4
- package/src/ui/b/Page/styles.scss +0 -38
- package/src/ui/b/Page/usePage.js +0 -4
- package/src/ui/b/SocialMediaButton/SocialMediaButton.jsx +0 -136
- package/src/ui/b/SocialMediaButton/index.js +0 -2
- package/src/ui/b/SocialMediaButton/styles.scss +0 -35
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +0 -85
- package/src/ui/b/ThemeSelector/index.js +0 -2
- package/src/ui/b/ThemeSelector/styles.scss +0 -52
- package/src/ui/b/Title/Title.jsx +0 -149
- package/src/ui/b/Title/index.js +0 -2
- package/src/ui/b/index.js +0 -7
- package/src/ui/c/Modal/Modal.jsx +0 -95
- package/src/ui/c/Modal/common/ModalHeader/ModalHeader.jsx +0 -89
- package/src/ui/c/Modal/common/ModalHeader/index.js +0 -1
- package/src/ui/c/Modal/common/index.js +0 -1
- package/src/ui/c/Modal/index.js +0 -2
- package/src/ui/c/Modal/styles.scss +0 -44
- package/src/ui/c/Shortener/Shortener.jsx +0 -140
- package/src/ui/c/Shortener/index.js +0 -2
- package/src/ui/c/Shortener/styles.scss +0 -7
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +0 -117
- package/src/ui/c/SocialMediaShareButton/index.js +0 -2
- package/src/ui/c/SocialMediaShareButton/styles.scss +0 -39
- package/src/ui/c/index.js +0 -3
- package/src/ui/d/index.js +0 -1
- package/src/ui/f/FormInput/FormInput.jsx +0 -249
- package/src/ui/f/FormInput/index.js +0 -2
- package/src/ui/f/FormInput/styles.scss +0 -11
- package/src/ui/f/common/Debugger/Debugger.jsx +0 -83
- package/src/ui/f/common/Debugger/index.js +0 -2
- package/src/ui/f/common/Debugger/styles.scss +0 -12
- package/src/ui/f/common/Description/Description.jsx +0 -90
- package/src/ui/f/common/Description/index.js +0 -2
- package/src/ui/f/common/Description/styles.scss +0 -9
- package/src/ui/f/common/Label/Label.jsx +0 -94
- package/src/ui/f/common/Label/index.js +0 -2
- package/src/ui/f/common/Label/styles.scss +0 -9
- package/src/ui/f/common/index.js +0 -4
- package/src/ui/f/common/utils/index.js +0 -2
- package/src/ui/f/common/utils/lookUpInputValueFromFetchedOptions.js +0 -23
- package/src/ui/f/common/utils/validators.js +0 -10
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +0 -141
- package/src/ui/f/fields/Checkbox/index.js +0 -2
- package/src/ui/f/fields/Checkbox/styles.scss +0 -16
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +0 -178
- package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +0 -127
- package/src/ui/f/fields/ChoicesInput/common/Choice/index.js +0 -2
- package/src/ui/f/fields/ChoicesInput/common/index.js +0 -1
- package/src/ui/f/fields/ChoicesInput/index.js +0 -2
- package/src/ui/f/fields/ChoicesInput/styles.scss +0 -79
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +0 -295
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/BlockFormatDropDown.jsx +0 -292
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/index.js +0 -2
- package/src/ui/f/fields/EditorInput/common/BlockFormatDropDown/styles.scss +0 -55
- package/src/ui/f/fields/EditorInput/common/ColorPicker/ColorPicker.jsx +0 -115
- package/src/ui/f/fields/EditorInput/common/ColorPicker/index.js +0 -2
- package/src/ui/f/fields/EditorInput/common/ColorPicker/styles.scss +0 -36
- package/src/ui/f/fields/EditorInput/common/ExposePlainTextPlugin.jsx +0 -50
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/FontSizeDropDown.jsx +0 -134
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/index.js +0 -2
- package/src/ui/f/fields/EditorInput/common/FontSizeDropDown/styles.scss +0 -55
- package/src/ui/f/fields/EditorInput/common/StopPropagationPlugin.jsx +0 -25
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/ToolbarPlugin.jsx +0 -417
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/index.js +0 -2
- package/src/ui/f/fields/EditorInput/common/ToolbarPlugin/styles.scss +0 -56
- package/src/ui/f/fields/EditorInput/common/TreeViewPlugin.jsx +0 -16
- package/src/ui/f/fields/EditorInput/common/index.js +0 -7
- package/src/ui/f/fields/EditorInput/index.js +0 -2
- package/src/ui/f/fields/EditorInput/styles.scss +0 -240
- package/src/ui/f/fields/FileUpload/FileUpload.jsx +0 -300
- package/src/ui/f/fields/FileUpload/common/Preview/Preview.jsx +0 -198
- package/src/ui/f/fields/FileUpload/common/Preview/index.js +0 -2
- package/src/ui/f/fields/FileUpload/common/Preview/styles.scss +0 -96
- package/src/ui/f/fields/FileUpload/common/index.js +0 -2
- package/src/ui/f/fields/FileUpload/index.js +0 -3
- package/src/ui/f/fields/FileUpload/styles.scss +0 -73
- package/src/ui/f/fields/FileUpload/utils.js +0 -52
- package/src/ui/f/fields/LatexPreviewInput/LatexPreviewInput.jsx +0 -92
- package/src/ui/f/fields/LatexPreviewInput/convertLatexToHtml.jsx +0 -38
- package/src/ui/f/fields/LatexPreviewInput/index.js +0 -3
- package/src/ui/f/fields/LatexPreviewInput/styles.scss +0 -25
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +0 -185
- package/src/ui/f/fields/LinkInput/index.js +0 -2
- package/src/ui/f/fields/LinkInput/styles.scss +0 -90
- package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +0 -153
- package/src/ui/f/fields/QueryChoices/index.js +0 -2
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +0 -264
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +0 -278
- package/src/ui/f/fields/QueryCombobox/common/Combobox/index.js +0 -2
- package/src/ui/f/fields/QueryCombobox/common/Menu/Menu.jsx +0 -103
- package/src/ui/f/fields/QueryCombobox/common/Menu/index.js +0 -2
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +0 -402
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/index.js +0 -2
- package/src/ui/f/fields/QueryCombobox/common/index.js +0 -3
- package/src/ui/f/fields/QueryCombobox/index.js +0 -2
- package/src/ui/f/fields/QueryCombobox/styles.scss +0 -134
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -220
- package/src/ui/f/fields/QuerySelect/index.js +0 -2
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +0 -149
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +0 -142
- package/src/ui/f/fields/RatingsInput/common/Rating/index.js +0 -2
- package/src/ui/f/fields/RatingsInput/common/index.js +0 -1
- package/src/ui/f/fields/RatingsInput/index.js +0 -2
- package/src/ui/f/fields/RatingsInput/styles.scss +0 -48
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +0 -183
- package/src/ui/f/fields/SelectInput/common/Menu/Menu.jsx +0 -104
- package/src/ui/f/fields/SelectInput/common/Menu/index.js +0 -2
- package/src/ui/f/fields/SelectInput/common/Multiple/Multiple.jsx +0 -288
- package/src/ui/f/fields/SelectInput/common/Multiple/index.js +0 -2
- package/src/ui/f/fields/SelectInput/common/Single/Single.jsx +0 -140
- package/src/ui/f/fields/SelectInput/common/Single/index.js +0 -2
- package/src/ui/f/fields/SelectInput/common/index.js +0 -3
- package/src/ui/f/fields/SelectInput/index.js +0 -2
- package/src/ui/f/fields/SelectInput/styles.scss +0 -191
- package/src/ui/f/fields/TextInput/TextInput.jsx +0 -191
- package/src/ui/f/fields/TextInput/index.js +0 -2
- package/src/ui/f/fields/TextInput/styles.scss +0 -81
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +0 -180
- package/src/ui/f/fields/TextareaInput/index.js +0 -2
- package/src/ui/f/fields/TextareaInput/styles.scss +0 -53
- package/src/ui/f/fields/ToggleInput/ToggleInput.jsx +0 -140
- package/src/ui/f/fields/ToggleInput/index.js +0 -2
- package/src/ui/f/fields/ToggleInput/styles.scss +0 -22
- package/src/ui/f/fields/index.js +0 -22
- package/src/ui/f/index.js +0 -3
- package/src/ui/form-reset.scss +0 -86
- package/src/ui/form.scss +0 -34
- package/src/ui/g/DragAndDrop/DragAndDrop.jsx +0 -125
- package/src/ui/g/DragAndDrop/common/DraggableItem/DraggableItem.jsx +0 -93
- package/src/ui/g/DragAndDrop/common/DraggableItem/index.js +0 -2
- package/src/ui/g/DragAndDrop/common/DraggableItem/styles.scss +0 -12
- package/src/ui/g/DragAndDrop/common/index.js +0 -1
- package/src/ui/g/DragAndDrop/index.js +0 -2
- package/src/ui/g/DragAndDrop/styles.scss +0 -8
- package/src/ui/g/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +0 -180
- package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/NewWindowPortal.jsx +0 -80
- package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/index.js +0 -2
- package/src/ui/g/ExpandableLexicalPreview/common/NewWindowPortal/styles.scss +0 -9
- package/src/ui/g/ExpandableLexicalPreview/common/index.js +0 -1
- package/src/ui/g/ExpandableLexicalPreview/index.js +0 -2
- package/src/ui/g/ExpandableLexicalPreview/styles.scss +0 -33
- package/src/ui/g/FormBuilder/FormBuilder.jsx +0 -157
- package/src/ui/g/FormBuilder/common/Builder/Builder.jsx +0 -213
- package/src/ui/g/FormBuilder/common/Builder/common/ActionsContainer/ActionsContainer.jsx +0 -97
- package/src/ui/g/FormBuilder/common/Builder/common/ActionsContainer/index.js +0 -2
- package/src/ui/g/FormBuilder/common/Builder/common/ActionsContainer/styles.scss +0 -59
- package/src/ui/g/FormBuilder/common/Builder/common/InputBuilder/InputBuilder.jsx +0 -321
- package/src/ui/g/FormBuilder/common/Builder/common/InputBuilder/index.js +0 -2
- package/src/ui/g/FormBuilder/common/Builder/common/InputBuilder/styles.scss +0 -169
- package/src/ui/g/FormBuilder/common/Builder/common/Section/Section.jsx +0 -186
- package/src/ui/g/FormBuilder/common/Builder/common/Section/index.js +0 -2
- package/src/ui/g/FormBuilder/common/Builder/common/Section/styles.scss +0 -71
- package/src/ui/g/FormBuilder/common/Builder/common/index.js +0 -3
- package/src/ui/g/FormBuilder/common/Builder/index.js +0 -2
- package/src/ui/g/FormBuilder/common/Builder/styles.scss +0 -63
- package/src/ui/g/FormBuilder/common/Renderer/Renderer.jsx +0 -240
- package/src/ui/g/FormBuilder/common/Renderer/common/Section/Section.jsx +0 -114
- package/src/ui/g/FormBuilder/common/Renderer/common/Section/index.js +0 -2
- package/src/ui/g/FormBuilder/common/Renderer/common/index.js +0 -1
- package/src/ui/g/FormBuilder/common/Renderer/index.js +0 -2
- package/src/ui/g/FormBuilder/common/Renderer/styles.scss +0 -30
- package/src/ui/g/FormBuilder/common/index.js +0 -2
- package/src/ui/g/FormBuilder/index.js +0 -2
- package/src/ui/g/FormBuilder/styles.scss +0 -25
- package/src/ui/g/index.js +0 -3
- package/src/ui/index.js +0 -8
- package/src/ui/test/QueryLoader/QueryLoader.jsx +0 -41
- package/src/ui/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -68
- package/src/ui/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.jsx +0 -51
- package/src/ui/test/QueryLoader/common/PreloadedTestData/index.js +0 -2
- package/src/ui/test/QueryLoader/common/index.js +0 -1
- package/src/ui/test/QueryLoader/index.js +0 -2
- package/src/ui/test/index.js +0 -1
- package/src/ui/utils/applyCharacterLimit.js +0 -80
- package/src/ui/utils/formatting.js +0 -142
- package/src/ui/utils/hooks/index.js +0 -3
- package/src/ui/utils/hooks/useDynamicPosition.js +0 -104
- package/src/ui/utils/hooks/useOutsideClick.js +0 -23
- package/src/ui/utils/hooks/useWindowSize.js +0 -32
- package/src/ui/utils/index.js +0 -5
- package/stylelint.config.js +0 -3
- package/tests/Storyshots.test.js +0 -3
- package/tests/__snapshots__/Storyshots.test.js.snap +0 -36169
- package/tests/emptyMock.js +0 -3
- package/tests/global-setup.js +0 -3
- package/tests/mockResizeObserver.js +0 -9
- package/tests/mockTextEncoder.js +0 -7
- package/tests/staticStub.js +0 -1
- package/tests/test-setup.js +0 -25
|
@@ -0,0 +1,2447 @@
|
|
|
1
|
+
import { jsx as Dt } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Rt, useEffect as Nt } from "react";
|
|
3
|
+
import { P as $ } from "../../../index-CxkFVI6N.js";
|
|
4
|
+
import { S as Et, F as Ue, E as v, I as Fe, g as je, c as ke, i as F, a as O, T as Ye, A as Ze, b as ne, d as Wt, s as M, N as E, f as L, e as Je, C as It, h as Lt, D as Mt, m as R, j as ce, k as zt, P as Vt, l as Gt, n as Qt, o as Xt, p as X, q as _t, r as Ut, t as S, L as Ft, u as jt, v as Yt, w as Zt, x as Jt, y as Te, z as Ht, B as ve, G as Kt, H as es, J as ts, K as ss, M as ns, O as rs, Q as os, R as is, U as ls, V as as, W as hs, X as cs } from "../../../index-BUor0nOw.js";
|
|
5
|
+
import { s as us } from "../../../exports.module-DmUnHWIJ.js";
|
|
6
|
+
import '../../../assets/XMLEditor.css';const fs = (t) => {
|
|
7
|
+
let { state: e } = t, s = e.doc.lineAt(e.selection.main.from), n = ye(t.state, s.from);
|
|
8
|
+
return n.line ? ds(t) : n.block ? ms(t) : !1;
|
|
9
|
+
};
|
|
10
|
+
function Se(t, e) {
|
|
11
|
+
return ({ state: s, dispatch: n }) => {
|
|
12
|
+
if (s.readOnly)
|
|
13
|
+
return !1;
|
|
14
|
+
let r = t(e, s);
|
|
15
|
+
return r ? (n(s.update(r)), !0) : !1;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const ds = /* @__PURE__ */ Se(
|
|
19
|
+
xs,
|
|
20
|
+
0
|
|
21
|
+
/* CommentOption.Toggle */
|
|
22
|
+
), ps = /* @__PURE__ */ Se(
|
|
23
|
+
He,
|
|
24
|
+
0
|
|
25
|
+
/* CommentOption.Toggle */
|
|
26
|
+
), ms = /* @__PURE__ */ Se(
|
|
27
|
+
(t, e) => He(t, e, gs(e)),
|
|
28
|
+
0
|
|
29
|
+
/* CommentOption.Toggle */
|
|
30
|
+
);
|
|
31
|
+
function ye(t, e) {
|
|
32
|
+
let s = t.languageDataAt("commentTokens", e, 1);
|
|
33
|
+
return s.length ? s[0] : {};
|
|
34
|
+
}
|
|
35
|
+
const I = 50;
|
|
36
|
+
function Os(t, { open: e, close: s }, n, r) {
|
|
37
|
+
let o = t.sliceDoc(n - I, n), i = t.sliceDoc(r, r + I), l = /\s*$/.exec(o)[0].length, a = /^\s*/.exec(i)[0].length, h = o.length - l;
|
|
38
|
+
if (o.slice(h - e.length, h) == e && i.slice(a, a + s.length) == s)
|
|
39
|
+
return {
|
|
40
|
+
open: { pos: n - l, margin: l && 1 },
|
|
41
|
+
close: { pos: r + a, margin: a && 1 }
|
|
42
|
+
};
|
|
43
|
+
let c, u;
|
|
44
|
+
r - n <= 2 * I ? c = u = t.sliceDoc(n, r) : (c = t.sliceDoc(n, n + I), u = t.sliceDoc(r - I, r));
|
|
45
|
+
let f = /^\s*/.exec(c)[0].length, d = /\s*$/.exec(u)[0].length, p = u.length - d - s.length;
|
|
46
|
+
return c.slice(f, f + e.length) == e && u.slice(p, p + s.length) == s ? {
|
|
47
|
+
open: {
|
|
48
|
+
pos: n + f + e.length,
|
|
49
|
+
margin: /\s/.test(c.charAt(f + e.length)) ? 1 : 0
|
|
50
|
+
},
|
|
51
|
+
close: {
|
|
52
|
+
pos: r - d - s.length,
|
|
53
|
+
margin: /\s/.test(u.charAt(p - 1)) ? 1 : 0
|
|
54
|
+
}
|
|
55
|
+
} : null;
|
|
56
|
+
}
|
|
57
|
+
function gs(t) {
|
|
58
|
+
let e = [];
|
|
59
|
+
for (let s of t.selection.ranges) {
|
|
60
|
+
let n = t.doc.lineAt(s.from), r = s.to <= n.to ? n : t.doc.lineAt(s.to);
|
|
61
|
+
r.from > n.from && r.from == s.to && (r = s.to == n.to + 1 ? n : t.doc.lineAt(s.to - 1));
|
|
62
|
+
let o = e.length - 1;
|
|
63
|
+
o >= 0 && e[o].to > n.from ? e[o].to = r.to : e.push({ from: n.from + /^\s*/.exec(n.text)[0].length, to: r.to });
|
|
64
|
+
}
|
|
65
|
+
return e;
|
|
66
|
+
}
|
|
67
|
+
function He(t, e, s = e.selection.ranges) {
|
|
68
|
+
let n = s.map((o) => ye(e, o.from).block);
|
|
69
|
+
if (!n.every((o) => o))
|
|
70
|
+
return null;
|
|
71
|
+
let r = s.map((o, i) => Os(e, n[i], o.from, o.to));
|
|
72
|
+
if (t != 2 && !r.every((o) => o))
|
|
73
|
+
return { changes: e.changes(s.map((o, i) => r[i] ? [] : [{ from: o.from, insert: n[i].open + " " }, { from: o.to, insert: " " + n[i].close }])) };
|
|
74
|
+
if (t != 1 && r.some((o) => o)) {
|
|
75
|
+
let o = [];
|
|
76
|
+
for (let i = 0, l; i < r.length; i++)
|
|
77
|
+
if (l = r[i]) {
|
|
78
|
+
let a = n[i], { open: h, close: c } = l;
|
|
79
|
+
o.push({ from: h.pos - a.open.length, to: h.pos + h.margin }, { from: c.pos - c.margin, to: c.pos + a.close.length });
|
|
80
|
+
}
|
|
81
|
+
return { changes: o };
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function xs(t, e, s = e.selection.ranges) {
|
|
86
|
+
let n = [], r = -1;
|
|
87
|
+
for (let { from: o, to: i } of s) {
|
|
88
|
+
let l = n.length, a = 1e9, h = ye(e, o).line;
|
|
89
|
+
if (h) {
|
|
90
|
+
for (let c = o; c <= i; ) {
|
|
91
|
+
let u = e.doc.lineAt(c);
|
|
92
|
+
if (u.from > r && (o == i || i > u.from)) {
|
|
93
|
+
r = u.from;
|
|
94
|
+
let f = /^\s*/.exec(u.text)[0].length, d = f == u.length, p = u.text.slice(f, f + h.length) == h ? f : -1;
|
|
95
|
+
f < u.text.length && f < a && (a = f), n.push({ line: u, comment: p, token: h, indent: f, empty: d, single: !1 });
|
|
96
|
+
}
|
|
97
|
+
c = u.to + 1;
|
|
98
|
+
}
|
|
99
|
+
if (a < 1e9)
|
|
100
|
+
for (let c = l; c < n.length; c++)
|
|
101
|
+
n[c].indent < n[c].line.text.length && (n[c].indent = a);
|
|
102
|
+
n.length == l + 1 && (n[l].single = !0);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (t != 2 && n.some((o) => o.comment < 0 && (!o.empty || o.single))) {
|
|
106
|
+
let o = [];
|
|
107
|
+
for (let { line: l, token: a, indent: h, empty: c, single: u } of n)
|
|
108
|
+
(u || !c) && o.push({ from: l.from + h, insert: a + " " });
|
|
109
|
+
let i = e.changes(o);
|
|
110
|
+
return { changes: i, selection: e.selection.map(i, 1) };
|
|
111
|
+
} else if (t != 1 && n.some((o) => o.comment >= 0)) {
|
|
112
|
+
let o = [];
|
|
113
|
+
for (let { line: i, comment: l, token: a } of n)
|
|
114
|
+
if (l >= 0) {
|
|
115
|
+
let h = i.from + l, c = h + a.length;
|
|
116
|
+
i.text[c - i.from] == " " && c++, o.push({ from: h, to: c });
|
|
117
|
+
}
|
|
118
|
+
return { changes: o };
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
const ue = /* @__PURE__ */ Ze.define(), ks = /* @__PURE__ */ Ze.define(), Ss = /* @__PURE__ */ Ue.define(), Ke = /* @__PURE__ */ Ue.define({
|
|
123
|
+
combine(t) {
|
|
124
|
+
return Wt(t, {
|
|
125
|
+
minDepth: 100,
|
|
126
|
+
newGroupDelay: 500,
|
|
127
|
+
joinToEvent: (e, s) => s
|
|
128
|
+
}, {
|
|
129
|
+
minDepth: Math.max,
|
|
130
|
+
newGroupDelay: Math.min,
|
|
131
|
+
joinToEvent: (e, s) => (n, r) => e(n, r) || s(n, r)
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}), et = /* @__PURE__ */ Et.define({
|
|
135
|
+
create() {
|
|
136
|
+
return A.empty;
|
|
137
|
+
},
|
|
138
|
+
update(t, e) {
|
|
139
|
+
let s = e.state.facet(Ke), n = e.annotation(ue);
|
|
140
|
+
if (n) {
|
|
141
|
+
let a = y.fromTransaction(e, n.selection), h = n.side, c = h == 0 ? t.undone : t.done;
|
|
142
|
+
return a ? c = j(c, c.length, s.minDepth, a) : c = nt(c, e.startState.selection), new A(h == 0 ? n.rest : c, h == 0 ? c : n.rest);
|
|
143
|
+
}
|
|
144
|
+
let r = e.annotation(ks);
|
|
145
|
+
if ((r == "full" || r == "before") && (t = t.isolate()), e.annotation(ne.addToHistory) === !1)
|
|
146
|
+
return e.changes.empty ? t : t.addMapping(e.changes.desc);
|
|
147
|
+
let o = y.fromTransaction(e), i = e.annotation(ne.time), l = e.annotation(ne.userEvent);
|
|
148
|
+
return o ? t = t.addChanges(o, i, l, s, e) : e.selection && (t = t.addSelection(e.startState.selection, i, l, s.newGroupDelay)), (r == "full" || r == "after") && (t = t.isolate()), t;
|
|
149
|
+
},
|
|
150
|
+
toJSON(t) {
|
|
151
|
+
return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
|
|
152
|
+
},
|
|
153
|
+
fromJSON(t) {
|
|
154
|
+
return new A(t.done.map(y.fromJSON), t.undone.map(y.fromJSON));
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
function ys(t = {}) {
|
|
158
|
+
return [
|
|
159
|
+
et,
|
|
160
|
+
Ke.of(t),
|
|
161
|
+
v.domEventHandlers({
|
|
162
|
+
beforeinput(e, s) {
|
|
163
|
+
let n = e.inputType == "historyUndo" ? tt : e.inputType == "historyRedo" ? fe : null;
|
|
164
|
+
return n ? (e.preventDefault(), n(s)) : !1;
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
function H(t, e) {
|
|
170
|
+
return function({ state: s, dispatch: n }) {
|
|
171
|
+
if (!e && s.readOnly)
|
|
172
|
+
return !1;
|
|
173
|
+
let r = s.field(et, !1);
|
|
174
|
+
if (!r)
|
|
175
|
+
return !1;
|
|
176
|
+
let o = r.pop(t, s, e);
|
|
177
|
+
return o ? (n(o), !0) : !1;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
const tt = /* @__PURE__ */ H(0, !1), fe = /* @__PURE__ */ H(1, !1), bs = /* @__PURE__ */ H(0, !0), Cs = /* @__PURE__ */ H(1, !0);
|
|
181
|
+
class y {
|
|
182
|
+
constructor(e, s, n, r, o) {
|
|
183
|
+
this.changes = e, this.effects = s, this.mapped = n, this.startSelection = r, this.selectionsAfter = o;
|
|
184
|
+
}
|
|
185
|
+
setSelAfter(e) {
|
|
186
|
+
return new y(this.changes, this.effects, this.mapped, this.startSelection, e);
|
|
187
|
+
}
|
|
188
|
+
toJSON() {
|
|
189
|
+
var e, s, n;
|
|
190
|
+
return {
|
|
191
|
+
changes: (e = this.changes) === null || e === void 0 ? void 0 : e.toJSON(),
|
|
192
|
+
mapped: (s = this.mapped) === null || s === void 0 ? void 0 : s.toJSON(),
|
|
193
|
+
startSelection: (n = this.startSelection) === null || n === void 0 ? void 0 : n.toJSON(),
|
|
194
|
+
selectionsAfter: this.selectionsAfter.map((r) => r.toJSON())
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
static fromJSON(e) {
|
|
198
|
+
return new y(e.changes && It.fromJSON(e.changes), [], e.mapped && Lt.fromJSON(e.mapped), e.startSelection && O.fromJSON(e.startSelection), e.selectionsAfter.map(O.fromJSON));
|
|
199
|
+
}
|
|
200
|
+
// This does not check `addToHistory` and such, it assumes the
|
|
201
|
+
// transaction needs to be converted to an item. Returns null when
|
|
202
|
+
// there are no changes or effects in the transaction.
|
|
203
|
+
static fromTransaction(e, s) {
|
|
204
|
+
let n = C;
|
|
205
|
+
for (let r of e.startState.facet(Ss)) {
|
|
206
|
+
let o = r(e);
|
|
207
|
+
o.length && (n = n.concat(o));
|
|
208
|
+
}
|
|
209
|
+
return !n.length && e.changes.empty ? null : new y(e.changes.invert(e.startState.doc), n, void 0, s || e.startState.selection, C);
|
|
210
|
+
}
|
|
211
|
+
static selection(e) {
|
|
212
|
+
return new y(void 0, C, void 0, void 0, e);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function j(t, e, s, n) {
|
|
216
|
+
let r = e + 1 > s + 20 ? e - s - 1 : 0, o = t.slice(r, e);
|
|
217
|
+
return o.push(n), o;
|
|
218
|
+
}
|
|
219
|
+
function Ts(t, e) {
|
|
220
|
+
let s = [], n = !1;
|
|
221
|
+
return t.iterChangedRanges((r, o) => s.push(r, o)), e.iterChangedRanges((r, o, i, l) => {
|
|
222
|
+
for (let a = 0; a < s.length; ) {
|
|
223
|
+
let h = s[a++], c = s[a++];
|
|
224
|
+
l >= h && i <= c && (n = !0);
|
|
225
|
+
}
|
|
226
|
+
}), n;
|
|
227
|
+
}
|
|
228
|
+
function vs(t, e) {
|
|
229
|
+
return t.ranges.length == e.ranges.length && t.ranges.filter((s, n) => s.empty != e.ranges[n].empty).length === 0;
|
|
230
|
+
}
|
|
231
|
+
function st(t, e) {
|
|
232
|
+
return t.length ? e.length ? t.concat(e) : t : e;
|
|
233
|
+
}
|
|
234
|
+
const C = [], Ps = 200;
|
|
235
|
+
function nt(t, e) {
|
|
236
|
+
if (t.length) {
|
|
237
|
+
let s = t[t.length - 1], n = s.selectionsAfter.slice(Math.max(0, s.selectionsAfter.length - Ps));
|
|
238
|
+
return n.length && n[n.length - 1].eq(e) ? t : (n.push(e), j(t, t.length - 1, 1e9, s.setSelAfter(n)));
|
|
239
|
+
} else
|
|
240
|
+
return [y.selection([e])];
|
|
241
|
+
}
|
|
242
|
+
function $s(t) {
|
|
243
|
+
let e = t[t.length - 1], s = t.slice();
|
|
244
|
+
return s[t.length - 1] = e.setSelAfter(e.selectionsAfter.slice(0, e.selectionsAfter.length - 1)), s;
|
|
245
|
+
}
|
|
246
|
+
function re(t, e) {
|
|
247
|
+
if (!t.length)
|
|
248
|
+
return t;
|
|
249
|
+
let s = t.length, n = C;
|
|
250
|
+
for (; s; ) {
|
|
251
|
+
let r = As(t[s - 1], e, n);
|
|
252
|
+
if (r.changes && !r.changes.empty || r.effects.length) {
|
|
253
|
+
let o = t.slice(0, s);
|
|
254
|
+
return o[s - 1] = r, o;
|
|
255
|
+
} else
|
|
256
|
+
e = r.mapped, s--, n = r.selectionsAfter;
|
|
257
|
+
}
|
|
258
|
+
return n.length ? [y.selection(n)] : C;
|
|
259
|
+
}
|
|
260
|
+
function As(t, e, s) {
|
|
261
|
+
let n = st(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : C, s);
|
|
262
|
+
if (!t.changes)
|
|
263
|
+
return y.selection(n);
|
|
264
|
+
let r = t.changes.map(e), o = e.mapDesc(t.changes, !0), i = t.mapped ? t.mapped.composeDesc(o) : o;
|
|
265
|
+
return new y(r, Je.mapEffects(t.effects, e), i, t.startSelection.map(o), n);
|
|
266
|
+
}
|
|
267
|
+
const qs = /^(input\.type|delete)($|\.)/;
|
|
268
|
+
class A {
|
|
269
|
+
constructor(e, s, n = 0, r = void 0) {
|
|
270
|
+
this.done = e, this.undone = s, this.prevTime = n, this.prevUserEvent = r;
|
|
271
|
+
}
|
|
272
|
+
isolate() {
|
|
273
|
+
return this.prevTime ? new A(this.done, this.undone) : this;
|
|
274
|
+
}
|
|
275
|
+
addChanges(e, s, n, r, o) {
|
|
276
|
+
let i = this.done, l = i[i.length - 1];
|
|
277
|
+
return l && l.changes && !l.changes.empty && e.changes && (!n || qs.test(n)) && (!l.selectionsAfter.length && s - this.prevTime < r.newGroupDelay && r.joinToEvent(o, Ts(l.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
|
|
278
|
+
n == "input.type.compose") ? i = j(i, i.length - 1, r.minDepth, new y(e.changes.compose(l.changes), st(Je.mapEffects(e.effects, l.changes), l.effects), l.mapped, l.startSelection, C)) : i = j(i, i.length, r.minDepth, e), new A(i, C, s, n);
|
|
279
|
+
}
|
|
280
|
+
addSelection(e, s, n, r) {
|
|
281
|
+
let o = this.done.length ? this.done[this.done.length - 1].selectionsAfter : C;
|
|
282
|
+
return o.length > 0 && s - this.prevTime < r && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && vs(o[o.length - 1], e) ? this : new A(nt(this.done, e), this.undone, s, n);
|
|
283
|
+
}
|
|
284
|
+
addMapping(e) {
|
|
285
|
+
return new A(re(this.done, e), re(this.undone, e), this.prevTime, this.prevUserEvent);
|
|
286
|
+
}
|
|
287
|
+
pop(e, s, n) {
|
|
288
|
+
let r = e == 0 ? this.done : this.undone;
|
|
289
|
+
if (r.length == 0)
|
|
290
|
+
return null;
|
|
291
|
+
let o = r[r.length - 1], i = o.selectionsAfter[0] || s.selection;
|
|
292
|
+
if (n && o.selectionsAfter.length)
|
|
293
|
+
return s.update({
|
|
294
|
+
selection: o.selectionsAfter[o.selectionsAfter.length - 1],
|
|
295
|
+
annotations: ue.of({ side: e, rest: $s(r), selection: i }),
|
|
296
|
+
userEvent: e == 0 ? "select.undo" : "select.redo",
|
|
297
|
+
scrollIntoView: !0
|
|
298
|
+
});
|
|
299
|
+
if (o.changes) {
|
|
300
|
+
let l = r.length == 1 ? C : r.slice(0, r.length - 1);
|
|
301
|
+
return o.mapped && (l = re(l, o.mapped)), s.update({
|
|
302
|
+
changes: o.changes,
|
|
303
|
+
selection: o.startSelection,
|
|
304
|
+
effects: o.effects,
|
|
305
|
+
annotations: ue.of({ side: e, rest: l, selection: i }),
|
|
306
|
+
filter: !1,
|
|
307
|
+
userEvent: e == 0 ? "undo" : "redo",
|
|
308
|
+
scrollIntoView: !0
|
|
309
|
+
});
|
|
310
|
+
} else
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
A.empty = /* @__PURE__ */ new A(C, C);
|
|
315
|
+
const ws = [
|
|
316
|
+
{ key: "Mod-z", run: tt, preventDefault: !0 },
|
|
317
|
+
{ key: "Mod-y", mac: "Mod-Shift-z", run: fe, preventDefault: !0 },
|
|
318
|
+
{ linux: "Ctrl-Shift-z", run: fe, preventDefault: !0 },
|
|
319
|
+
{ key: "Mod-u", run: bs, preventDefault: !0 },
|
|
320
|
+
{ key: "Alt-u", mac: "Mod-Shift-u", run: Cs, preventDefault: !0 }
|
|
321
|
+
];
|
|
322
|
+
function W(t, e) {
|
|
323
|
+
return O.create(t.ranges.map(e), t.mainIndex);
|
|
324
|
+
}
|
|
325
|
+
function q(t, e) {
|
|
326
|
+
return t.update({ selection: e, scrollIntoView: !0, userEvent: "select" });
|
|
327
|
+
}
|
|
328
|
+
function P({ state: t, dispatch: e }, s) {
|
|
329
|
+
let n = W(t.selection, s);
|
|
330
|
+
return n.eq(t.selection, !0) ? !1 : (e(q(t, n)), !0);
|
|
331
|
+
}
|
|
332
|
+
function K(t, e) {
|
|
333
|
+
return O.cursor(e ? t.to : t.from);
|
|
334
|
+
}
|
|
335
|
+
function rt(t, e) {
|
|
336
|
+
return P(t, (s) => s.empty ? t.moveByChar(s, e) : K(s, e));
|
|
337
|
+
}
|
|
338
|
+
function k(t) {
|
|
339
|
+
return t.textDirectionAt(t.state.selection.main.head) == Mt.LTR;
|
|
340
|
+
}
|
|
341
|
+
const ot = (t) => rt(t, !k(t)), it = (t) => rt(t, k(t));
|
|
342
|
+
function lt(t, e) {
|
|
343
|
+
return P(t, (s) => s.empty ? t.moveByGroup(s, e) : K(s, e));
|
|
344
|
+
}
|
|
345
|
+
const Bs = (t) => lt(t, !k(t)), Ds = (t) => lt(t, k(t));
|
|
346
|
+
function Rs(t, e, s) {
|
|
347
|
+
if (e.type.prop(s))
|
|
348
|
+
return !0;
|
|
349
|
+
let n = e.to - e.from;
|
|
350
|
+
return n && (n > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
|
|
351
|
+
}
|
|
352
|
+
function ee(t, e, s) {
|
|
353
|
+
let n = M(t).resolveInner(e.head), r = s ? E.closedBy : E.openedBy;
|
|
354
|
+
for (let a = e.head; ; ) {
|
|
355
|
+
let h = s ? n.childAfter(a) : n.childBefore(a);
|
|
356
|
+
if (!h)
|
|
357
|
+
break;
|
|
358
|
+
Rs(t, h, r) ? n = h : a = s ? h.to : h.from;
|
|
359
|
+
}
|
|
360
|
+
let o = n.type.prop(r), i, l;
|
|
361
|
+
return o && (i = s ? R(t, n.from, 1) : R(t, n.to, -1)) && i.matched ? l = s ? i.end.to : i.end.from : l = s ? n.to : n.from, O.cursor(l, s ? -1 : 1);
|
|
362
|
+
}
|
|
363
|
+
const Ns = (t) => P(t, (e) => ee(t.state, e, !k(t))), Es = (t) => P(t, (e) => ee(t.state, e, k(t)));
|
|
364
|
+
function at(t, e) {
|
|
365
|
+
return P(t, (s) => {
|
|
366
|
+
if (!s.empty)
|
|
367
|
+
return K(s, e);
|
|
368
|
+
let n = t.moveVertically(s, e);
|
|
369
|
+
return n.head != s.head ? n : t.moveToLineBoundary(s, e);
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
const ht = (t) => at(t, !1), ct = (t) => at(t, !0);
|
|
373
|
+
function ut(t) {
|
|
374
|
+
let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, s = 0, n = 0, r;
|
|
375
|
+
if (e) {
|
|
376
|
+
for (let o of t.state.facet(v.scrollMargins)) {
|
|
377
|
+
let i = o(t);
|
|
378
|
+
i != null && i.top && (s = Math.max(i == null ? void 0 : i.top, s)), i != null && i.bottom && (n = Math.max(i == null ? void 0 : i.bottom, n));
|
|
379
|
+
}
|
|
380
|
+
r = t.scrollDOM.clientHeight - s - n;
|
|
381
|
+
} else
|
|
382
|
+
r = (t.dom.ownerDocument.defaultView || window).innerHeight;
|
|
383
|
+
return {
|
|
384
|
+
marginTop: s,
|
|
385
|
+
marginBottom: n,
|
|
386
|
+
selfScroll: e,
|
|
387
|
+
height: Math.max(t.defaultLineHeight, r - 5)
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
function ft(t, e) {
|
|
391
|
+
let s = ut(t), { state: n } = t, r = W(n.selection, (i) => i.empty ? t.moveVertically(i, e, s.height) : K(i, e));
|
|
392
|
+
if (r.eq(n.selection))
|
|
393
|
+
return !1;
|
|
394
|
+
let o;
|
|
395
|
+
if (s.selfScroll) {
|
|
396
|
+
let i = t.coordsAtPos(n.selection.main.head), l = t.scrollDOM.getBoundingClientRect(), a = l.top + s.marginTop, h = l.bottom - s.marginBottom;
|
|
397
|
+
i && i.top > a && i.bottom < h && (o = v.scrollIntoView(r.main.head, { y: "start", yMargin: i.top - a }));
|
|
398
|
+
}
|
|
399
|
+
return t.dispatch(q(n, r), { effects: o }), !0;
|
|
400
|
+
}
|
|
401
|
+
const Pe = (t) => ft(t, !1), de = (t) => ft(t, !0);
|
|
402
|
+
function D(t, e, s) {
|
|
403
|
+
let n = t.lineBlockAt(e.head), r = t.moveToLineBoundary(e, s);
|
|
404
|
+
if (r.head == e.head && r.head != (s ? n.to : n.from) && (r = t.moveToLineBoundary(e, s, !1)), !s && r.head == n.from && n.length) {
|
|
405
|
+
let o = /^\s*/.exec(t.state.sliceDoc(n.from, Math.min(n.from + 100, n.to)))[0].length;
|
|
406
|
+
o && e.head != n.from + o && (r = O.cursor(n.from + o));
|
|
407
|
+
}
|
|
408
|
+
return r;
|
|
409
|
+
}
|
|
410
|
+
const Ws = (t) => P(t, (e) => D(t, e, !0)), Is = (t) => P(t, (e) => D(t, e, !1)), Ls = (t) => P(t, (e) => D(t, e, !k(t))), Ms = (t) => P(t, (e) => D(t, e, k(t))), zs = (t) => P(t, (e) => O.cursor(t.lineBlockAt(e.head).from, 1)), Vs = (t) => P(t, (e) => O.cursor(t.lineBlockAt(e.head).to, -1));
|
|
411
|
+
function Gs(t, e, s) {
|
|
412
|
+
let n = !1, r = W(t.selection, (o) => {
|
|
413
|
+
let i = R(t, o.head, -1) || R(t, o.head, 1) || o.head > 0 && R(t, o.head - 1, 1) || o.head < t.doc.length && R(t, o.head + 1, -1);
|
|
414
|
+
if (!i || !i.end)
|
|
415
|
+
return o;
|
|
416
|
+
n = !0;
|
|
417
|
+
let l = i.start.from == o.head ? i.end.to : i.end.from;
|
|
418
|
+
return O.cursor(l);
|
|
419
|
+
});
|
|
420
|
+
return n ? (e(q(t, r)), !0) : !1;
|
|
421
|
+
}
|
|
422
|
+
const Qs = ({ state: t, dispatch: e }) => Gs(t, e);
|
|
423
|
+
function T(t, e) {
|
|
424
|
+
let s = W(t.state.selection, (n) => {
|
|
425
|
+
let r = e(n);
|
|
426
|
+
return O.range(n.anchor, r.head, r.goalColumn, r.bidiLevel || void 0);
|
|
427
|
+
});
|
|
428
|
+
return s.eq(t.state.selection) ? !1 : (t.dispatch(q(t.state, s)), !0);
|
|
429
|
+
}
|
|
430
|
+
function dt(t, e) {
|
|
431
|
+
return T(t, (s) => t.moveByChar(s, e));
|
|
432
|
+
}
|
|
433
|
+
const pt = (t) => dt(t, !k(t)), mt = (t) => dt(t, k(t));
|
|
434
|
+
function Ot(t, e) {
|
|
435
|
+
return T(t, (s) => t.moveByGroup(s, e));
|
|
436
|
+
}
|
|
437
|
+
const Xs = (t) => Ot(t, !k(t)), _s = (t) => Ot(t, k(t)), Us = (t) => T(t, (e) => ee(t.state, e, !k(t))), Fs = (t) => T(t, (e) => ee(t.state, e, k(t)));
|
|
438
|
+
function gt(t, e) {
|
|
439
|
+
return T(t, (s) => t.moveVertically(s, e));
|
|
440
|
+
}
|
|
441
|
+
const xt = (t) => gt(t, !1), kt = (t) => gt(t, !0);
|
|
442
|
+
function St(t, e) {
|
|
443
|
+
return T(t, (s) => t.moveVertically(s, e, ut(t).height));
|
|
444
|
+
}
|
|
445
|
+
const $e = (t) => St(t, !1), Ae = (t) => St(t, !0), js = (t) => T(t, (e) => D(t, e, !0)), Ys = (t) => T(t, (e) => D(t, e, !1)), Zs = (t) => T(t, (e) => D(t, e, !k(t))), Js = (t) => T(t, (e) => D(t, e, k(t))), Hs = (t) => T(t, (e) => O.cursor(t.lineBlockAt(e.head).from)), Ks = (t) => T(t, (e) => O.cursor(t.lineBlockAt(e.head).to)), qe = ({ state: t, dispatch: e }) => (e(q(t, { anchor: 0 })), !0), we = ({ state: t, dispatch: e }) => (e(q(t, { anchor: t.doc.length })), !0), Be = ({ state: t, dispatch: e }) => (e(q(t, { anchor: t.selection.main.anchor, head: 0 })), !0), De = ({ state: t, dispatch: e }) => (e(q(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), en = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), tn = ({ state: t, dispatch: e }) => {
|
|
446
|
+
let s = te(t).map(({ from: n, to: r }) => O.range(n, Math.min(r + 1, t.doc.length)));
|
|
447
|
+
return e(t.update({ selection: O.create(s), userEvent: "select" })), !0;
|
|
448
|
+
}, sn = ({ state: t, dispatch: e }) => {
|
|
449
|
+
let s = W(t.selection, (n) => {
|
|
450
|
+
let r = M(t), o = r.resolveStack(n.from, 1);
|
|
451
|
+
if (n.empty) {
|
|
452
|
+
let i = r.resolveStack(n.from, -1);
|
|
453
|
+
i.node.from >= o.node.from && i.node.to <= o.node.to && (o = i);
|
|
454
|
+
}
|
|
455
|
+
for (let i = o; i; i = i.next) {
|
|
456
|
+
let { node: l } = i;
|
|
457
|
+
if ((l.from < n.from && l.to >= n.to || l.to > n.to && l.from <= n.from) && i.next)
|
|
458
|
+
return O.range(l.to, l.from);
|
|
459
|
+
}
|
|
460
|
+
return n;
|
|
461
|
+
});
|
|
462
|
+
return s.eq(t.selection) ? !1 : (e(q(t, s)), !0);
|
|
463
|
+
}, nn = ({ state: t, dispatch: e }) => {
|
|
464
|
+
let s = t.selection, n = null;
|
|
465
|
+
return s.ranges.length > 1 ? n = O.create([s.main]) : s.main.empty || (n = O.create([O.cursor(s.main.head)])), n ? (e(q(t, n)), !0) : !1;
|
|
466
|
+
};
|
|
467
|
+
function z(t, e) {
|
|
468
|
+
if (t.state.readOnly)
|
|
469
|
+
return !1;
|
|
470
|
+
let s = "delete.selection", { state: n } = t, r = n.changeByRange((o) => {
|
|
471
|
+
let { from: i, to: l } = o;
|
|
472
|
+
if (i == l) {
|
|
473
|
+
let a = e(o);
|
|
474
|
+
a < i ? (s = "delete.backward", a = G(t, a, !1)) : a > i && (s = "delete.forward", a = G(t, a, !0)), i = Math.min(i, a), l = Math.max(l, a);
|
|
475
|
+
} else
|
|
476
|
+
i = G(t, i, !1), l = G(t, l, !0);
|
|
477
|
+
return i == l ? { range: o } : { changes: { from: i, to: l }, range: O.cursor(i, i < o.head ? -1 : 1) };
|
|
478
|
+
});
|
|
479
|
+
return r.changes.empty ? !1 : (t.dispatch(n.update(r, {
|
|
480
|
+
scrollIntoView: !0,
|
|
481
|
+
userEvent: s,
|
|
482
|
+
effects: s == "delete.selection" ? v.announce.of(n.phrase("Selection deleted")) : void 0
|
|
483
|
+
})), !0);
|
|
484
|
+
}
|
|
485
|
+
function G(t, e, s) {
|
|
486
|
+
if (t instanceof v)
|
|
487
|
+
for (let n of t.state.facet(v.atomicRanges).map((r) => r(t)))
|
|
488
|
+
n.between(e, e, (r, o) => {
|
|
489
|
+
r < e && o > e && (e = s ? o : r);
|
|
490
|
+
});
|
|
491
|
+
return e;
|
|
492
|
+
}
|
|
493
|
+
const yt = (t, e, s) => z(t, (n) => {
|
|
494
|
+
let r = n.from, { state: o } = t, i = o.doc.lineAt(r), l, a;
|
|
495
|
+
if (s && !e && r > i.from && r < i.from + 200 && !/[^ \t]/.test(l = i.text.slice(0, r - i.from))) {
|
|
496
|
+
if (l[l.length - 1] == " ")
|
|
497
|
+
return r - 1;
|
|
498
|
+
let h = ke(l, o.tabSize), c = h % ce(o) || ce(o);
|
|
499
|
+
for (let u = 0; u < c && l[l.length - 1 - u] == " "; u++)
|
|
500
|
+
r--;
|
|
501
|
+
a = r;
|
|
502
|
+
} else
|
|
503
|
+
a = L(i.text, r - i.from, e, e) + i.from, a == r && i.number != (e ? o.doc.lines : 1) ? a += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(i.text.slice(a - i.from, r - i.from)) && (a = L(i.text, a - i.from, !1, !1) + i.from);
|
|
504
|
+
return a;
|
|
505
|
+
}), pe = (t) => yt(t, !1, !0), bt = (t) => yt(t, !0, !1), Ct = (t, e) => z(t, (s) => {
|
|
506
|
+
let n = s.head, { state: r } = t, o = r.doc.lineAt(n), i = r.charCategorizer(n);
|
|
507
|
+
for (let l = null; ; ) {
|
|
508
|
+
if (n == (e ? o.to : o.from)) {
|
|
509
|
+
n == s.head && o.number != (e ? r.doc.lines : 1) && (n += e ? 1 : -1);
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
let a = L(o.text, n - o.from, e) + o.from, h = o.text.slice(Math.min(n, a) - o.from, Math.max(n, a) - o.from), c = i(h);
|
|
513
|
+
if (l != null && c != l)
|
|
514
|
+
break;
|
|
515
|
+
(h != " " || n != s.head) && (l = c), n = a;
|
|
516
|
+
}
|
|
517
|
+
return n;
|
|
518
|
+
}), Tt = (t) => Ct(t, !1), rn = (t) => Ct(t, !0), on = (t) => z(t, (e) => {
|
|
519
|
+
let s = t.lineBlockAt(e.head).to;
|
|
520
|
+
return e.head < s ? s : Math.min(t.state.doc.length, e.head + 1);
|
|
521
|
+
}), ln = (t) => z(t, (e) => {
|
|
522
|
+
let s = t.moveToLineBoundary(e, !1).head;
|
|
523
|
+
return e.head > s ? s : Math.max(0, e.head - 1);
|
|
524
|
+
}), an = (t) => z(t, (e) => {
|
|
525
|
+
let s = t.moveToLineBoundary(e, !0).head;
|
|
526
|
+
return e.head < s ? s : Math.min(t.state.doc.length, e.head + 1);
|
|
527
|
+
}), hn = ({ state: t, dispatch: e }) => {
|
|
528
|
+
if (t.readOnly)
|
|
529
|
+
return !1;
|
|
530
|
+
let s = t.changeByRange((n) => ({
|
|
531
|
+
changes: { from: n.from, to: n.to, insert: Ye.of(["", ""]) },
|
|
532
|
+
range: O.cursor(n.from)
|
|
533
|
+
}));
|
|
534
|
+
return e(t.update(s, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
535
|
+
}, cn = ({ state: t, dispatch: e }) => {
|
|
536
|
+
if (t.readOnly)
|
|
537
|
+
return !1;
|
|
538
|
+
let s = t.changeByRange((n) => {
|
|
539
|
+
if (!n.empty || n.from == 0 || n.from == t.doc.length)
|
|
540
|
+
return { range: n };
|
|
541
|
+
let r = n.from, o = t.doc.lineAt(r), i = r == o.from ? r - 1 : L(o.text, r - o.from, !1) + o.from, l = r == o.to ? r + 1 : L(o.text, r - o.from, !0) + o.from;
|
|
542
|
+
return {
|
|
543
|
+
changes: { from: i, to: l, insert: t.doc.slice(r, l).append(t.doc.slice(i, r)) },
|
|
544
|
+
range: O.cursor(l)
|
|
545
|
+
};
|
|
546
|
+
});
|
|
547
|
+
return s.changes.empty ? !1 : (e(t.update(s, { scrollIntoView: !0, userEvent: "move.character" })), !0);
|
|
548
|
+
};
|
|
549
|
+
function te(t) {
|
|
550
|
+
let e = [], s = -1;
|
|
551
|
+
for (let n of t.selection.ranges) {
|
|
552
|
+
let r = t.doc.lineAt(n.from), o = t.doc.lineAt(n.to);
|
|
553
|
+
if (!n.empty && n.to == o.from && (o = t.doc.lineAt(n.to - 1)), s >= r.number) {
|
|
554
|
+
let i = e[e.length - 1];
|
|
555
|
+
i.to = o.to, i.ranges.push(n);
|
|
556
|
+
} else
|
|
557
|
+
e.push({ from: r.from, to: o.to, ranges: [n] });
|
|
558
|
+
s = o.number + 1;
|
|
559
|
+
}
|
|
560
|
+
return e;
|
|
561
|
+
}
|
|
562
|
+
function vt(t, e, s) {
|
|
563
|
+
if (t.readOnly)
|
|
564
|
+
return !1;
|
|
565
|
+
let n = [], r = [];
|
|
566
|
+
for (let o of te(t)) {
|
|
567
|
+
if (s ? o.to == t.doc.length : o.from == 0)
|
|
568
|
+
continue;
|
|
569
|
+
let i = t.doc.lineAt(s ? o.to + 1 : o.from - 1), l = i.length + 1;
|
|
570
|
+
if (s) {
|
|
571
|
+
n.push({ from: o.to, to: i.to }, { from: o.from, insert: i.text + t.lineBreak });
|
|
572
|
+
for (let a of o.ranges)
|
|
573
|
+
r.push(O.range(Math.min(t.doc.length, a.anchor + l), Math.min(t.doc.length, a.head + l)));
|
|
574
|
+
} else {
|
|
575
|
+
n.push({ from: i.from, to: o.from }, { from: o.to, insert: t.lineBreak + i.text });
|
|
576
|
+
for (let a of o.ranges)
|
|
577
|
+
r.push(O.range(a.anchor - l, a.head - l));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
return n.length ? (e(t.update({
|
|
581
|
+
changes: n,
|
|
582
|
+
scrollIntoView: !0,
|
|
583
|
+
selection: O.create(r, t.selection.mainIndex),
|
|
584
|
+
userEvent: "move.line"
|
|
585
|
+
})), !0) : !1;
|
|
586
|
+
}
|
|
587
|
+
const un = ({ state: t, dispatch: e }) => vt(t, e, !1), fn = ({ state: t, dispatch: e }) => vt(t, e, !0);
|
|
588
|
+
function Pt(t, e, s) {
|
|
589
|
+
if (t.readOnly)
|
|
590
|
+
return !1;
|
|
591
|
+
let n = [];
|
|
592
|
+
for (let r of te(t))
|
|
593
|
+
s ? n.push({ from: r.from, insert: t.doc.slice(r.from, r.to) + t.lineBreak }) : n.push({ from: r.to, insert: t.lineBreak + t.doc.slice(r.from, r.to) });
|
|
594
|
+
return e(t.update({ changes: n, scrollIntoView: !0, userEvent: "input.copyline" })), !0;
|
|
595
|
+
}
|
|
596
|
+
const dn = ({ state: t, dispatch: e }) => Pt(t, e, !1), pn = ({ state: t, dispatch: e }) => Pt(t, e, !0), mn = (t) => {
|
|
597
|
+
if (t.state.readOnly)
|
|
598
|
+
return !1;
|
|
599
|
+
let { state: e } = t, s = e.changes(te(e).map(({ from: r, to: o }) => (r > 0 ? r-- : o < e.doc.length && o++, { from: r, to: o }))), n = W(e.selection, (r) => {
|
|
600
|
+
let o;
|
|
601
|
+
if (t.lineWrapping) {
|
|
602
|
+
let i = t.lineBlockAt(r.head), l = t.coordsAtPos(r.head, r.assoc || 1);
|
|
603
|
+
l && (o = i.bottom + t.documentTop - l.bottom + t.defaultLineHeight / 2);
|
|
604
|
+
}
|
|
605
|
+
return t.moveVertically(r, !0, o);
|
|
606
|
+
}).map(s);
|
|
607
|
+
return t.dispatch({ changes: s, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0;
|
|
608
|
+
};
|
|
609
|
+
function On(t, e) {
|
|
610
|
+
if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
|
|
611
|
+
return { from: e, to: e };
|
|
612
|
+
let s = M(t).resolveInner(e), n = s.childBefore(e), r = s.childAfter(e), o;
|
|
613
|
+
return n && r && n.to <= e && r.from >= e && (o = n.type.prop(E.closedBy)) && o.indexOf(r.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(r.from).from && !/\S/.test(t.sliceDoc(n.to, r.from)) ? { from: n.to, to: r.from } : null;
|
|
614
|
+
}
|
|
615
|
+
const me = /* @__PURE__ */ $t(!1), gn = /* @__PURE__ */ $t(!0);
|
|
616
|
+
function $t(t) {
|
|
617
|
+
return ({ state: e, dispatch: s }) => {
|
|
618
|
+
if (e.readOnly)
|
|
619
|
+
return !1;
|
|
620
|
+
let n = e.changeByRange((r) => {
|
|
621
|
+
let { from: o, to: i } = r, l = e.doc.lineAt(o), a = !t && o == i && On(e, o);
|
|
622
|
+
t && (o = i = (i <= l.to ? l : e.doc.lineAt(i)).to);
|
|
623
|
+
let h = new Fe(e, { simulateBreak: o, simulateDoubleBreak: !!a }), c = je(h, o);
|
|
624
|
+
for (c == null && (c = ke(/^\s*/.exec(e.doc.lineAt(o).text)[0], e.tabSize)); i < l.to && /\s/.test(l.text[i - l.from]); )
|
|
625
|
+
i++;
|
|
626
|
+
a ? { from: o, to: i } = a : o > l.from && o < l.from + 100 && !/\S/.test(l.text.slice(0, o)) && (o = l.from);
|
|
627
|
+
let u = ["", F(e, c)];
|
|
628
|
+
return a && u.push(F(e, h.lineIndent(l.from, -1))), {
|
|
629
|
+
changes: { from: o, to: i, insert: Ye.of(u) },
|
|
630
|
+
range: O.cursor(o + 1 + u[1].length)
|
|
631
|
+
};
|
|
632
|
+
});
|
|
633
|
+
return s(e.update(n, { scrollIntoView: !0, userEvent: "input" })), !0;
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function be(t, e) {
|
|
637
|
+
let s = -1;
|
|
638
|
+
return t.changeByRange((n) => {
|
|
639
|
+
let r = [];
|
|
640
|
+
for (let i = n.from; i <= n.to; ) {
|
|
641
|
+
let l = t.doc.lineAt(i);
|
|
642
|
+
l.number > s && (n.empty || n.to > l.from) && (e(l, r, n), s = l.number), i = l.to + 1;
|
|
643
|
+
}
|
|
644
|
+
let o = t.changes(r);
|
|
645
|
+
return {
|
|
646
|
+
changes: r,
|
|
647
|
+
range: O.range(o.mapPos(n.anchor, 1), o.mapPos(n.head, 1))
|
|
648
|
+
};
|
|
649
|
+
});
|
|
650
|
+
}
|
|
651
|
+
const xn = ({ state: t, dispatch: e }) => {
|
|
652
|
+
if (t.readOnly)
|
|
653
|
+
return !1;
|
|
654
|
+
let s = /* @__PURE__ */ Object.create(null), n = new Fe(t, { overrideIndentation: (o) => {
|
|
655
|
+
let i = s[o];
|
|
656
|
+
return i ?? -1;
|
|
657
|
+
} }), r = be(t, (o, i, l) => {
|
|
658
|
+
let a = je(n, o.from);
|
|
659
|
+
if (a == null)
|
|
660
|
+
return;
|
|
661
|
+
/\S/.test(o.text) || (a = 0);
|
|
662
|
+
let h = /^\s*/.exec(o.text)[0], c = F(t, a);
|
|
663
|
+
(h != c || l.from < o.from + h.length) && (s[o.from] = a, i.push({ from: o.from, to: o.from + h.length, insert: c }));
|
|
664
|
+
});
|
|
665
|
+
return r.changes.empty || e(t.update(r, { userEvent: "indent" })), !0;
|
|
666
|
+
}, At = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(be(t, (s, n) => {
|
|
667
|
+
n.push({ from: s.from, insert: t.facet(zt) });
|
|
668
|
+
}), { userEvent: "input.indent" })), !0), qt = ({ state: t, dispatch: e }) => t.readOnly ? !1 : (e(t.update(be(t, (s, n) => {
|
|
669
|
+
let r = /^\s*/.exec(s.text)[0];
|
|
670
|
+
if (!r)
|
|
671
|
+
return;
|
|
672
|
+
let o = ke(r, t.tabSize), i = 0, l = F(t, Math.max(0, o - ce(t)));
|
|
673
|
+
for (; i < r.length && i < l.length && r.charCodeAt(i) == l.charCodeAt(i); )
|
|
674
|
+
i++;
|
|
675
|
+
n.push({ from: s.from + i, to: s.from + r.length, insert: l.slice(i) });
|
|
676
|
+
}), { userEvent: "delete.dedent" })), !0), kn = (t) => (t.setTabFocusMode(), !0), Sn = [
|
|
677
|
+
{ key: "Ctrl-b", run: ot, shift: pt, preventDefault: !0 },
|
|
678
|
+
{ key: "Ctrl-f", run: it, shift: mt },
|
|
679
|
+
{ key: "Ctrl-p", run: ht, shift: xt },
|
|
680
|
+
{ key: "Ctrl-n", run: ct, shift: kt },
|
|
681
|
+
{ key: "Ctrl-a", run: zs, shift: Hs },
|
|
682
|
+
{ key: "Ctrl-e", run: Vs, shift: Ks },
|
|
683
|
+
{ key: "Ctrl-d", run: bt },
|
|
684
|
+
{ key: "Ctrl-h", run: pe },
|
|
685
|
+
{ key: "Ctrl-k", run: on },
|
|
686
|
+
{ key: "Ctrl-Alt-h", run: Tt },
|
|
687
|
+
{ key: "Ctrl-o", run: hn },
|
|
688
|
+
{ key: "Ctrl-t", run: cn },
|
|
689
|
+
{ key: "Ctrl-v", run: de }
|
|
690
|
+
], yn = /* @__PURE__ */ [
|
|
691
|
+
{ key: "ArrowLeft", run: ot, shift: pt, preventDefault: !0 },
|
|
692
|
+
{ key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: Bs, shift: Xs, preventDefault: !0 },
|
|
693
|
+
{ mac: "Cmd-ArrowLeft", run: Ls, shift: Zs, preventDefault: !0 },
|
|
694
|
+
{ key: "ArrowRight", run: it, shift: mt, preventDefault: !0 },
|
|
695
|
+
{ key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Ds, shift: _s, preventDefault: !0 },
|
|
696
|
+
{ mac: "Cmd-ArrowRight", run: Ms, shift: Js, preventDefault: !0 },
|
|
697
|
+
{ key: "ArrowUp", run: ht, shift: xt, preventDefault: !0 },
|
|
698
|
+
{ mac: "Cmd-ArrowUp", run: qe, shift: Be },
|
|
699
|
+
{ mac: "Ctrl-ArrowUp", run: Pe, shift: $e },
|
|
700
|
+
{ key: "ArrowDown", run: ct, shift: kt, preventDefault: !0 },
|
|
701
|
+
{ mac: "Cmd-ArrowDown", run: we, shift: De },
|
|
702
|
+
{ mac: "Ctrl-ArrowDown", run: de, shift: Ae },
|
|
703
|
+
{ key: "PageUp", run: Pe, shift: $e },
|
|
704
|
+
{ key: "PageDown", run: de, shift: Ae },
|
|
705
|
+
{ key: "Home", run: Is, shift: Ys, preventDefault: !0 },
|
|
706
|
+
{ key: "Mod-Home", run: qe, shift: Be },
|
|
707
|
+
{ key: "End", run: Ws, shift: js, preventDefault: !0 },
|
|
708
|
+
{ key: "Mod-End", run: we, shift: De },
|
|
709
|
+
{ key: "Enter", run: me, shift: me },
|
|
710
|
+
{ key: "Mod-a", run: en },
|
|
711
|
+
{ key: "Backspace", run: pe, shift: pe },
|
|
712
|
+
{ key: "Delete", run: bt },
|
|
713
|
+
{ key: "Mod-Backspace", mac: "Alt-Backspace", run: Tt },
|
|
714
|
+
{ key: "Mod-Delete", mac: "Alt-Delete", run: rn },
|
|
715
|
+
{ mac: "Mod-Backspace", run: ln },
|
|
716
|
+
{ mac: "Mod-Delete", run: an }
|
|
717
|
+
].concat(/* @__PURE__ */ Sn.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), bn = /* @__PURE__ */ [
|
|
718
|
+
{ key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: Ns, shift: Us },
|
|
719
|
+
{ key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: Es, shift: Fs },
|
|
720
|
+
{ key: "Alt-ArrowUp", run: un },
|
|
721
|
+
{ key: "Shift-Alt-ArrowUp", run: dn },
|
|
722
|
+
{ key: "Alt-ArrowDown", run: fn },
|
|
723
|
+
{ key: "Shift-Alt-ArrowDown", run: pn },
|
|
724
|
+
{ key: "Escape", run: nn },
|
|
725
|
+
{ key: "Mod-Enter", run: gn },
|
|
726
|
+
{ key: "Alt-l", mac: "Ctrl-l", run: tn },
|
|
727
|
+
{ key: "Mod-i", run: sn, preventDefault: !0 },
|
|
728
|
+
{ key: "Mod-[", run: qt },
|
|
729
|
+
{ key: "Mod-]", run: At },
|
|
730
|
+
{ key: "Mod-Alt-\\", run: xn },
|
|
731
|
+
{ key: "Shift-Mod-k", run: mn },
|
|
732
|
+
{ key: "Shift-Mod-\\", run: Qs },
|
|
733
|
+
{ key: "Mod-/", run: fs },
|
|
734
|
+
{ key: "Alt-A", run: ps },
|
|
735
|
+
{ key: "Ctrl-m", mac: "Shift-Alt-m", run: kn }
|
|
736
|
+
].concat(yn), Cn = { key: "Tab", run: At, shift: qt };
|
|
737
|
+
class Y {
|
|
738
|
+
/**
|
|
739
|
+
@internal
|
|
740
|
+
*/
|
|
741
|
+
constructor(e, s, n, r, o, i, l, a, h, c = 0, u) {
|
|
742
|
+
this.p = e, this.stack = s, this.state = n, this.reducePos = r, this.pos = o, this.score = i, this.buffer = l, this.bufferBase = a, this.curContext = h, this.lookAhead = c, this.parent = u;
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
@internal
|
|
746
|
+
*/
|
|
747
|
+
toString() {
|
|
748
|
+
return `[${this.stack.filter((e, s) => s % 3 == 0).concat(this.state)}]@${this.pos}${this.score ? "!" + this.score : ""}`;
|
|
749
|
+
}
|
|
750
|
+
// Start an empty stack
|
|
751
|
+
/**
|
|
752
|
+
@internal
|
|
753
|
+
*/
|
|
754
|
+
static start(e, s, n = 0) {
|
|
755
|
+
let r = e.parser.context;
|
|
756
|
+
return new Y(e, [], s, n, n, 0, [], 0, r ? new Re(r, r.start) : null, 0, null);
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
The stack's current [context](#lr.ContextTracker) value, if
|
|
760
|
+
any. Its type will depend on the context tracker's type
|
|
761
|
+
parameter, or it will be `null` if there is no context
|
|
762
|
+
tracker.
|
|
763
|
+
*/
|
|
764
|
+
get context() {
|
|
765
|
+
return this.curContext ? this.curContext.context : null;
|
|
766
|
+
}
|
|
767
|
+
// Push a state onto the stack, tracking its start position as well
|
|
768
|
+
// as the buffer base at that point.
|
|
769
|
+
/**
|
|
770
|
+
@internal
|
|
771
|
+
*/
|
|
772
|
+
pushState(e, s) {
|
|
773
|
+
this.stack.push(this.state, s, this.bufferBase + this.buffer.length), this.state = e;
|
|
774
|
+
}
|
|
775
|
+
// Apply a reduce action
|
|
776
|
+
/**
|
|
777
|
+
@internal
|
|
778
|
+
*/
|
|
779
|
+
reduce(e) {
|
|
780
|
+
var s;
|
|
781
|
+
let n = e >> 19, r = e & 65535, { parser: o } = this.p, i = this.reducePos < this.pos - 25;
|
|
782
|
+
i && this.setLookAhead(this.pos);
|
|
783
|
+
let l = o.dynamicPrecedence(r);
|
|
784
|
+
if (l && (this.score += l), n == 0) {
|
|
785
|
+
this.pushState(o.getGoto(this.state, r, !0), this.reducePos), r < o.minRepeatTerm && this.storeNode(r, this.reducePos, this.reducePos, i ? 8 : 4, !0), this.reduceContext(r, this.reducePos);
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
let a = this.stack.length - (n - 1) * 3 - (e & 262144 ? 6 : 0), h = a ? this.stack[a - 2] : this.p.ranges[0].from, c = this.reducePos - h;
|
|
789
|
+
c >= 2e3 && !(!((s = this.p.parser.nodeSet.types[r]) === null || s === void 0) && s.isAnonymous) && (h == this.p.lastBigReductionStart ? (this.p.bigReductionCount++, this.p.lastBigReductionSize = c) : this.p.lastBigReductionSize < c && (this.p.bigReductionCount = 1, this.p.lastBigReductionStart = h, this.p.lastBigReductionSize = c));
|
|
790
|
+
let u = a ? this.stack[a - 1] : 0, f = this.bufferBase + this.buffer.length - u;
|
|
791
|
+
if (r < o.minRepeatTerm || e & 131072) {
|
|
792
|
+
let d = o.stateFlag(
|
|
793
|
+
this.state,
|
|
794
|
+
1
|
|
795
|
+
/* StateFlag.Skipped */
|
|
796
|
+
) ? this.pos : this.reducePos;
|
|
797
|
+
this.storeNode(r, h, d, f + 4, !0);
|
|
798
|
+
}
|
|
799
|
+
if (e & 262144)
|
|
800
|
+
this.state = this.stack[a];
|
|
801
|
+
else {
|
|
802
|
+
let d = this.stack[a - 3];
|
|
803
|
+
this.state = o.getGoto(d, r, !0);
|
|
804
|
+
}
|
|
805
|
+
for (; this.stack.length > a; )
|
|
806
|
+
this.stack.pop();
|
|
807
|
+
this.reduceContext(r, h);
|
|
808
|
+
}
|
|
809
|
+
// Shift a value into the buffer
|
|
810
|
+
/**
|
|
811
|
+
@internal
|
|
812
|
+
*/
|
|
813
|
+
storeNode(e, s, n, r = 4, o = !1) {
|
|
814
|
+
if (e == 0 && (!this.stack.length || this.stack[this.stack.length - 1] < this.buffer.length + this.bufferBase)) {
|
|
815
|
+
let i = this, l = this.buffer.length;
|
|
816
|
+
if (l == 0 && i.parent && (l = i.bufferBase - i.parent.bufferBase, i = i.parent), l > 0 && i.buffer[l - 4] == 0 && i.buffer[l - 1] > -1) {
|
|
817
|
+
if (s == n)
|
|
818
|
+
return;
|
|
819
|
+
if (i.buffer[l - 2] >= s) {
|
|
820
|
+
i.buffer[l - 2] = n;
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
if (!o || this.pos == n)
|
|
826
|
+
this.buffer.push(e, s, n, r);
|
|
827
|
+
else {
|
|
828
|
+
let i = this.buffer.length;
|
|
829
|
+
if (i > 0 && this.buffer[i - 4] != 0) {
|
|
830
|
+
let l = !1;
|
|
831
|
+
for (let a = i; a > 0 && this.buffer[a - 2] > n; a -= 4)
|
|
832
|
+
if (this.buffer[a - 1] >= 0) {
|
|
833
|
+
l = !0;
|
|
834
|
+
break;
|
|
835
|
+
}
|
|
836
|
+
if (l)
|
|
837
|
+
for (; i > 0 && this.buffer[i - 2] > n; )
|
|
838
|
+
this.buffer[i] = this.buffer[i - 4], this.buffer[i + 1] = this.buffer[i - 3], this.buffer[i + 2] = this.buffer[i - 2], this.buffer[i + 3] = this.buffer[i - 1], i -= 4, r > 4 && (r -= 4);
|
|
839
|
+
}
|
|
840
|
+
this.buffer[i] = e, this.buffer[i + 1] = s, this.buffer[i + 2] = n, this.buffer[i + 3] = r;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
// Apply a shift action
|
|
844
|
+
/**
|
|
845
|
+
@internal
|
|
846
|
+
*/
|
|
847
|
+
shift(e, s, n, r) {
|
|
848
|
+
if (e & 131072)
|
|
849
|
+
this.pushState(e & 65535, this.pos);
|
|
850
|
+
else if ((e & 262144) == 0) {
|
|
851
|
+
let o = e, { parser: i } = this.p;
|
|
852
|
+
(r > this.pos || s <= i.maxNode) && (this.pos = r, i.stateFlag(
|
|
853
|
+
o,
|
|
854
|
+
1
|
|
855
|
+
/* StateFlag.Skipped */
|
|
856
|
+
) || (this.reducePos = r)), this.pushState(o, n), this.shiftContext(s, n), s <= i.maxNode && this.buffer.push(s, n, r, 4);
|
|
857
|
+
} else
|
|
858
|
+
this.pos = r, this.shiftContext(s, n), s <= this.p.parser.maxNode && this.buffer.push(s, n, r, 4);
|
|
859
|
+
}
|
|
860
|
+
// Apply an action
|
|
861
|
+
/**
|
|
862
|
+
@internal
|
|
863
|
+
*/
|
|
864
|
+
apply(e, s, n, r) {
|
|
865
|
+
e & 65536 ? this.reduce(e) : this.shift(e, s, n, r);
|
|
866
|
+
}
|
|
867
|
+
// Add a prebuilt (reused) node into the buffer.
|
|
868
|
+
/**
|
|
869
|
+
@internal
|
|
870
|
+
*/
|
|
871
|
+
useNode(e, s) {
|
|
872
|
+
let n = this.p.reused.length - 1;
|
|
873
|
+
(n < 0 || this.p.reused[n] != e) && (this.p.reused.push(e), n++);
|
|
874
|
+
let r = this.pos;
|
|
875
|
+
this.reducePos = this.pos = r + e.length, this.pushState(s, r), this.buffer.push(
|
|
876
|
+
n,
|
|
877
|
+
r,
|
|
878
|
+
this.reducePos,
|
|
879
|
+
-1
|
|
880
|
+
/* size == -1 means this is a reused value */
|
|
881
|
+
), this.curContext && this.updateContext(this.curContext.tracker.reuse(this.curContext.context, e, this, this.p.stream.reset(this.pos - e.length)));
|
|
882
|
+
}
|
|
883
|
+
// Split the stack. Due to the buffer sharing and the fact
|
|
884
|
+
// that `this.stack` tends to stay quite shallow, this isn't very
|
|
885
|
+
// expensive.
|
|
886
|
+
/**
|
|
887
|
+
@internal
|
|
888
|
+
*/
|
|
889
|
+
split() {
|
|
890
|
+
let e = this, s = e.buffer.length;
|
|
891
|
+
for (; s > 0 && e.buffer[s - 2] > e.reducePos; )
|
|
892
|
+
s -= 4;
|
|
893
|
+
let n = e.buffer.slice(s), r = e.bufferBase + s;
|
|
894
|
+
for (; e && r == e.bufferBase; )
|
|
895
|
+
e = e.parent;
|
|
896
|
+
return new Y(this.p, this.stack.slice(), this.state, this.reducePos, this.pos, this.score, n, r, this.curContext, this.lookAhead, e);
|
|
897
|
+
}
|
|
898
|
+
// Try to recover from an error by 'deleting' (ignoring) one token.
|
|
899
|
+
/**
|
|
900
|
+
@internal
|
|
901
|
+
*/
|
|
902
|
+
recoverByDelete(e, s) {
|
|
903
|
+
let n = e <= this.p.parser.maxNode;
|
|
904
|
+
n && this.storeNode(e, this.pos, s, 4), this.storeNode(0, this.pos, s, n ? 8 : 4), this.pos = this.reducePos = s, this.score -= 190;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
Check if the given term would be able to be shifted (optionally
|
|
908
|
+
after some reductions) on this stack. This can be useful for
|
|
909
|
+
external tokenizers that want to make sure they only provide a
|
|
910
|
+
given token when it applies.
|
|
911
|
+
*/
|
|
912
|
+
canShift(e) {
|
|
913
|
+
for (let s = new Tn(this); ; ) {
|
|
914
|
+
let n = this.p.parser.stateSlot(
|
|
915
|
+
s.state,
|
|
916
|
+
4
|
|
917
|
+
/* ParseState.DefaultReduce */
|
|
918
|
+
) || this.p.parser.hasAction(s.state, e);
|
|
919
|
+
if (n == 0)
|
|
920
|
+
return !1;
|
|
921
|
+
if ((n & 65536) == 0)
|
|
922
|
+
return !0;
|
|
923
|
+
s.reduce(n);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
// Apply up to Recover.MaxNext recovery actions that conceptually
|
|
927
|
+
// inserts some missing token or rule.
|
|
928
|
+
/**
|
|
929
|
+
@internal
|
|
930
|
+
*/
|
|
931
|
+
recoverByInsert(e) {
|
|
932
|
+
if (this.stack.length >= 300)
|
|
933
|
+
return [];
|
|
934
|
+
let s = this.p.parser.nextStates(this.state);
|
|
935
|
+
if (s.length > 8 || this.stack.length >= 120) {
|
|
936
|
+
let r = [];
|
|
937
|
+
for (let o = 0, i; o < s.length; o += 2)
|
|
938
|
+
(i = s[o + 1]) != this.state && this.p.parser.hasAction(i, e) && r.push(s[o], i);
|
|
939
|
+
if (this.stack.length < 120)
|
|
940
|
+
for (let o = 0; r.length < 8 && o < s.length; o += 2) {
|
|
941
|
+
let i = s[o + 1];
|
|
942
|
+
r.some((l, a) => a & 1 && l == i) || r.push(s[o], i);
|
|
943
|
+
}
|
|
944
|
+
s = r;
|
|
945
|
+
}
|
|
946
|
+
let n = [];
|
|
947
|
+
for (let r = 0; r < s.length && n.length < 4; r += 2) {
|
|
948
|
+
let o = s[r + 1];
|
|
949
|
+
if (o == this.state)
|
|
950
|
+
continue;
|
|
951
|
+
let i = this.split();
|
|
952
|
+
i.pushState(o, this.pos), i.storeNode(0, i.pos, i.pos, 4, !0), i.shiftContext(s[r], this.pos), i.reducePos = this.pos, i.score -= 200, n.push(i);
|
|
953
|
+
}
|
|
954
|
+
return n;
|
|
955
|
+
}
|
|
956
|
+
// Force a reduce, if possible. Return false if that can't
|
|
957
|
+
// be done.
|
|
958
|
+
/**
|
|
959
|
+
@internal
|
|
960
|
+
*/
|
|
961
|
+
forceReduce() {
|
|
962
|
+
let { parser: e } = this.p, s = e.stateSlot(
|
|
963
|
+
this.state,
|
|
964
|
+
5
|
|
965
|
+
/* ParseState.ForcedReduce */
|
|
966
|
+
);
|
|
967
|
+
if ((s & 65536) == 0)
|
|
968
|
+
return !1;
|
|
969
|
+
if (!e.validAction(this.state, s)) {
|
|
970
|
+
let n = s >> 19, r = s & 65535, o = this.stack.length - n * 3;
|
|
971
|
+
if (o < 0 || e.getGoto(this.stack[o], r, !1) < 0) {
|
|
972
|
+
let i = this.findForcedReduction();
|
|
973
|
+
if (i == null)
|
|
974
|
+
return !1;
|
|
975
|
+
s = i;
|
|
976
|
+
}
|
|
977
|
+
this.storeNode(0, this.pos, this.pos, 4, !0), this.score -= 100;
|
|
978
|
+
}
|
|
979
|
+
return this.reducePos = this.pos, this.reduce(s), !0;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
Try to scan through the automaton to find some kind of reduction
|
|
983
|
+
that can be applied. Used when the regular ForcedReduce field
|
|
984
|
+
isn't a valid action. @internal
|
|
985
|
+
*/
|
|
986
|
+
findForcedReduction() {
|
|
987
|
+
let { parser: e } = this.p, s = [], n = (r, o) => {
|
|
988
|
+
if (!s.includes(r))
|
|
989
|
+
return s.push(r), e.allActions(r, (i) => {
|
|
990
|
+
if (!(i & 393216)) if (i & 65536) {
|
|
991
|
+
let l = (i >> 19) - o;
|
|
992
|
+
if (l > 1) {
|
|
993
|
+
let a = i & 65535, h = this.stack.length - l * 3;
|
|
994
|
+
if (h >= 0 && e.getGoto(this.stack[h], a, !1) >= 0)
|
|
995
|
+
return l << 19 | 65536 | a;
|
|
996
|
+
}
|
|
997
|
+
} else {
|
|
998
|
+
let l = n(i, o + 1);
|
|
999
|
+
if (l != null)
|
|
1000
|
+
return l;
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
return n(this.state, 0);
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
@internal
|
|
1008
|
+
*/
|
|
1009
|
+
forceAll() {
|
|
1010
|
+
for (; !this.p.parser.stateFlag(
|
|
1011
|
+
this.state,
|
|
1012
|
+
2
|
|
1013
|
+
/* StateFlag.Accepting */
|
|
1014
|
+
); )
|
|
1015
|
+
if (!this.forceReduce()) {
|
|
1016
|
+
this.storeNode(0, this.pos, this.pos, 4, !0);
|
|
1017
|
+
break;
|
|
1018
|
+
}
|
|
1019
|
+
return this;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
Check whether this state has no further actions (assumed to be a direct descendant of the
|
|
1023
|
+
top state, since any other states must be able to continue
|
|
1024
|
+
somehow). @internal
|
|
1025
|
+
*/
|
|
1026
|
+
get deadEnd() {
|
|
1027
|
+
if (this.stack.length != 3)
|
|
1028
|
+
return !1;
|
|
1029
|
+
let { parser: e } = this.p;
|
|
1030
|
+
return e.data[e.stateSlot(
|
|
1031
|
+
this.state,
|
|
1032
|
+
1
|
|
1033
|
+
/* ParseState.Actions */
|
|
1034
|
+
)] == 65535 && !e.stateSlot(
|
|
1035
|
+
this.state,
|
|
1036
|
+
4
|
|
1037
|
+
/* ParseState.DefaultReduce */
|
|
1038
|
+
);
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
Restart the stack (put it back in its start state). Only safe
|
|
1042
|
+
when this.stack.length == 3 (state is directly below the top
|
|
1043
|
+
state). @internal
|
|
1044
|
+
*/
|
|
1045
|
+
restart() {
|
|
1046
|
+
this.storeNode(0, this.pos, this.pos, 4, !0), this.state = this.stack[0], this.stack.length = 0;
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
@internal
|
|
1050
|
+
*/
|
|
1051
|
+
sameState(e) {
|
|
1052
|
+
if (this.state != e.state || this.stack.length != e.stack.length)
|
|
1053
|
+
return !1;
|
|
1054
|
+
for (let s = 0; s < this.stack.length; s += 3)
|
|
1055
|
+
if (this.stack[s] != e.stack[s])
|
|
1056
|
+
return !1;
|
|
1057
|
+
return !0;
|
|
1058
|
+
}
|
|
1059
|
+
/**
|
|
1060
|
+
Get the parser used by this stack.
|
|
1061
|
+
*/
|
|
1062
|
+
get parser() {
|
|
1063
|
+
return this.p.parser;
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
Test whether a given dialect (by numeric ID, as exported from
|
|
1067
|
+
the terms file) is enabled.
|
|
1068
|
+
*/
|
|
1069
|
+
dialectEnabled(e) {
|
|
1070
|
+
return this.p.parser.dialect.flags[e];
|
|
1071
|
+
}
|
|
1072
|
+
shiftContext(e, s) {
|
|
1073
|
+
this.curContext && this.updateContext(this.curContext.tracker.shift(this.curContext.context, e, this, this.p.stream.reset(s)));
|
|
1074
|
+
}
|
|
1075
|
+
reduceContext(e, s) {
|
|
1076
|
+
this.curContext && this.updateContext(this.curContext.tracker.reduce(this.curContext.context, e, this, this.p.stream.reset(s)));
|
|
1077
|
+
}
|
|
1078
|
+
/**
|
|
1079
|
+
@internal
|
|
1080
|
+
*/
|
|
1081
|
+
emitContext() {
|
|
1082
|
+
let e = this.buffer.length - 1;
|
|
1083
|
+
(e < 0 || this.buffer[e] != -3) && this.buffer.push(this.curContext.hash, this.pos, this.pos, -3);
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
@internal
|
|
1087
|
+
*/
|
|
1088
|
+
emitLookAhead() {
|
|
1089
|
+
let e = this.buffer.length - 1;
|
|
1090
|
+
(e < 0 || this.buffer[e] != -4) && this.buffer.push(this.lookAhead, this.pos, this.pos, -4);
|
|
1091
|
+
}
|
|
1092
|
+
updateContext(e) {
|
|
1093
|
+
if (e != this.curContext.context) {
|
|
1094
|
+
let s = new Re(this.curContext.tracker, e);
|
|
1095
|
+
s.hash != this.curContext.hash && this.emitContext(), this.curContext = s;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
@internal
|
|
1100
|
+
*/
|
|
1101
|
+
setLookAhead(e) {
|
|
1102
|
+
e > this.lookAhead && (this.emitLookAhead(), this.lookAhead = e);
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
@internal
|
|
1106
|
+
*/
|
|
1107
|
+
close() {
|
|
1108
|
+
this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
class Re {
|
|
1112
|
+
constructor(e, s) {
|
|
1113
|
+
this.tracker = e, this.context = s, this.hash = e.strict ? e.hash(s) : 0;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
class Tn {
|
|
1117
|
+
constructor(e) {
|
|
1118
|
+
this.start = e, this.state = e.state, this.stack = e.stack, this.base = this.stack.length;
|
|
1119
|
+
}
|
|
1120
|
+
reduce(e) {
|
|
1121
|
+
let s = e & 65535, n = e >> 19;
|
|
1122
|
+
n == 0 ? (this.stack == this.start.stack && (this.stack = this.stack.slice()), this.stack.push(this.state, 0, 0), this.base += 3) : this.base -= (n - 1) * 3;
|
|
1123
|
+
let r = this.start.p.parser.getGoto(this.stack[this.base - 3], s, !0);
|
|
1124
|
+
this.state = r;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
class Z {
|
|
1128
|
+
constructor(e, s, n) {
|
|
1129
|
+
this.stack = e, this.pos = s, this.index = n, this.buffer = e.buffer, this.index == 0 && this.maybeNext();
|
|
1130
|
+
}
|
|
1131
|
+
static create(e, s = e.bufferBase + e.buffer.length) {
|
|
1132
|
+
return new Z(e, s, s - e.bufferBase);
|
|
1133
|
+
}
|
|
1134
|
+
maybeNext() {
|
|
1135
|
+
let e = this.stack.parent;
|
|
1136
|
+
e != null && (this.index = this.stack.bufferBase - e.bufferBase, this.stack = e, this.buffer = e.buffer);
|
|
1137
|
+
}
|
|
1138
|
+
get id() {
|
|
1139
|
+
return this.buffer[this.index - 4];
|
|
1140
|
+
}
|
|
1141
|
+
get start() {
|
|
1142
|
+
return this.buffer[this.index - 3];
|
|
1143
|
+
}
|
|
1144
|
+
get end() {
|
|
1145
|
+
return this.buffer[this.index - 2];
|
|
1146
|
+
}
|
|
1147
|
+
get size() {
|
|
1148
|
+
return this.buffer[this.index - 1];
|
|
1149
|
+
}
|
|
1150
|
+
next() {
|
|
1151
|
+
this.index -= 4, this.pos -= 4, this.index == 0 && this.maybeNext();
|
|
1152
|
+
}
|
|
1153
|
+
fork() {
|
|
1154
|
+
return new Z(this.stack, this.pos, this.index);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
function Q(t, e = Uint16Array) {
|
|
1158
|
+
if (typeof t != "string")
|
|
1159
|
+
return t;
|
|
1160
|
+
let s = null;
|
|
1161
|
+
for (let n = 0, r = 0; n < t.length; ) {
|
|
1162
|
+
let o = 0;
|
|
1163
|
+
for (; ; ) {
|
|
1164
|
+
let i = t.charCodeAt(n++), l = !1;
|
|
1165
|
+
if (i == 126) {
|
|
1166
|
+
o = 65535;
|
|
1167
|
+
break;
|
|
1168
|
+
}
|
|
1169
|
+
i >= 92 && i--, i >= 34 && i--;
|
|
1170
|
+
let a = i - 32;
|
|
1171
|
+
if (a >= 46 && (a -= 46, l = !0), o += a, l)
|
|
1172
|
+
break;
|
|
1173
|
+
o *= 46;
|
|
1174
|
+
}
|
|
1175
|
+
s ? s[r++] = o : s = new e(o);
|
|
1176
|
+
}
|
|
1177
|
+
return s;
|
|
1178
|
+
}
|
|
1179
|
+
class _ {
|
|
1180
|
+
constructor() {
|
|
1181
|
+
this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
const Ne = new _();
|
|
1185
|
+
class vn {
|
|
1186
|
+
/**
|
|
1187
|
+
@internal
|
|
1188
|
+
*/
|
|
1189
|
+
constructor(e, s) {
|
|
1190
|
+
this.input = e, this.ranges = s, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = Ne, this.rangeIndex = 0, this.pos = this.chunkPos = s[0].from, this.range = s[0], this.end = s[s.length - 1].to, this.readNext();
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
@internal
|
|
1194
|
+
*/
|
|
1195
|
+
resolveOffset(e, s) {
|
|
1196
|
+
let n = this.range, r = this.rangeIndex, o = this.pos + e;
|
|
1197
|
+
for (; o < n.from; ) {
|
|
1198
|
+
if (!r)
|
|
1199
|
+
return null;
|
|
1200
|
+
let i = this.ranges[--r];
|
|
1201
|
+
o -= n.from - i.to, n = i;
|
|
1202
|
+
}
|
|
1203
|
+
for (; s < 0 ? o > n.to : o >= n.to; ) {
|
|
1204
|
+
if (r == this.ranges.length - 1)
|
|
1205
|
+
return null;
|
|
1206
|
+
let i = this.ranges[++r];
|
|
1207
|
+
o += i.from - n.to, n = i;
|
|
1208
|
+
}
|
|
1209
|
+
return o;
|
|
1210
|
+
}
|
|
1211
|
+
/**
|
|
1212
|
+
@internal
|
|
1213
|
+
*/
|
|
1214
|
+
clipPos(e) {
|
|
1215
|
+
if (e >= this.range.from && e < this.range.to)
|
|
1216
|
+
return e;
|
|
1217
|
+
for (let s of this.ranges)
|
|
1218
|
+
if (s.to > e)
|
|
1219
|
+
return Math.max(e, s.from);
|
|
1220
|
+
return this.end;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
Look at a code unit near the stream position. `.peek(0)` equals
|
|
1224
|
+
`.next`, `.peek(-1)` gives you the previous character, and so
|
|
1225
|
+
on.
|
|
1226
|
+
|
|
1227
|
+
Note that looking around during tokenizing creates dependencies
|
|
1228
|
+
on potentially far-away content, which may reduce the
|
|
1229
|
+
effectiveness incremental parsing—when looking forward—or even
|
|
1230
|
+
cause invalid reparses when looking backward more than 25 code
|
|
1231
|
+
units, since the library does not track lookbehind.
|
|
1232
|
+
*/
|
|
1233
|
+
peek(e) {
|
|
1234
|
+
let s = this.chunkOff + e, n, r;
|
|
1235
|
+
if (s >= 0 && s < this.chunk.length)
|
|
1236
|
+
n = this.pos + e, r = this.chunk.charCodeAt(s);
|
|
1237
|
+
else {
|
|
1238
|
+
let o = this.resolveOffset(e, 1);
|
|
1239
|
+
if (o == null)
|
|
1240
|
+
return -1;
|
|
1241
|
+
if (n = o, n >= this.chunk2Pos && n < this.chunk2Pos + this.chunk2.length)
|
|
1242
|
+
r = this.chunk2.charCodeAt(n - this.chunk2Pos);
|
|
1243
|
+
else {
|
|
1244
|
+
let i = this.rangeIndex, l = this.range;
|
|
1245
|
+
for (; l.to <= n; )
|
|
1246
|
+
l = this.ranges[++i];
|
|
1247
|
+
this.chunk2 = this.input.chunk(this.chunk2Pos = n), n + this.chunk2.length > l.to && (this.chunk2 = this.chunk2.slice(0, l.to - n)), r = this.chunk2.charCodeAt(0);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
return n >= this.token.lookAhead && (this.token.lookAhead = n + 1), r;
|
|
1251
|
+
}
|
|
1252
|
+
/**
|
|
1253
|
+
Accept a token. By default, the end of the token is set to the
|
|
1254
|
+
current stream position, but you can pass an offset (relative to
|
|
1255
|
+
the stream position) to change that.
|
|
1256
|
+
*/
|
|
1257
|
+
acceptToken(e, s = 0) {
|
|
1258
|
+
let n = s ? this.resolveOffset(s, -1) : this.pos;
|
|
1259
|
+
if (n == null || n < this.token.start)
|
|
1260
|
+
throw new RangeError("Token end out of bounds");
|
|
1261
|
+
this.token.value = e, this.token.end = n;
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
Accept a token ending at a specific given position.
|
|
1265
|
+
*/
|
|
1266
|
+
acceptTokenTo(e, s) {
|
|
1267
|
+
this.token.value = e, this.token.end = s;
|
|
1268
|
+
}
|
|
1269
|
+
getChunk() {
|
|
1270
|
+
if (this.pos >= this.chunk2Pos && this.pos < this.chunk2Pos + this.chunk2.length) {
|
|
1271
|
+
let { chunk: e, chunkPos: s } = this;
|
|
1272
|
+
this.chunk = this.chunk2, this.chunkPos = this.chunk2Pos, this.chunk2 = e, this.chunk2Pos = s, this.chunkOff = this.pos - this.chunkPos;
|
|
1273
|
+
} else {
|
|
1274
|
+
this.chunk2 = this.chunk, this.chunk2Pos = this.chunkPos;
|
|
1275
|
+
let e = this.input.chunk(this.pos), s = this.pos + e.length;
|
|
1276
|
+
this.chunk = s > this.range.to ? e.slice(0, this.range.to - this.pos) : e, this.chunkPos = this.pos, this.chunkOff = 0;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
readNext() {
|
|
1280
|
+
return this.chunkOff >= this.chunk.length && (this.getChunk(), this.chunkOff == this.chunk.length) ? this.next = -1 : this.next = this.chunk.charCodeAt(this.chunkOff);
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
Move the stream forward N (defaults to 1) code units. Returns
|
|
1284
|
+
the new value of [`next`](#lr.InputStream.next).
|
|
1285
|
+
*/
|
|
1286
|
+
advance(e = 1) {
|
|
1287
|
+
for (this.chunkOff += e; this.pos + e >= this.range.to; ) {
|
|
1288
|
+
if (this.rangeIndex == this.ranges.length - 1)
|
|
1289
|
+
return this.setDone();
|
|
1290
|
+
e -= this.range.to - this.pos, this.range = this.ranges[++this.rangeIndex], this.pos = this.range.from;
|
|
1291
|
+
}
|
|
1292
|
+
return this.pos += e, this.pos >= this.token.lookAhead && (this.token.lookAhead = this.pos + 1), this.readNext();
|
|
1293
|
+
}
|
|
1294
|
+
setDone() {
|
|
1295
|
+
return this.pos = this.chunkPos = this.end, this.range = this.ranges[this.rangeIndex = this.ranges.length - 1], this.chunk = "", this.next = -1;
|
|
1296
|
+
}
|
|
1297
|
+
/**
|
|
1298
|
+
@internal
|
|
1299
|
+
*/
|
|
1300
|
+
reset(e, s) {
|
|
1301
|
+
if (s ? (this.token = s, s.start = e, s.lookAhead = e + 1, s.value = s.extended = -1) : this.token = Ne, this.pos != e) {
|
|
1302
|
+
if (this.pos = e, e == this.end)
|
|
1303
|
+
return this.setDone(), this;
|
|
1304
|
+
for (; e < this.range.from; )
|
|
1305
|
+
this.range = this.ranges[--this.rangeIndex];
|
|
1306
|
+
for (; e >= this.range.to; )
|
|
1307
|
+
this.range = this.ranges[++this.rangeIndex];
|
|
1308
|
+
e >= this.chunkPos && e < this.chunkPos + this.chunk.length ? this.chunkOff = e - this.chunkPos : (this.chunk = "", this.chunkOff = 0), this.readNext();
|
|
1309
|
+
}
|
|
1310
|
+
return this;
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
@internal
|
|
1314
|
+
*/
|
|
1315
|
+
read(e, s) {
|
|
1316
|
+
if (e >= this.chunkPos && s <= this.chunkPos + this.chunk.length)
|
|
1317
|
+
return this.chunk.slice(e - this.chunkPos, s - this.chunkPos);
|
|
1318
|
+
if (e >= this.chunk2Pos && s <= this.chunk2Pos + this.chunk2.length)
|
|
1319
|
+
return this.chunk2.slice(e - this.chunk2Pos, s - this.chunk2Pos);
|
|
1320
|
+
if (e >= this.range.from && s <= this.range.to)
|
|
1321
|
+
return this.input.read(e, s);
|
|
1322
|
+
let n = "";
|
|
1323
|
+
for (let r of this.ranges) {
|
|
1324
|
+
if (r.from >= s)
|
|
1325
|
+
break;
|
|
1326
|
+
r.to > e && (n += this.input.read(Math.max(r.from, e), Math.min(r.to, s)));
|
|
1327
|
+
}
|
|
1328
|
+
return n;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
class N {
|
|
1332
|
+
constructor(e, s) {
|
|
1333
|
+
this.data = e, this.id = s;
|
|
1334
|
+
}
|
|
1335
|
+
token(e, s) {
|
|
1336
|
+
let { parser: n } = s.p;
|
|
1337
|
+
Pn(this.data, e, s, this.id, n.data, n.tokenPrecTable);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
N.prototype.contextual = N.prototype.fallback = N.prototype.extend = !1;
|
|
1341
|
+
N.prototype.fallback = N.prototype.extend = !1;
|
|
1342
|
+
class wt {
|
|
1343
|
+
/**
|
|
1344
|
+
Create a tokenizer. The first argument is the function that,
|
|
1345
|
+
given an input stream, scans for the types of tokens it
|
|
1346
|
+
recognizes at the stream's position, and calls
|
|
1347
|
+
[`acceptToken`](#lr.InputStream.acceptToken) when it finds
|
|
1348
|
+
one.
|
|
1349
|
+
*/
|
|
1350
|
+
constructor(e, s = {}) {
|
|
1351
|
+
this.token = e, this.contextual = !!s.contextual, this.fallback = !!s.fallback, this.extend = !!s.extend;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
function Pn(t, e, s, n, r, o) {
|
|
1355
|
+
let i = 0, l = 1 << n, { dialect: a } = s.p.parser;
|
|
1356
|
+
e: for (; (l & t[i]) != 0; ) {
|
|
1357
|
+
let h = t[i + 1];
|
|
1358
|
+
for (let d = i + 3; d < h; d += 2)
|
|
1359
|
+
if ((t[d + 1] & l) > 0) {
|
|
1360
|
+
let p = t[d];
|
|
1361
|
+
if (a.allows(p) && (e.token.value == -1 || e.token.value == p || $n(p, e.token.value, r, o))) {
|
|
1362
|
+
e.acceptToken(p);
|
|
1363
|
+
break;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
let c = e.next, u = 0, f = t[i + 2];
|
|
1367
|
+
if (e.next < 0 && f > u && t[h + f * 3 - 3] == 65535) {
|
|
1368
|
+
i = t[h + f * 3 - 1];
|
|
1369
|
+
continue e;
|
|
1370
|
+
}
|
|
1371
|
+
for (; u < f; ) {
|
|
1372
|
+
let d = u + f >> 1, p = h + d + (d << 1), m = t[p], g = t[p + 1] || 65536;
|
|
1373
|
+
if (c < m)
|
|
1374
|
+
f = d;
|
|
1375
|
+
else if (c >= g)
|
|
1376
|
+
u = d + 1;
|
|
1377
|
+
else {
|
|
1378
|
+
i = t[p + 2], e.advance();
|
|
1379
|
+
continue e;
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
break;
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
function Ee(t, e, s) {
|
|
1386
|
+
for (let n = e, r; (r = t[n]) != 65535; n++)
|
|
1387
|
+
if (r == s)
|
|
1388
|
+
return n - e;
|
|
1389
|
+
return -1;
|
|
1390
|
+
}
|
|
1391
|
+
function $n(t, e, s, n) {
|
|
1392
|
+
let r = Ee(s, n, e);
|
|
1393
|
+
return r < 0 || Ee(s, n, t) < r;
|
|
1394
|
+
}
|
|
1395
|
+
const b = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
|
|
1396
|
+
let oe = null;
|
|
1397
|
+
function We(t, e, s) {
|
|
1398
|
+
let n = t.cursor(_t.IncludeAnonymous);
|
|
1399
|
+
for (n.moveTo(e); ; )
|
|
1400
|
+
if (!(s < 0 ? n.childBefore(e) : n.childAfter(e)))
|
|
1401
|
+
for (; ; ) {
|
|
1402
|
+
if ((s < 0 ? n.to < e : n.from > e) && !n.type.isError)
|
|
1403
|
+
return s < 0 ? Math.max(0, Math.min(
|
|
1404
|
+
n.to - 1,
|
|
1405
|
+
e - 25
|
|
1406
|
+
/* Lookahead.Margin */
|
|
1407
|
+
)) : Math.min(t.length, Math.max(
|
|
1408
|
+
n.from + 1,
|
|
1409
|
+
e + 25
|
|
1410
|
+
/* Lookahead.Margin */
|
|
1411
|
+
));
|
|
1412
|
+
if (s < 0 ? n.prevSibling() : n.nextSibling())
|
|
1413
|
+
break;
|
|
1414
|
+
if (!n.parent())
|
|
1415
|
+
return s < 0 ? 0 : t.length;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
class An {
|
|
1419
|
+
constructor(e, s) {
|
|
1420
|
+
this.fragments = e, this.nodeSet = s, this.i = 0, this.fragment = null, this.safeFrom = -1, this.safeTo = -1, this.trees = [], this.start = [], this.index = [], this.nextFragment();
|
|
1421
|
+
}
|
|
1422
|
+
nextFragment() {
|
|
1423
|
+
let e = this.fragment = this.i == this.fragments.length ? null : this.fragments[this.i++];
|
|
1424
|
+
if (e) {
|
|
1425
|
+
for (this.safeFrom = e.openStart ? We(e.tree, e.from + e.offset, 1) - e.offset : e.from, this.safeTo = e.openEnd ? We(e.tree, e.to + e.offset, -1) - e.offset : e.to; this.trees.length; )
|
|
1426
|
+
this.trees.pop(), this.start.pop(), this.index.pop();
|
|
1427
|
+
this.trees.push(e.tree), this.start.push(-e.offset), this.index.push(0), this.nextStart = this.safeFrom;
|
|
1428
|
+
} else
|
|
1429
|
+
this.nextStart = 1e9;
|
|
1430
|
+
}
|
|
1431
|
+
// `pos` must be >= any previously given `pos` for this cursor
|
|
1432
|
+
nodeAt(e) {
|
|
1433
|
+
if (e < this.nextStart)
|
|
1434
|
+
return null;
|
|
1435
|
+
for (; this.fragment && this.safeTo <= e; )
|
|
1436
|
+
this.nextFragment();
|
|
1437
|
+
if (!this.fragment)
|
|
1438
|
+
return null;
|
|
1439
|
+
for (; ; ) {
|
|
1440
|
+
let s = this.trees.length - 1;
|
|
1441
|
+
if (s < 0)
|
|
1442
|
+
return this.nextFragment(), null;
|
|
1443
|
+
let n = this.trees[s], r = this.index[s];
|
|
1444
|
+
if (r == n.children.length) {
|
|
1445
|
+
this.trees.pop(), this.start.pop(), this.index.pop();
|
|
1446
|
+
continue;
|
|
1447
|
+
}
|
|
1448
|
+
let o = n.children[r], i = this.start[s] + n.positions[r];
|
|
1449
|
+
if (i > e)
|
|
1450
|
+
return this.nextStart = i, null;
|
|
1451
|
+
if (o instanceof X) {
|
|
1452
|
+
if (i == e) {
|
|
1453
|
+
if (i < this.safeFrom)
|
|
1454
|
+
return null;
|
|
1455
|
+
let l = i + o.length;
|
|
1456
|
+
if (l <= this.safeTo) {
|
|
1457
|
+
let a = o.prop(E.lookAhead);
|
|
1458
|
+
if (!a || l + a < this.fragment.to)
|
|
1459
|
+
return o;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
this.index[s]++, i + o.length >= Math.max(this.safeFrom, e) && (this.trees.push(o), this.start.push(i), this.index.push(0));
|
|
1463
|
+
} else
|
|
1464
|
+
this.index[s]++, this.nextStart = i + o.length;
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
class qn {
|
|
1469
|
+
constructor(e, s) {
|
|
1470
|
+
this.stream = s, this.tokens = [], this.mainToken = null, this.actions = [], this.tokens = e.tokenizers.map((n) => new _());
|
|
1471
|
+
}
|
|
1472
|
+
getActions(e) {
|
|
1473
|
+
let s = 0, n = null, { parser: r } = e.p, { tokenizers: o } = r, i = r.stateSlot(
|
|
1474
|
+
e.state,
|
|
1475
|
+
3
|
|
1476
|
+
/* ParseState.TokenizerMask */
|
|
1477
|
+
), l = e.curContext ? e.curContext.hash : 0, a = 0;
|
|
1478
|
+
for (let h = 0; h < o.length; h++) {
|
|
1479
|
+
if ((1 << h & i) == 0)
|
|
1480
|
+
continue;
|
|
1481
|
+
let c = o[h], u = this.tokens[h];
|
|
1482
|
+
if (!(n && !c.fallback) && ((c.contextual || u.start != e.pos || u.mask != i || u.context != l) && (this.updateCachedToken(u, c, e), u.mask = i, u.context = l), u.lookAhead > u.end + 25 && (a = Math.max(u.lookAhead, a)), u.value != 0)) {
|
|
1483
|
+
let f = s;
|
|
1484
|
+
if (u.extended > -1 && (s = this.addActions(e, u.extended, u.end, s)), s = this.addActions(e, u.value, u.end, s), !c.extend && (n = u, s > f))
|
|
1485
|
+
break;
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
for (; this.actions.length > s; )
|
|
1489
|
+
this.actions.pop();
|
|
1490
|
+
return a && e.setLookAhead(a), !n && e.pos == this.stream.end && (n = new _(), n.value = e.p.parser.eofTerm, n.start = n.end = e.pos, s = this.addActions(e, n.value, n.end, s)), this.mainToken = n, this.actions;
|
|
1491
|
+
}
|
|
1492
|
+
getMainToken(e) {
|
|
1493
|
+
if (this.mainToken)
|
|
1494
|
+
return this.mainToken;
|
|
1495
|
+
let s = new _(), { pos: n, p: r } = e;
|
|
1496
|
+
return s.start = n, s.end = Math.min(n + 1, r.stream.end), s.value = n == r.stream.end ? r.parser.eofTerm : 0, s;
|
|
1497
|
+
}
|
|
1498
|
+
updateCachedToken(e, s, n) {
|
|
1499
|
+
let r = this.stream.clipPos(n.pos);
|
|
1500
|
+
if (s.token(this.stream.reset(r, e), n), e.value > -1) {
|
|
1501
|
+
let { parser: o } = n.p;
|
|
1502
|
+
for (let i = 0; i < o.specialized.length; i++)
|
|
1503
|
+
if (o.specialized[i] == e.value) {
|
|
1504
|
+
let l = o.specializers[i](this.stream.read(e.start, e.end), n);
|
|
1505
|
+
if (l >= 0 && n.p.parser.dialect.allows(l >> 1)) {
|
|
1506
|
+
(l & 1) == 0 ? e.value = l >> 1 : e.extended = l >> 1;
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
} else
|
|
1511
|
+
e.value = 0, e.end = this.stream.clipPos(r + 1);
|
|
1512
|
+
}
|
|
1513
|
+
putAction(e, s, n, r) {
|
|
1514
|
+
for (let o = 0; o < r; o += 3)
|
|
1515
|
+
if (this.actions[o] == e)
|
|
1516
|
+
return r;
|
|
1517
|
+
return this.actions[r++] = e, this.actions[r++] = s, this.actions[r++] = n, r;
|
|
1518
|
+
}
|
|
1519
|
+
addActions(e, s, n, r) {
|
|
1520
|
+
let { state: o } = e, { parser: i } = e.p, { data: l } = i;
|
|
1521
|
+
for (let a = 0; a < 2; a++)
|
|
1522
|
+
for (let h = i.stateSlot(
|
|
1523
|
+
o,
|
|
1524
|
+
a ? 2 : 1
|
|
1525
|
+
/* ParseState.Actions */
|
|
1526
|
+
); ; h += 3) {
|
|
1527
|
+
if (l[h] == 65535)
|
|
1528
|
+
if (l[h + 1] == 1)
|
|
1529
|
+
h = w(l, h + 2);
|
|
1530
|
+
else {
|
|
1531
|
+
r == 0 && l[h + 1] == 2 && (r = this.putAction(w(l, h + 2), s, n, r));
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
l[h] == s && (r = this.putAction(w(l, h + 1), s, n, r));
|
|
1535
|
+
}
|
|
1536
|
+
return r;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
class wn {
|
|
1540
|
+
constructor(e, s, n, r) {
|
|
1541
|
+
this.parser = e, this.input = s, this.ranges = r, this.recovering = 0, this.nextStackID = 9812, this.minStackPos = 0, this.reused = [], this.stoppedAt = null, this.lastBigReductionStart = -1, this.lastBigReductionSize = 0, this.bigReductionCount = 0, this.stream = new vn(s, r), this.tokens = new qn(e, this.stream), this.topTerm = e.top[1];
|
|
1542
|
+
let { from: o } = r[0];
|
|
1543
|
+
this.stacks = [Y.start(this, e.top[0], o)], this.fragments = n.length && this.stream.end - o > e.bufferLength * 4 ? new An(n, e.nodeSet) : null;
|
|
1544
|
+
}
|
|
1545
|
+
get parsedPos() {
|
|
1546
|
+
return this.minStackPos;
|
|
1547
|
+
}
|
|
1548
|
+
// Move the parser forward. This will process all parse stacks at
|
|
1549
|
+
// `this.pos` and try to advance them to a further position. If no
|
|
1550
|
+
// stack for such a position is found, it'll start error-recovery.
|
|
1551
|
+
//
|
|
1552
|
+
// When the parse is finished, this will return a syntax tree. When
|
|
1553
|
+
// not, it returns `null`.
|
|
1554
|
+
advance() {
|
|
1555
|
+
let e = this.stacks, s = this.minStackPos, n = this.stacks = [], r, o;
|
|
1556
|
+
if (this.bigReductionCount > 300 && e.length == 1) {
|
|
1557
|
+
let [i] = e;
|
|
1558
|
+
for (; i.forceReduce() && i.stack.length && i.stack[i.stack.length - 2] >= this.lastBigReductionStart; )
|
|
1559
|
+
;
|
|
1560
|
+
this.bigReductionCount = this.lastBigReductionSize = 0;
|
|
1561
|
+
}
|
|
1562
|
+
for (let i = 0; i < e.length; i++) {
|
|
1563
|
+
let l = e[i];
|
|
1564
|
+
for (; ; ) {
|
|
1565
|
+
if (this.tokens.mainToken = null, l.pos > s)
|
|
1566
|
+
n.push(l);
|
|
1567
|
+
else {
|
|
1568
|
+
if (this.advanceStack(l, n, e))
|
|
1569
|
+
continue;
|
|
1570
|
+
{
|
|
1571
|
+
r || (r = [], o = []), r.push(l);
|
|
1572
|
+
let a = this.tokens.getMainToken(l);
|
|
1573
|
+
o.push(a.value, a.end);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
break;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
if (!n.length) {
|
|
1580
|
+
let i = r && Rn(r);
|
|
1581
|
+
if (i)
|
|
1582
|
+
return b && console.log("Finish with " + this.stackID(i)), this.stackToTree(i);
|
|
1583
|
+
if (this.parser.strict)
|
|
1584
|
+
throw b && r && console.log("Stuck with token " + (this.tokens.mainToken ? this.parser.getName(this.tokens.mainToken.value) : "none")), new SyntaxError("No parse at " + s);
|
|
1585
|
+
this.recovering || (this.recovering = 5);
|
|
1586
|
+
}
|
|
1587
|
+
if (this.recovering && r) {
|
|
1588
|
+
let i = this.stoppedAt != null && r[0].pos > this.stoppedAt ? r[0] : this.runRecovery(r, o, n);
|
|
1589
|
+
if (i)
|
|
1590
|
+
return b && console.log("Force-finish " + this.stackID(i)), this.stackToTree(i.forceAll());
|
|
1591
|
+
}
|
|
1592
|
+
if (this.recovering) {
|
|
1593
|
+
let i = this.recovering == 1 ? 1 : this.recovering * 3;
|
|
1594
|
+
if (n.length > i)
|
|
1595
|
+
for (n.sort((l, a) => a.score - l.score); n.length > i; )
|
|
1596
|
+
n.pop();
|
|
1597
|
+
n.some((l) => l.reducePos > s) && this.recovering--;
|
|
1598
|
+
} else if (n.length > 1) {
|
|
1599
|
+
e: for (let i = 0; i < n.length - 1; i++) {
|
|
1600
|
+
let l = n[i];
|
|
1601
|
+
for (let a = i + 1; a < n.length; a++) {
|
|
1602
|
+
let h = n[a];
|
|
1603
|
+
if (l.sameState(h) || l.buffer.length > 500 && h.buffer.length > 500)
|
|
1604
|
+
if ((l.score - h.score || l.buffer.length - h.buffer.length) > 0)
|
|
1605
|
+
n.splice(a--, 1);
|
|
1606
|
+
else {
|
|
1607
|
+
n.splice(i--, 1);
|
|
1608
|
+
continue e;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
n.length > 12 && n.splice(
|
|
1613
|
+
12,
|
|
1614
|
+
n.length - 12
|
|
1615
|
+
/* Rec.MaxStackCount */
|
|
1616
|
+
);
|
|
1617
|
+
}
|
|
1618
|
+
this.minStackPos = n[0].pos;
|
|
1619
|
+
for (let i = 1; i < n.length; i++)
|
|
1620
|
+
n[i].pos < this.minStackPos && (this.minStackPos = n[i].pos);
|
|
1621
|
+
return null;
|
|
1622
|
+
}
|
|
1623
|
+
stopAt(e) {
|
|
1624
|
+
if (this.stoppedAt != null && this.stoppedAt < e)
|
|
1625
|
+
throw new RangeError("Can't move stoppedAt forward");
|
|
1626
|
+
this.stoppedAt = e;
|
|
1627
|
+
}
|
|
1628
|
+
// Returns an updated version of the given stack, or null if the
|
|
1629
|
+
// stack can't advance normally. When `split` and `stacks` are
|
|
1630
|
+
// given, stacks split off by ambiguous operations will be pushed to
|
|
1631
|
+
// `split`, or added to `stacks` if they move `pos` forward.
|
|
1632
|
+
advanceStack(e, s, n) {
|
|
1633
|
+
let r = e.pos, { parser: o } = this, i = b ? this.stackID(e) + " -> " : "";
|
|
1634
|
+
if (this.stoppedAt != null && r > this.stoppedAt)
|
|
1635
|
+
return e.forceReduce() ? e : null;
|
|
1636
|
+
if (this.fragments) {
|
|
1637
|
+
let h = e.curContext && e.curContext.tracker.strict, c = h ? e.curContext.hash : 0;
|
|
1638
|
+
for (let u = this.fragments.nodeAt(r); u; ) {
|
|
1639
|
+
let f = this.parser.nodeSet.types[u.type.id] == u.type ? o.getGoto(e.state, u.type.id) : -1;
|
|
1640
|
+
if (f > -1 && u.length && (!h || (u.prop(E.contextHash) || 0) == c))
|
|
1641
|
+
return e.useNode(u, f), b && console.log(i + this.stackID(e) + ` (via reuse of ${o.getName(u.type.id)})`), !0;
|
|
1642
|
+
if (!(u instanceof X) || u.children.length == 0 || u.positions[0] > 0)
|
|
1643
|
+
break;
|
|
1644
|
+
let d = u.children[0];
|
|
1645
|
+
if (d instanceof X && u.positions[0] == 0)
|
|
1646
|
+
u = d;
|
|
1647
|
+
else
|
|
1648
|
+
break;
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
let l = o.stateSlot(
|
|
1652
|
+
e.state,
|
|
1653
|
+
4
|
|
1654
|
+
/* ParseState.DefaultReduce */
|
|
1655
|
+
);
|
|
1656
|
+
if (l > 0)
|
|
1657
|
+
return e.reduce(l), b && console.log(i + this.stackID(e) + ` (via always-reduce ${o.getName(
|
|
1658
|
+
l & 65535
|
|
1659
|
+
/* Action.ValueMask */
|
|
1660
|
+
)})`), !0;
|
|
1661
|
+
if (e.stack.length >= 8400)
|
|
1662
|
+
for (; e.stack.length > 6e3 && e.forceReduce(); )
|
|
1663
|
+
;
|
|
1664
|
+
let a = this.tokens.getActions(e);
|
|
1665
|
+
for (let h = 0; h < a.length; ) {
|
|
1666
|
+
let c = a[h++], u = a[h++], f = a[h++], d = h == a.length || !n, p = d ? e : e.split(), m = this.tokens.mainToken;
|
|
1667
|
+
if (p.apply(c, u, m ? m.start : p.pos, f), b && console.log(i + this.stackID(p) + ` (via ${(c & 65536) == 0 ? "shift" : `reduce of ${o.getName(
|
|
1668
|
+
c & 65535
|
|
1669
|
+
/* Action.ValueMask */
|
|
1670
|
+
)}`} for ${o.getName(u)} @ ${r}${p == e ? "" : ", split"})`), d)
|
|
1671
|
+
return !0;
|
|
1672
|
+
p.pos > r ? s.push(p) : n.push(p);
|
|
1673
|
+
}
|
|
1674
|
+
return !1;
|
|
1675
|
+
}
|
|
1676
|
+
// Advance a given stack forward as far as it will go. Returns the
|
|
1677
|
+
// (possibly updated) stack if it got stuck, or null if it moved
|
|
1678
|
+
// forward and was given to `pushStackDedup`.
|
|
1679
|
+
advanceFully(e, s) {
|
|
1680
|
+
let n = e.pos;
|
|
1681
|
+
for (; ; ) {
|
|
1682
|
+
if (!this.advanceStack(e, null, null))
|
|
1683
|
+
return !1;
|
|
1684
|
+
if (e.pos > n)
|
|
1685
|
+
return Ie(e, s), !0;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
runRecovery(e, s, n) {
|
|
1689
|
+
let r = null, o = !1;
|
|
1690
|
+
for (let i = 0; i < e.length; i++) {
|
|
1691
|
+
let l = e[i], a = s[i << 1], h = s[(i << 1) + 1], c = b ? this.stackID(l) + " -> " : "";
|
|
1692
|
+
if (l.deadEnd && (o || (o = !0, l.restart(), b && console.log(c + this.stackID(l) + " (restarted)"), this.advanceFully(l, n))))
|
|
1693
|
+
continue;
|
|
1694
|
+
let u = l.split(), f = c;
|
|
1695
|
+
for (let d = 0; u.forceReduce() && d < 10 && (b && console.log(f + this.stackID(u) + " (via force-reduce)"), !this.advanceFully(u, n)); d++)
|
|
1696
|
+
b && (f = this.stackID(u) + " -> ");
|
|
1697
|
+
for (let d of l.recoverByInsert(a))
|
|
1698
|
+
b && console.log(c + this.stackID(d) + " (via recover-insert)"), this.advanceFully(d, n);
|
|
1699
|
+
this.stream.end > l.pos ? (h == l.pos && (h++, a = 0), l.recoverByDelete(a, h), b && console.log(c + this.stackID(l) + ` (via recover-delete ${this.parser.getName(a)})`), Ie(l, n)) : (!r || r.score < l.score) && (r = l);
|
|
1700
|
+
}
|
|
1701
|
+
return r;
|
|
1702
|
+
}
|
|
1703
|
+
// Convert the stack's buffer to a syntax tree.
|
|
1704
|
+
stackToTree(e) {
|
|
1705
|
+
return e.close(), X.build({
|
|
1706
|
+
buffer: Z.create(e),
|
|
1707
|
+
nodeSet: this.parser.nodeSet,
|
|
1708
|
+
topID: this.topTerm,
|
|
1709
|
+
maxBufferLength: this.parser.bufferLength,
|
|
1710
|
+
reused: this.reused,
|
|
1711
|
+
start: this.ranges[0].from,
|
|
1712
|
+
length: e.pos - this.ranges[0].from,
|
|
1713
|
+
minRepeatType: this.parser.minRepeatTerm
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1716
|
+
stackID(e) {
|
|
1717
|
+
let s = (oe || (oe = /* @__PURE__ */ new WeakMap())).get(e);
|
|
1718
|
+
return s || oe.set(e, s = String.fromCodePoint(this.nextStackID++)), s + e;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
function Ie(t, e) {
|
|
1722
|
+
for (let s = 0; s < e.length; s++) {
|
|
1723
|
+
let n = e[s];
|
|
1724
|
+
if (n.pos == t.pos && n.sameState(t)) {
|
|
1725
|
+
e[s].score < t.score && (e[s] = t);
|
|
1726
|
+
return;
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
e.push(t);
|
|
1730
|
+
}
|
|
1731
|
+
class Bn {
|
|
1732
|
+
constructor(e, s, n) {
|
|
1733
|
+
this.source = e, this.flags = s, this.disabled = n;
|
|
1734
|
+
}
|
|
1735
|
+
allows(e) {
|
|
1736
|
+
return !this.disabled || this.disabled[e] == 0;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
const ie = (t) => t;
|
|
1740
|
+
class Dn {
|
|
1741
|
+
/**
|
|
1742
|
+
Define a context tracker.
|
|
1743
|
+
*/
|
|
1744
|
+
constructor(e) {
|
|
1745
|
+
this.start = e.start, this.shift = e.shift || ie, this.reduce = e.reduce || ie, this.reuse = e.reuse || ie, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
class J extends Vt {
|
|
1749
|
+
/**
|
|
1750
|
+
@internal
|
|
1751
|
+
*/
|
|
1752
|
+
constructor(e) {
|
|
1753
|
+
if (super(), this.wrappers = [], e.version != 14)
|
|
1754
|
+
throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);
|
|
1755
|
+
let s = e.nodeNames.split(" ");
|
|
1756
|
+
this.minRepeatTerm = s.length;
|
|
1757
|
+
for (let l = 0; l < e.repeatNodeCount; l++)
|
|
1758
|
+
s.push("");
|
|
1759
|
+
let n = Object.keys(e.topRules).map((l) => e.topRules[l][1]), r = [];
|
|
1760
|
+
for (let l = 0; l < s.length; l++)
|
|
1761
|
+
r.push([]);
|
|
1762
|
+
function o(l, a, h) {
|
|
1763
|
+
r[l].push([a, a.deserialize(String(h))]);
|
|
1764
|
+
}
|
|
1765
|
+
if (e.nodeProps)
|
|
1766
|
+
for (let l of e.nodeProps) {
|
|
1767
|
+
let a = l[0];
|
|
1768
|
+
typeof a == "string" && (a = E[a]);
|
|
1769
|
+
for (let h = 1; h < l.length; ) {
|
|
1770
|
+
let c = l[h++];
|
|
1771
|
+
if (c >= 0)
|
|
1772
|
+
o(c, a, l[h++]);
|
|
1773
|
+
else {
|
|
1774
|
+
let u = l[h + -c];
|
|
1775
|
+
for (let f = -c; f > 0; f--)
|
|
1776
|
+
o(l[h++], a, u);
|
|
1777
|
+
h++;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
this.nodeSet = new Gt(s.map((l, a) => Qt.define({
|
|
1782
|
+
name: a >= this.minRepeatTerm ? void 0 : l,
|
|
1783
|
+
id: a,
|
|
1784
|
+
props: r[a],
|
|
1785
|
+
top: n.indexOf(a) > -1,
|
|
1786
|
+
error: a == 0,
|
|
1787
|
+
skipped: e.skippedNodes && e.skippedNodes.indexOf(a) > -1
|
|
1788
|
+
}))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = Xt;
|
|
1789
|
+
let i = Q(e.tokenData);
|
|
1790
|
+
this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
|
|
1791
|
+
for (let l = 0; l < this.specializerSpecs.length; l++)
|
|
1792
|
+
this.specialized[l] = this.specializerSpecs[l].term;
|
|
1793
|
+
this.specializers = this.specializerSpecs.map(Le), this.states = Q(e.states, Uint32Array), this.data = Q(e.stateData), this.goto = Q(e.goto), this.maxTerm = e.maxTerm, this.tokenizers = e.tokenizers.map((l) => typeof l == "number" ? new N(i, l) : l), this.topRules = e.topRules, this.dialects = e.dialects || {}, this.dynamicPrecedences = e.dynamicPrecedences || null, this.tokenPrecTable = e.tokenPrec, this.termNames = e.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
|
|
1794
|
+
}
|
|
1795
|
+
createParse(e, s, n) {
|
|
1796
|
+
let r = new wn(this, e, s, n);
|
|
1797
|
+
for (let o of this.wrappers)
|
|
1798
|
+
r = o(r, e, s, n);
|
|
1799
|
+
return r;
|
|
1800
|
+
}
|
|
1801
|
+
/**
|
|
1802
|
+
Get a goto table entry @internal
|
|
1803
|
+
*/
|
|
1804
|
+
getGoto(e, s, n = !1) {
|
|
1805
|
+
let r = this.goto;
|
|
1806
|
+
if (s >= r[0])
|
|
1807
|
+
return -1;
|
|
1808
|
+
for (let o = r[s + 1]; ; ) {
|
|
1809
|
+
let i = r[o++], l = i & 1, a = r[o++];
|
|
1810
|
+
if (l && n)
|
|
1811
|
+
return a;
|
|
1812
|
+
for (let h = o + (i >> 1); o < h; o++)
|
|
1813
|
+
if (r[o] == e)
|
|
1814
|
+
return a;
|
|
1815
|
+
if (l)
|
|
1816
|
+
return -1;
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
/**
|
|
1820
|
+
Check if this state has an action for a given terminal @internal
|
|
1821
|
+
*/
|
|
1822
|
+
hasAction(e, s) {
|
|
1823
|
+
let n = this.data;
|
|
1824
|
+
for (let r = 0; r < 2; r++)
|
|
1825
|
+
for (let o = this.stateSlot(
|
|
1826
|
+
e,
|
|
1827
|
+
r ? 2 : 1
|
|
1828
|
+
/* ParseState.Actions */
|
|
1829
|
+
), i; ; o += 3) {
|
|
1830
|
+
if ((i = n[o]) == 65535)
|
|
1831
|
+
if (n[o + 1] == 1)
|
|
1832
|
+
i = n[o = w(n, o + 2)];
|
|
1833
|
+
else {
|
|
1834
|
+
if (n[o + 1] == 2)
|
|
1835
|
+
return w(n, o + 2);
|
|
1836
|
+
break;
|
|
1837
|
+
}
|
|
1838
|
+
if (i == s || i == 0)
|
|
1839
|
+
return w(n, o + 1);
|
|
1840
|
+
}
|
|
1841
|
+
return 0;
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
@internal
|
|
1845
|
+
*/
|
|
1846
|
+
stateSlot(e, s) {
|
|
1847
|
+
return this.states[e * 6 + s];
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
@internal
|
|
1851
|
+
*/
|
|
1852
|
+
stateFlag(e, s) {
|
|
1853
|
+
return (this.stateSlot(
|
|
1854
|
+
e,
|
|
1855
|
+
0
|
|
1856
|
+
/* ParseState.Flags */
|
|
1857
|
+
) & s) > 0;
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
@internal
|
|
1861
|
+
*/
|
|
1862
|
+
validAction(e, s) {
|
|
1863
|
+
return !!this.allActions(e, (n) => n == s ? !0 : null);
|
|
1864
|
+
}
|
|
1865
|
+
/**
|
|
1866
|
+
@internal
|
|
1867
|
+
*/
|
|
1868
|
+
allActions(e, s) {
|
|
1869
|
+
let n = this.stateSlot(
|
|
1870
|
+
e,
|
|
1871
|
+
4
|
|
1872
|
+
/* ParseState.DefaultReduce */
|
|
1873
|
+
), r = n ? s(n) : void 0;
|
|
1874
|
+
for (let o = this.stateSlot(
|
|
1875
|
+
e,
|
|
1876
|
+
1
|
|
1877
|
+
/* ParseState.Actions */
|
|
1878
|
+
); r == null; o += 3) {
|
|
1879
|
+
if (this.data[o] == 65535)
|
|
1880
|
+
if (this.data[o + 1] == 1)
|
|
1881
|
+
o = w(this.data, o + 2);
|
|
1882
|
+
else
|
|
1883
|
+
break;
|
|
1884
|
+
r = s(w(this.data, o + 1));
|
|
1885
|
+
}
|
|
1886
|
+
return r;
|
|
1887
|
+
}
|
|
1888
|
+
/**
|
|
1889
|
+
Get the states that can follow this one through shift actions or
|
|
1890
|
+
goto jumps. @internal
|
|
1891
|
+
*/
|
|
1892
|
+
nextStates(e) {
|
|
1893
|
+
let s = [];
|
|
1894
|
+
for (let n = this.stateSlot(
|
|
1895
|
+
e,
|
|
1896
|
+
1
|
|
1897
|
+
/* ParseState.Actions */
|
|
1898
|
+
); ; n += 3) {
|
|
1899
|
+
if (this.data[n] == 65535)
|
|
1900
|
+
if (this.data[n + 1] == 1)
|
|
1901
|
+
n = w(this.data, n + 2);
|
|
1902
|
+
else
|
|
1903
|
+
break;
|
|
1904
|
+
if ((this.data[n + 2] & 1) == 0) {
|
|
1905
|
+
let r = this.data[n + 1];
|
|
1906
|
+
s.some((o, i) => i & 1 && o == r) || s.push(this.data[n], r);
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
return s;
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
Configure the parser. Returns a new parser instance that has the
|
|
1913
|
+
given settings modified. Settings not provided in `config` are
|
|
1914
|
+
kept from the original parser.
|
|
1915
|
+
*/
|
|
1916
|
+
configure(e) {
|
|
1917
|
+
let s = Object.assign(Object.create(J.prototype), this);
|
|
1918
|
+
if (e.props && (s.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
|
|
1919
|
+
let n = this.topRules[e.top];
|
|
1920
|
+
if (!n)
|
|
1921
|
+
throw new RangeError(`Invalid top rule name ${e.top}`);
|
|
1922
|
+
s.top = n;
|
|
1923
|
+
}
|
|
1924
|
+
return e.tokenizers && (s.tokenizers = this.tokenizers.map((n) => {
|
|
1925
|
+
let r = e.tokenizers.find((o) => o.from == n);
|
|
1926
|
+
return r ? r.to : n;
|
|
1927
|
+
})), e.specializers && (s.specializers = this.specializers.slice(), s.specializerSpecs = this.specializerSpecs.map((n, r) => {
|
|
1928
|
+
let o = e.specializers.find((l) => l.from == n.external);
|
|
1929
|
+
if (!o)
|
|
1930
|
+
return n;
|
|
1931
|
+
let i = Object.assign(Object.assign({}, n), { external: o.to });
|
|
1932
|
+
return s.specializers[r] = Le(i), i;
|
|
1933
|
+
})), e.contextTracker && (s.context = e.contextTracker), e.dialect && (s.dialect = this.parseDialect(e.dialect)), e.strict != null && (s.strict = e.strict), e.wrap && (s.wrappers = s.wrappers.concat(e.wrap)), e.bufferLength != null && (s.bufferLength = e.bufferLength), s;
|
|
1934
|
+
}
|
|
1935
|
+
/**
|
|
1936
|
+
Tells you whether any [parse wrappers](#lr.ParserConfig.wrap)
|
|
1937
|
+
are registered for this parser.
|
|
1938
|
+
*/
|
|
1939
|
+
hasWrappers() {
|
|
1940
|
+
return this.wrappers.length > 0;
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
Returns the name associated with a given term. This will only
|
|
1944
|
+
work for all terms when the parser was generated with the
|
|
1945
|
+
`--names` option. By default, only the names of tagged terms are
|
|
1946
|
+
stored.
|
|
1947
|
+
*/
|
|
1948
|
+
getName(e) {
|
|
1949
|
+
return this.termNames ? this.termNames[e] : String(e <= this.maxNode && this.nodeSet.types[e].name || e);
|
|
1950
|
+
}
|
|
1951
|
+
/**
|
|
1952
|
+
The eof term id is always allocated directly after the node
|
|
1953
|
+
types. @internal
|
|
1954
|
+
*/
|
|
1955
|
+
get eofTerm() {
|
|
1956
|
+
return this.maxNode + 1;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
The type of top node produced by the parser.
|
|
1960
|
+
*/
|
|
1961
|
+
get topNode() {
|
|
1962
|
+
return this.nodeSet.types[this.top[1]];
|
|
1963
|
+
}
|
|
1964
|
+
/**
|
|
1965
|
+
@internal
|
|
1966
|
+
*/
|
|
1967
|
+
dynamicPrecedence(e) {
|
|
1968
|
+
let s = this.dynamicPrecedences;
|
|
1969
|
+
return s == null ? 0 : s[e] || 0;
|
|
1970
|
+
}
|
|
1971
|
+
/**
|
|
1972
|
+
@internal
|
|
1973
|
+
*/
|
|
1974
|
+
parseDialect(e) {
|
|
1975
|
+
let s = Object.keys(this.dialects), n = s.map(() => !1);
|
|
1976
|
+
if (e)
|
|
1977
|
+
for (let o of e.split(" ")) {
|
|
1978
|
+
let i = s.indexOf(o);
|
|
1979
|
+
i >= 0 && (n[i] = !0);
|
|
1980
|
+
}
|
|
1981
|
+
let r = null;
|
|
1982
|
+
for (let o = 0; o < s.length; o++)
|
|
1983
|
+
if (!n[o])
|
|
1984
|
+
for (let i = this.dialects[s[o]], l; (l = this.data[i++]) != 65535; )
|
|
1985
|
+
(r || (r = new Uint8Array(this.maxTerm + 1)))[l] = 1;
|
|
1986
|
+
return new Bn(e, n, r);
|
|
1987
|
+
}
|
|
1988
|
+
/**
|
|
1989
|
+
Used by the output of the parser generator. Not available to
|
|
1990
|
+
user code. @hide
|
|
1991
|
+
*/
|
|
1992
|
+
static deserialize(e) {
|
|
1993
|
+
return new J(e);
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
function w(t, e) {
|
|
1997
|
+
return t[e] | t[e + 1] << 16;
|
|
1998
|
+
}
|
|
1999
|
+
function Rn(t) {
|
|
2000
|
+
let e = null;
|
|
2001
|
+
for (let s of t) {
|
|
2002
|
+
let n = s.p.stoppedAt;
|
|
2003
|
+
(s.pos == s.p.stream.end || n != null && s.pos > n) && s.p.parser.stateFlag(
|
|
2004
|
+
s.state,
|
|
2005
|
+
2
|
|
2006
|
+
/* StateFlag.Accepting */
|
|
2007
|
+
) && (!e || e.score < s.score) && (e = s);
|
|
2008
|
+
}
|
|
2009
|
+
return e;
|
|
2010
|
+
}
|
|
2011
|
+
function Le(t) {
|
|
2012
|
+
if (t.external) {
|
|
2013
|
+
let e = t.extend ? 1 : 0;
|
|
2014
|
+
return (s, n) => t.external(s, n) << 1 | e;
|
|
2015
|
+
}
|
|
2016
|
+
return t.get;
|
|
2017
|
+
}
|
|
2018
|
+
const Oe = 1, Nn = 2, En = 3, Wn = 4, In = 5, Ln = 36, Mn = 37, zn = 38, Vn = 11, Gn = 13;
|
|
2019
|
+
function Qn(t) {
|
|
2020
|
+
return t == 45 || t == 46 || t == 58 || t >= 65 && t <= 90 || t == 95 || t >= 97 && t <= 122 || t >= 161;
|
|
2021
|
+
}
|
|
2022
|
+
function Xn(t) {
|
|
2023
|
+
return t == 9 || t == 10 || t == 13 || t == 32;
|
|
2024
|
+
}
|
|
2025
|
+
let Me = null, ze = null, Ve = 0;
|
|
2026
|
+
function ge(t, e) {
|
|
2027
|
+
let s = t.pos + e;
|
|
2028
|
+
if (ze == t && Ve == s) return Me;
|
|
2029
|
+
for (; Xn(t.peek(e)); ) e++;
|
|
2030
|
+
let n = "";
|
|
2031
|
+
for (; ; ) {
|
|
2032
|
+
let r = t.peek(e);
|
|
2033
|
+
if (!Qn(r)) break;
|
|
2034
|
+
n += String.fromCharCode(r), e++;
|
|
2035
|
+
}
|
|
2036
|
+
return ze = t, Ve = s, Me = n || null;
|
|
2037
|
+
}
|
|
2038
|
+
function Ge(t, e) {
|
|
2039
|
+
this.name = t, this.parent = e;
|
|
2040
|
+
}
|
|
2041
|
+
const _n = new Dn({
|
|
2042
|
+
start: null,
|
|
2043
|
+
shift(t, e, s, n) {
|
|
2044
|
+
return e == Oe ? new Ge(ge(n, 1) || "", t) : t;
|
|
2045
|
+
},
|
|
2046
|
+
reduce(t, e) {
|
|
2047
|
+
return e == Vn && t ? t.parent : t;
|
|
2048
|
+
},
|
|
2049
|
+
reuse(t, e, s, n) {
|
|
2050
|
+
let r = e.type.id;
|
|
2051
|
+
return r == Oe || r == Gn ? new Ge(ge(n, 1) || "", t) : t;
|
|
2052
|
+
},
|
|
2053
|
+
strict: !1
|
|
2054
|
+
}), Un = new wt((t, e) => {
|
|
2055
|
+
if (t.next == 60) {
|
|
2056
|
+
if (t.advance(), t.next == 47) {
|
|
2057
|
+
t.advance();
|
|
2058
|
+
let s = ge(t, 0);
|
|
2059
|
+
if (!s) return t.acceptToken(In);
|
|
2060
|
+
if (e.context && s == e.context.name) return t.acceptToken(Nn);
|
|
2061
|
+
for (let n = e.context; n; n = n.parent) if (n.name == s) return t.acceptToken(En, -2);
|
|
2062
|
+
t.acceptToken(Wn);
|
|
2063
|
+
} else if (t.next != 33 && t.next != 63)
|
|
2064
|
+
return t.acceptToken(Oe);
|
|
2065
|
+
}
|
|
2066
|
+
}, { contextual: !0 });
|
|
2067
|
+
function Ce(t, e) {
|
|
2068
|
+
return new wt((s) => {
|
|
2069
|
+
let n = 0, r = e.charCodeAt(0);
|
|
2070
|
+
e: for (; !(s.next < 0); s.advance(), n++)
|
|
2071
|
+
if (s.next == r) {
|
|
2072
|
+
for (let o = 1; o < e.length; o++)
|
|
2073
|
+
if (s.peek(o) != e.charCodeAt(o)) continue e;
|
|
2074
|
+
break;
|
|
2075
|
+
}
|
|
2076
|
+
n && s.acceptToken(t);
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
const Fn = Ce(Ln, "-->"), jn = Ce(Mn, "?>"), Yn = Ce(zn, "]]>"), Zn = Ut({
|
|
2080
|
+
Text: S.content,
|
|
2081
|
+
"StartTag StartCloseTag EndTag SelfCloseEndTag": S.angleBracket,
|
|
2082
|
+
TagName: S.tagName,
|
|
2083
|
+
"MismatchedCloseTag/TagName": [S.tagName, S.invalid],
|
|
2084
|
+
AttributeName: S.attributeName,
|
|
2085
|
+
AttributeValue: S.attributeValue,
|
|
2086
|
+
Is: S.definitionOperator,
|
|
2087
|
+
"EntityReference CharacterReference": S.character,
|
|
2088
|
+
Comment: S.blockComment,
|
|
2089
|
+
ProcessingInst: S.processingInstruction,
|
|
2090
|
+
DoctypeDecl: S.documentMeta,
|
|
2091
|
+
Cdata: S.special(S.string)
|
|
2092
|
+
}), Jn = J.deserialize({
|
|
2093
|
+
version: 14,
|
|
2094
|
+
states: ",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",
|
|
2095
|
+
stateData: ")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",
|
|
2096
|
+
goto: "%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",
|
|
2097
|
+
nodeNames: "⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",
|
|
2098
|
+
maxTerm: 50,
|
|
2099
|
+
context: _n,
|
|
2100
|
+
nodeProps: [
|
|
2101
|
+
["closedBy", 1, "SelfCloseEndTag EndTag", 13, "CloseTag MissingCloseTag"],
|
|
2102
|
+
["openedBy", 12, "StartTag StartCloseTag", 19, "OpenTag", 20, "StartTag"],
|
|
2103
|
+
["isolate", -6, 13, 18, 19, 21, 22, 24, ""]
|
|
2104
|
+
],
|
|
2105
|
+
propSources: [Zn],
|
|
2106
|
+
skippedNodes: [0],
|
|
2107
|
+
repeatNodeCount: 9,
|
|
2108
|
+
tokenData: "!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",
|
|
2109
|
+
tokenizers: [Un, Fn, jn, Yn, 0, 1, 2, 3, 4],
|
|
2110
|
+
topRules: { Document: [0, 6] },
|
|
2111
|
+
tokenPrec: 0
|
|
2112
|
+
});
|
|
2113
|
+
function U(t, e) {
|
|
2114
|
+
let s = e && e.getChild("TagName");
|
|
2115
|
+
return s ? t.sliceString(s.from, s.to) : "";
|
|
2116
|
+
}
|
|
2117
|
+
function le(t, e) {
|
|
2118
|
+
let s = e && e.firstChild;
|
|
2119
|
+
return !s || s.name != "OpenTag" ? "" : U(t, s);
|
|
2120
|
+
}
|
|
2121
|
+
function Hn(t, e, s) {
|
|
2122
|
+
let n = e && e.getChildren("Attribute").find((o) => o.from <= s && o.to >= s), r = n && n.getChild("AttributeName");
|
|
2123
|
+
return r ? t.sliceString(r.from, r.to) : "";
|
|
2124
|
+
}
|
|
2125
|
+
function ae(t) {
|
|
2126
|
+
for (let e = t && t.parent; e; e = e.parent)
|
|
2127
|
+
if (e.name == "Element")
|
|
2128
|
+
return e;
|
|
2129
|
+
return null;
|
|
2130
|
+
}
|
|
2131
|
+
function Kn(t, e) {
|
|
2132
|
+
var s;
|
|
2133
|
+
let n = M(t).resolveInner(e, -1), r = null;
|
|
2134
|
+
for (let o = n; !r && o.parent; o = o.parent)
|
|
2135
|
+
(o.name == "OpenTag" || o.name == "CloseTag" || o.name == "SelfClosingTag" || o.name == "MismatchedCloseTag") && (r = o);
|
|
2136
|
+
if (r && (r.to > e || r.lastChild.type.isError)) {
|
|
2137
|
+
let o = r.parent;
|
|
2138
|
+
if (n.name == "TagName")
|
|
2139
|
+
return r.name == "CloseTag" || r.name == "MismatchedCloseTag" ? { type: "closeTag", from: n.from, context: o } : { type: "openTag", from: n.from, context: ae(o) };
|
|
2140
|
+
if (n.name == "AttributeName")
|
|
2141
|
+
return { type: "attrName", from: n.from, context: r };
|
|
2142
|
+
if (n.name == "AttributeValue")
|
|
2143
|
+
return { type: "attrValue", from: n.from, context: r };
|
|
2144
|
+
let i = n == r || n.name == "Attribute" ? n.childBefore(e) : n;
|
|
2145
|
+
return (i == null ? void 0 : i.name) == "StartTag" ? { type: "openTag", from: e, context: ae(o) } : (i == null ? void 0 : i.name) == "StartCloseTag" && i.to <= e ? { type: "closeTag", from: e, context: o } : (i == null ? void 0 : i.name) == "Is" ? { type: "attrValue", from: e, context: r } : i ? { type: "attrName", from: e, context: r } : null;
|
|
2146
|
+
} else if (n.name == "StartCloseTag")
|
|
2147
|
+
return { type: "closeTag", from: e, context: n.parent };
|
|
2148
|
+
for (; n.parent && n.to == e && !(!((s = n.lastChild) === null || s === void 0) && s.type.isError); )
|
|
2149
|
+
n = n.parent;
|
|
2150
|
+
return n.name == "Element" || n.name == "Text" || n.name == "Document" ? { type: "tag", from: e, context: n.name == "Element" ? n : ae(n) } : null;
|
|
2151
|
+
}
|
|
2152
|
+
class er {
|
|
2153
|
+
constructor(e, s, n) {
|
|
2154
|
+
this.attrs = s, this.attrValues = n, this.children = [], this.name = e.name, this.completion = Object.assign(Object.assign({ type: "type" }, e.completion || {}), { label: this.name }), this.openCompletion = Object.assign(Object.assign({}, this.completion), { label: "<" + this.name }), this.closeCompletion = Object.assign(Object.assign({}, this.completion), { label: "</" + this.name + ">", boost: 2 }), this.closeNameCompletion = Object.assign(Object.assign({}, this.completion), { label: this.name + ">" }), this.text = e.textContent ? e.textContent.map((r) => ({ label: r, type: "text" })) : [];
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
const he = /^[:\-\.\w\u00b7-\uffff]*$/;
|
|
2158
|
+
function Qe(t) {
|
|
2159
|
+
return Object.assign(Object.assign({ type: "property" }, t.completion || {}), { label: t.name });
|
|
2160
|
+
}
|
|
2161
|
+
function Xe(t) {
|
|
2162
|
+
return typeof t == "string" ? { label: `"${t}"`, type: "constant" } : /^"/.test(t.label) ? t : Object.assign(Object.assign({}, t), { label: `"${t.label}"` });
|
|
2163
|
+
}
|
|
2164
|
+
function tr(t, e) {
|
|
2165
|
+
let s = [], n = [], r = /* @__PURE__ */ Object.create(null);
|
|
2166
|
+
for (let a of e) {
|
|
2167
|
+
let h = Qe(a);
|
|
2168
|
+
s.push(h), a.global && n.push(h), a.values && (r[a.name] = a.values.map(Xe));
|
|
2169
|
+
}
|
|
2170
|
+
let o = [], i = [], l = /* @__PURE__ */ Object.create(null);
|
|
2171
|
+
for (let a of t) {
|
|
2172
|
+
let h = n, c = r;
|
|
2173
|
+
a.attributes && (h = h.concat(a.attributes.map((f) => typeof f == "string" ? s.find((d) => d.label == f) || { label: f, type: "property" } : (f.values && (c == r && (c = Object.create(c)), c[f.name] = f.values.map(Xe)), Qe(f)))));
|
|
2174
|
+
let u = new er(a, h, c);
|
|
2175
|
+
l[u.name] = u, o.push(u), a.top && i.push(u);
|
|
2176
|
+
}
|
|
2177
|
+
i.length || (i = o);
|
|
2178
|
+
for (let a = 0; a < o.length; a++) {
|
|
2179
|
+
let h = t[a], c = o[a];
|
|
2180
|
+
if (h.children)
|
|
2181
|
+
for (let u of h.children)
|
|
2182
|
+
l[u] && c.children.push(l[u]);
|
|
2183
|
+
else
|
|
2184
|
+
c.children = o;
|
|
2185
|
+
}
|
|
2186
|
+
return (a) => {
|
|
2187
|
+
var h;
|
|
2188
|
+
let { doc: c } = a.state, u = Kn(a.state, a.pos);
|
|
2189
|
+
if (!u || u.type == "tag" && !a.explicit)
|
|
2190
|
+
return null;
|
|
2191
|
+
let { type: f, from: d, context: p } = u;
|
|
2192
|
+
if (f == "openTag") {
|
|
2193
|
+
let m = i, g = le(c, p);
|
|
2194
|
+
if (g) {
|
|
2195
|
+
let x = l[g];
|
|
2196
|
+
m = (x == null ? void 0 : x.children) || o;
|
|
2197
|
+
}
|
|
2198
|
+
return {
|
|
2199
|
+
from: d,
|
|
2200
|
+
options: m.map((x) => x.completion),
|
|
2201
|
+
validFor: he
|
|
2202
|
+
};
|
|
2203
|
+
} else if (f == "closeTag") {
|
|
2204
|
+
let m = le(c, p);
|
|
2205
|
+
return m ? {
|
|
2206
|
+
from: d,
|
|
2207
|
+
to: a.pos + (c.sliceString(a.pos, a.pos + 1) == ">" ? 1 : 0),
|
|
2208
|
+
options: [((h = l[m]) === null || h === void 0 ? void 0 : h.closeNameCompletion) || { label: m + ">", type: "type" }],
|
|
2209
|
+
validFor: he
|
|
2210
|
+
} : null;
|
|
2211
|
+
} else if (f == "attrName") {
|
|
2212
|
+
let m = l[U(c, p)];
|
|
2213
|
+
return {
|
|
2214
|
+
from: d,
|
|
2215
|
+
options: (m == null ? void 0 : m.attrs) || n,
|
|
2216
|
+
validFor: he
|
|
2217
|
+
};
|
|
2218
|
+
} else if (f == "attrValue") {
|
|
2219
|
+
let m = Hn(c, p, d);
|
|
2220
|
+
if (!m)
|
|
2221
|
+
return null;
|
|
2222
|
+
let g = l[U(c, p)], x = ((g == null ? void 0 : g.attrValues) || r)[m];
|
|
2223
|
+
return !x || !x.length ? null : {
|
|
2224
|
+
from: d,
|
|
2225
|
+
to: a.pos + (c.sliceString(a.pos, a.pos + 1) == '"' ? 1 : 0),
|
|
2226
|
+
options: x,
|
|
2227
|
+
validFor: /^"[^"]*"?$/
|
|
2228
|
+
};
|
|
2229
|
+
} else if (f == "tag") {
|
|
2230
|
+
let m = le(c, p), g = l[m], x = [], B = p && p.lastChild;
|
|
2231
|
+
m && (!B || B.name != "CloseTag" || U(c, B) != m) && x.push(g ? g.closeCompletion : { label: "</" + m + ">", type: "type", boost: 2 });
|
|
2232
|
+
let se = x.concat(((g == null ? void 0 : g.children) || (p ? o : i)).map((V) => V.openCompletion));
|
|
2233
|
+
if (p && (g != null && g.text.length)) {
|
|
2234
|
+
let V = p.firstChild;
|
|
2235
|
+
V.to > a.pos - 20 && !/\S/.test(a.state.sliceDoc(V.to, a.pos)) && (se = se.concat(g.text));
|
|
2236
|
+
}
|
|
2237
|
+
return {
|
|
2238
|
+
from: d,
|
|
2239
|
+
options: se,
|
|
2240
|
+
validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
|
|
2241
|
+
};
|
|
2242
|
+
} else
|
|
2243
|
+
return null;
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
const xe = /* @__PURE__ */ Ft.define({
|
|
2247
|
+
name: "xml",
|
|
2248
|
+
parser: /* @__PURE__ */ Jn.configure({
|
|
2249
|
+
props: [
|
|
2250
|
+
/* @__PURE__ */ Yt.add({
|
|
2251
|
+
Element(t) {
|
|
2252
|
+
let e = /^\s*<\//.test(t.textAfter);
|
|
2253
|
+
return t.lineIndent(t.node.from) + (e ? 0 : t.unit);
|
|
2254
|
+
},
|
|
2255
|
+
"OpenTag CloseTag SelfClosingTag"(t) {
|
|
2256
|
+
return t.column(t.node.from) + t.unit;
|
|
2257
|
+
}
|
|
2258
|
+
}),
|
|
2259
|
+
/* @__PURE__ */ Zt.add({
|
|
2260
|
+
Element(t) {
|
|
2261
|
+
let e = t.firstChild, s = t.lastChild;
|
|
2262
|
+
return !e || e.name != "OpenTag" ? null : { from: e.to, to: s.name == "CloseTag" ? s.from : t.to };
|
|
2263
|
+
}
|
|
2264
|
+
}),
|
|
2265
|
+
/* @__PURE__ */ Jt.add({
|
|
2266
|
+
"OpenTag CloseTag": (t) => t.getChild("TagName")
|
|
2267
|
+
})
|
|
2268
|
+
]
|
|
2269
|
+
}),
|
|
2270
|
+
languageData: {
|
|
2271
|
+
commentTokens: { block: { open: "<!--", close: "-->" } },
|
|
2272
|
+
indentOnInput: /^\s*<\/$/
|
|
2273
|
+
}
|
|
2274
|
+
});
|
|
2275
|
+
function sr(t = {}) {
|
|
2276
|
+
let e = [xe.data.of({
|
|
2277
|
+
autocomplete: tr(t.elements || [], t.attributes || [])
|
|
2278
|
+
})];
|
|
2279
|
+
return t.autoCloseTags !== !1 && e.push(nr), new jt(xe, e);
|
|
2280
|
+
}
|
|
2281
|
+
function _e(t, e, s = t.length) {
|
|
2282
|
+
if (!e)
|
|
2283
|
+
return "";
|
|
2284
|
+
let n = e.firstChild, r = n && n.getChild("TagName");
|
|
2285
|
+
return r ? t.sliceString(r.from, Math.min(r.to, s)) : "";
|
|
2286
|
+
}
|
|
2287
|
+
const nr = /* @__PURE__ */ v.inputHandler.of((t, e, s, n, r) => {
|
|
2288
|
+
if (t.composing || t.state.readOnly || e != s || n != ">" && n != "/" || !xe.isActiveAt(t.state, e, -1))
|
|
2289
|
+
return !1;
|
|
2290
|
+
let o = r(), { state: i } = o, l = i.changeByRange((a) => {
|
|
2291
|
+
var h, c, u;
|
|
2292
|
+
let { head: f } = a, d = i.doc.sliceString(f - 1, f) == n, p = M(i).resolveInner(f, -1), m;
|
|
2293
|
+
if (d && n == ">" && p.name == "EndTag") {
|
|
2294
|
+
let g = p.parent;
|
|
2295
|
+
if (((c = (h = g.parent) === null || h === void 0 ? void 0 : h.lastChild) === null || c === void 0 ? void 0 : c.name) != "CloseTag" && (m = _e(i.doc, g.parent, f))) {
|
|
2296
|
+
let x = f + (i.doc.sliceString(f, f + 1) === ">" ? 1 : 0), B = `</${m}>`;
|
|
2297
|
+
return { range: a, changes: { from: f, to: x, insert: B } };
|
|
2298
|
+
}
|
|
2299
|
+
} else if (d && n == "/" && p.name == "StartCloseTag") {
|
|
2300
|
+
let g = p.parent;
|
|
2301
|
+
if (p.from == f - 2 && ((u = g.lastChild) === null || u === void 0 ? void 0 : u.name) != "CloseTag" && (m = _e(i.doc, g, f))) {
|
|
2302
|
+
let x = f + (i.doc.sliceString(f, f + 1) === ">" ? 1 : 0), B = `${m}>`;
|
|
2303
|
+
return {
|
|
2304
|
+
range: O.cursor(f + B.length, -1),
|
|
2305
|
+
changes: { from: f, to: x, insert: B }
|
|
2306
|
+
};
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
return { range: a };
|
|
2310
|
+
});
|
|
2311
|
+
return l.changes.empty ? !1 : (t.dispatch([
|
|
2312
|
+
o,
|
|
2313
|
+
i.update(l, {
|
|
2314
|
+
userEvent: "input.complete",
|
|
2315
|
+
scrollIntoView: !0
|
|
2316
|
+
})
|
|
2317
|
+
]), !0);
|
|
2318
|
+
}), rr = us.base, or = "code-editor", Bt = ({
|
|
2319
|
+
id: t,
|
|
2320
|
+
className: e,
|
|
2321
|
+
style: s,
|
|
2322
|
+
readOnly: n,
|
|
2323
|
+
height: r,
|
|
2324
|
+
gutterWidth: o,
|
|
2325
|
+
config: i,
|
|
2326
|
+
onChange: l,
|
|
2327
|
+
onBlur: a
|
|
2328
|
+
}) => {
|
|
2329
|
+
const h = Rt();
|
|
2330
|
+
return Nt(() => {
|
|
2331
|
+
const c = Te.create({
|
|
2332
|
+
doc: i,
|
|
2333
|
+
extensions: [
|
|
2334
|
+
Ht.highest(
|
|
2335
|
+
ve.of([
|
|
2336
|
+
{
|
|
2337
|
+
key: "Enter",
|
|
2338
|
+
run: (f) => me(f)
|
|
2339
|
+
}
|
|
2340
|
+
])
|
|
2341
|
+
),
|
|
2342
|
+
ve.of([
|
|
2343
|
+
bn,
|
|
2344
|
+
Cn,
|
|
2345
|
+
...ws
|
|
2346
|
+
]),
|
|
2347
|
+
Kt(),
|
|
2348
|
+
es(),
|
|
2349
|
+
ts(),
|
|
2350
|
+
ss(),
|
|
2351
|
+
ns(),
|
|
2352
|
+
rs(),
|
|
2353
|
+
os(),
|
|
2354
|
+
is(),
|
|
2355
|
+
ls(),
|
|
2356
|
+
as(),
|
|
2357
|
+
hs(),
|
|
2358
|
+
sr(),
|
|
2359
|
+
ys(),
|
|
2360
|
+
cs,
|
|
2361
|
+
Te.readOnly.of(n),
|
|
2362
|
+
v.updateListener.of((f) => {
|
|
2363
|
+
l(f);
|
|
2364
|
+
}),
|
|
2365
|
+
v.focusChangeEffect.of((f, d) => {
|
|
2366
|
+
d || a == null || a(f);
|
|
2367
|
+
}),
|
|
2368
|
+
v.domEventHandlers({
|
|
2369
|
+
keydown(f) {
|
|
2370
|
+
f.stopPropagation();
|
|
2371
|
+
}
|
|
2372
|
+
})
|
|
2373
|
+
]
|
|
2374
|
+
}), u = new v({
|
|
2375
|
+
state: c,
|
|
2376
|
+
parent: h.current
|
|
2377
|
+
});
|
|
2378
|
+
return () => {
|
|
2379
|
+
u.destroy();
|
|
2380
|
+
};
|
|
2381
|
+
}, [h]), /* @__PURE__ */ Dt(
|
|
2382
|
+
"div",
|
|
2383
|
+
{
|
|
2384
|
+
id: t,
|
|
2385
|
+
ref: h,
|
|
2386
|
+
className: [
|
|
2387
|
+
rr,
|
|
2388
|
+
or,
|
|
2389
|
+
e
|
|
2390
|
+
].filter((c) => c).join(" "),
|
|
2391
|
+
style: {
|
|
2392
|
+
"--height": r,
|
|
2393
|
+
"--gutter-width": o,
|
|
2394
|
+
...s
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
);
|
|
2398
|
+
};
|
|
2399
|
+
Bt.propTypes = {
|
|
2400
|
+
/**
|
|
2401
|
+
* The HTML id for this element
|
|
2402
|
+
*/
|
|
2403
|
+
id: $.string,
|
|
2404
|
+
/**
|
|
2405
|
+
* The HTML class names for this element
|
|
2406
|
+
*/
|
|
2407
|
+
className: $.string,
|
|
2408
|
+
/**
|
|
2409
|
+
* The React-written, css properties for this element.
|
|
2410
|
+
*/
|
|
2411
|
+
style: $.objectOf($.string),
|
|
2412
|
+
/**
|
|
2413
|
+
* Whether or not the content is read only.
|
|
2414
|
+
*/
|
|
2415
|
+
readOnly: $.bool,
|
|
2416
|
+
/**
|
|
2417
|
+
* The initial labeling configuration.
|
|
2418
|
+
*/
|
|
2419
|
+
config: $.string,
|
|
2420
|
+
/**
|
|
2421
|
+
* The height of the editor.
|
|
2422
|
+
*/
|
|
2423
|
+
height: $.string,
|
|
2424
|
+
/**
|
|
2425
|
+
* The callback for when the labeling configuration changes.
|
|
2426
|
+
*/
|
|
2427
|
+
onChange: $.func,
|
|
2428
|
+
/**
|
|
2429
|
+
* The width of the gutter.
|
|
2430
|
+
*/
|
|
2431
|
+
gutterWidth: $.string,
|
|
2432
|
+
/**
|
|
2433
|
+
* The callback for when the editor loses focus.
|
|
2434
|
+
*/
|
|
2435
|
+
onBlur: $.func
|
|
2436
|
+
};
|
|
2437
|
+
Bt.defaultProps = {
|
|
2438
|
+
config: `<View>
|
|
2439
|
+
<!--Edit this config to customize the labeling interface.-->
|
|
2440
|
+
</View>
|
|
2441
|
+
`,
|
|
2442
|
+
height: "20em",
|
|
2443
|
+
gutterWidth: "3em"
|
|
2444
|
+
};
|
|
2445
|
+
export {
|
|
2446
|
+
Bt as default
|
|
2447
|
+
};
|