@olddevs/ui 0.0.0-stage → 4.0.1
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/CHANGELOG.md +19 -0
- package/LICENSE +21 -0
- package/NOTICE +100 -0
- package/README.md +145 -2
- package/README.ru.md +146 -0
- package/dist/color.d.ts +22 -0
- package/dist/color.d.ts.map +1 -0
- package/dist/color.js +2 -0
- package/dist/color.js.map +1 -0
- package/dist/components/actions/Alert.d.ts +46 -0
- package/dist/components/actions/Alert.d.ts.map +1 -0
- package/dist/components/actions/Alert.js +20 -0
- package/dist/components/actions/Alert.js.map +1 -0
- package/dist/components/actions/Banner.d.ts +58 -0
- package/dist/components/actions/Banner.d.ts.map +1 -0
- package/dist/components/actions/Banner.js +20 -0
- package/dist/components/actions/Banner.js.map +1 -0
- package/dist/components/actions/Button.d.ts +79 -0
- package/dist/components/actions/Button.d.ts.map +1 -0
- package/dist/components/actions/Button.js +29 -0
- package/dist/components/actions/Button.js.map +1 -0
- package/dist/components/actions/ButtonGroup.d.ts +32 -0
- package/dist/components/actions/ButtonGroup.d.ts.map +1 -0
- package/dist/components/actions/ButtonGroup.js +10 -0
- package/dist/components/actions/ButtonGroup.js.map +1 -0
- package/dist/components/actions/Chip.d.ts +36 -0
- package/dist/components/actions/Chip.d.ts.map +1 -0
- package/dist/components/actions/Chip.js +16 -0
- package/dist/components/actions/Chip.js.map +1 -0
- package/dist/components/actions/CopyButton.d.ts +32 -0
- package/dist/components/actions/CopyButton.d.ts.map +1 -0
- package/dist/components/actions/CopyButton.js +41 -0
- package/dist/components/actions/CopyButton.js.map +1 -0
- package/dist/components/actions/Progress.d.ts +36 -0
- package/dist/components/actions/Progress.d.ts.map +1 -0
- package/dist/components/actions/Progress.js +14 -0
- package/dist/components/actions/Progress.js.map +1 -0
- package/dist/components/actions/Segmented.d.ts +64 -0
- package/dist/components/actions/Segmented.d.ts.map +1 -0
- package/dist/components/actions/Segmented.js +14 -0
- package/dist/components/actions/Segmented.js.map +1 -0
- package/dist/components/actions/Spinner.d.ts +46 -0
- package/dist/components/actions/Spinner.d.ts.map +1 -0
- package/dist/components/actions/Spinner.js +17 -0
- package/dist/components/actions/Spinner.js.map +1 -0
- package/dist/components/actions/SplitButton.d.ts +92 -0
- package/dist/components/actions/SplitButton.d.ts.map +1 -0
- package/dist/components/actions/SplitButton.js +21 -0
- package/dist/components/actions/SplitButton.js.map +1 -0
- package/dist/components/actions/StatusBadge.d.ts +26 -0
- package/dist/components/actions/StatusBadge.d.ts.map +1 -0
- package/dist/components/actions/StatusBadge.js +14 -0
- package/dist/components/actions/StatusBadge.js.map +1 -0
- package/dist/components/actions/Toaster.d.ts +83 -0
- package/dist/components/actions/Toaster.d.ts.map +1 -0
- package/dist/components/actions/Toaster.js +38 -0
- package/dist/components/actions/Toaster.js.map +1 -0
- package/dist/components/actions/Toggle.d.ts +75 -0
- package/dist/components/actions/Toggle.d.ts.map +1 -0
- package/dist/components/actions/Toggle.js +39 -0
- package/dist/components/actions/Toggle.js.map +1 -0
- package/dist/components/actions/ToggleGroup.d.ts +63 -0
- package/dist/components/actions/ToggleGroup.d.ts.map +1 -0
- package/dist/components/actions/ToggleGroup.js +30 -0
- package/dist/components/actions/ToggleGroup.js.map +1 -0
- package/dist/components/actions/Toolbar.d.ts +52 -0
- package/dist/components/actions/Toolbar.d.ts.map +1 -0
- package/dist/components/actions/Toolbar.js +98 -0
- package/dist/components/actions/Toolbar.js.map +1 -0
- package/dist/components/actions/Truncate.d.ts +31 -0
- package/dist/components/actions/Truncate.d.ts.map +1 -0
- package/dist/components/actions/Truncate.js +32 -0
- package/dist/components/actions/Truncate.js.map +1 -0
- package/dist/components/app-shell/AppShell.d.ts +106 -0
- package/dist/components/app-shell/AppShell.d.ts.map +1 -0
- package/dist/components/app-shell/AppShell.js +29 -0
- package/dist/components/app-shell/AppShell.js.map +1 -0
- package/dist/components/app-shell/MobileTabBar.d.ts +130 -0
- package/dist/components/app-shell/MobileTabBar.d.ts.map +1 -0
- package/dist/components/app-shell/MobileTabBar.js +50 -0
- package/dist/components/app-shell/MobileTabBar.js.map +1 -0
- package/dist/components/app-shell/NavItem.d.ts +72 -0
- package/dist/components/app-shell/NavItem.d.ts.map +1 -0
- package/dist/components/app-shell/NavItem.js +22 -0
- package/dist/components/app-shell/NavItem.js.map +1 -0
- package/dist/components/app-shell/SideNav.d.ts +65 -0
- package/dist/components/app-shell/SideNav.d.ts.map +1 -0
- package/dist/components/app-shell/SideNav.js +31 -0
- package/dist/components/app-shell/SideNav.js.map +1 -0
- package/dist/components/app-shell/SplitPanel.d.ts +121 -0
- package/dist/components/app-shell/SplitPanel.d.ts.map +1 -0
- package/dist/components/app-shell/SplitPanel.js +88 -0
- package/dist/components/app-shell/SplitPanel.js.map +1 -0
- package/dist/components/app-shell/TopBar.d.ts +43 -0
- package/dist/components/app-shell/TopBar.d.ts.map +1 -0
- package/dist/components/app-shell/TopBar.js +24 -0
- package/dist/components/app-shell/TopBar.js.map +1 -0
- package/dist/components/content/AspectRatio.d.ts +25 -0
- package/dist/components/content/AspectRatio.d.ts.map +1 -0
- package/dist/components/content/AspectRatio.js +7 -0
- package/dist/components/content/AspectRatio.js.map +1 -0
- package/dist/components/content/Avatar.d.ts +22 -0
- package/dist/components/content/Avatar.d.ts.map +1 -0
- package/dist/components/content/Avatar.js +23 -0
- package/dist/components/content/Avatar.js.map +1 -0
- package/dist/components/content/AvatarGroup.d.ts +42 -0
- package/dist/components/content/AvatarGroup.d.ts.map +1 -0
- package/dist/components/content/AvatarGroup.js +11 -0
- package/dist/components/content/AvatarGroup.js.map +1 -0
- package/dist/components/content/Badge.d.ts +41 -0
- package/dist/components/content/Badge.d.ts.map +1 -0
- package/dist/components/content/Badge.js +13 -0
- package/dist/components/content/Badge.js.map +1 -0
- package/dist/components/content/Card.d.ts +59 -0
- package/dist/components/content/Card.d.ts.map +1 -0
- package/dist/components/content/Card.js +20 -0
- package/dist/components/content/Card.js.map +1 -0
- package/dist/components/content/Carousel.d.ts +79 -0
- package/dist/components/content/Carousel.d.ts.map +1 -0
- package/dist/components/content/Carousel.js +172 -0
- package/dist/components/content/Carousel.js.map +1 -0
- package/dist/components/content/CodeView.d.ts +76 -0
- package/dist/components/content/CodeView.d.ts.map +1 -0
- package/dist/components/content/CodeView.js +12 -0
- package/dist/components/content/CodeView.js.map +1 -0
- package/dist/components/content/DescriptionList.d.ts +31 -0
- package/dist/components/content/DescriptionList.d.ts.map +1 -0
- package/dist/components/content/DescriptionList.js +10 -0
- package/dist/components/content/DescriptionList.js.map +1 -0
- package/dist/components/content/EditableList.d.ts +162 -0
- package/dist/components/content/EditableList.d.ts.map +1 -0
- package/dist/components/content/EditableList.js +241 -0
- package/dist/components/content/EditableList.js.map +1 -0
- package/dist/components/content/EmptyState.d.ts +31 -0
- package/dist/components/content/EmptyState.d.ts.map +1 -0
- package/dist/components/content/EmptyState.js +9 -0
- package/dist/components/content/EmptyState.js.map +1 -0
- package/dist/components/content/ErrorState.d.ts +52 -0
- package/dist/components/content/ErrorState.d.ts.map +1 -0
- package/dist/components/content/ErrorState.js +16 -0
- package/dist/components/content/ErrorState.js.map +1 -0
- package/dist/components/content/Grid.d.ts +57 -0
- package/dist/components/content/Grid.d.ts.map +1 -0
- package/dist/components/content/Grid.js +85 -0
- package/dist/components/content/Grid.js.map +1 -0
- package/dist/components/content/Heading.d.ts +43 -0
- package/dist/components/content/Heading.d.ts.map +1 -0
- package/dist/components/content/Heading.js +21 -0
- package/dist/components/content/Heading.js.map +1 -0
- package/dist/components/content/Image.d.ts +94 -0
- package/dist/components/content/Image.d.ts.map +1 -0
- package/dist/components/content/Image.js +41 -0
- package/dist/components/content/Image.js.map +1 -0
- package/dist/components/content/Kbd.d.ts +31 -0
- package/dist/components/content/Kbd.d.ts.map +1 -0
- package/dist/components/content/Kbd.js +13 -0
- package/dist/components/content/Kbd.js.map +1 -0
- package/dist/components/content/Keyboard.d.ts +32 -0
- package/dist/components/content/Keyboard.d.ts.map +1 -0
- package/dist/components/content/Keyboard.js +381 -0
- package/dist/components/content/Keyboard.js.map +1 -0
- package/dist/components/content/Link.d.ts +46 -0
- package/dist/components/content/Link.d.ts.map +1 -0
- package/dist/components/content/Link.js +38 -0
- package/dist/components/content/Link.js.map +1 -0
- package/dist/components/content/MediaCard.d.ts +56 -0
- package/dist/components/content/MediaCard.d.ts.map +1 -0
- package/dist/components/content/MediaCard.js +15 -0
- package/dist/components/content/MediaCard.js.map +1 -0
- package/dist/components/content/NotificationCenter.d.ts +68 -0
- package/dist/components/content/NotificationCenter.d.ts.map +1 -0
- package/dist/components/content/NotificationCenter.js +14 -0
- package/dist/components/content/NotificationCenter.js.map +1 -0
- package/dist/components/content/NotificationList.d.ts +111 -0
- package/dist/components/content/NotificationList.d.ts.map +1 -0
- package/dist/components/content/NotificationList.js +48 -0
- package/dist/components/content/NotificationList.js.map +1 -0
- package/dist/components/content/ScrollArea.d.ts +30 -0
- package/dist/components/content/ScrollArea.d.ts.map +1 -0
- package/dist/components/content/ScrollArea.js +7 -0
- package/dist/components/content/ScrollArea.js.map +1 -0
- package/dist/components/content/Separator.d.ts +19 -0
- package/dist/components/content/Separator.d.ts.map +1 -0
- package/dist/components/content/Separator.js +14 -0
- package/dist/components/content/Separator.js.map +1 -0
- package/dist/components/content/Skeleton.d.ts +24 -0
- package/dist/components/content/Skeleton.d.ts.map +1 -0
- package/dist/components/content/Skeleton.js +8 -0
- package/dist/components/content/Skeleton.js.map +1 -0
- package/dist/components/content/SortableList.d.ts +98 -0
- package/dist/components/content/SortableList.d.ts.map +1 -0
- package/dist/components/content/SortableList.js +46 -0
- package/dist/components/content/SortableList.js.map +1 -0
- package/dist/components/content/Stat.d.ts +46 -0
- package/dist/components/content/Stat.d.ts.map +1 -0
- package/dist/components/content/Stat.js +12 -0
- package/dist/components/content/Stat.js.map +1 -0
- package/dist/components/content/Table.d.ts +110 -0
- package/dist/components/content/Table.d.ts.map +1 -0
- package/dist/components/content/Table.js +66 -0
- package/dist/components/content/Table.js.map +1 -0
- package/dist/components/content/TagGroup.d.ts +120 -0
- package/dist/components/content/TagGroup.d.ts.map +1 -0
- package/dist/components/content/TagGroup.js +20 -0
- package/dist/components/content/TagGroup.js.map +1 -0
- package/dist/components/content/Text.d.ts +55 -0
- package/dist/components/content/Text.d.ts.map +1 -0
- package/dist/components/content/Text.js +27 -0
- package/dist/components/content/Text.js.map +1 -0
- package/dist/components/content/Timeline.d.ts +50 -0
- package/dist/components/content/Timeline.d.ts.map +1 -0
- package/dist/components/content/Timeline.js +15 -0
- package/dist/components/content/Timeline.js.map +1 -0
- package/dist/components/content/VirtualGrid.d.ts +171 -0
- package/dist/components/content/VirtualGrid.d.ts.map +1 -0
- package/dist/components/content/VirtualGrid.js +267 -0
- package/dist/components/content/VirtualGrid.js.map +1 -0
- package/dist/components/content/VisuallyHidden.d.ts +24 -0
- package/dist/components/content/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/content/VisuallyHidden.js +3 -0
- package/dist/components/content/VisuallyHidden.js.map +1 -0
- package/dist/components/content/keyboardEditing.d.ts +15 -0
- package/dist/components/content/keyboardEditing.d.ts.map +1 -0
- package/dist/components/content/keyboardEditing.js +28 -0
- package/dist/components/content/keyboardEditing.js.map +1 -0
- package/dist/components/content/useDragToSelect.d.ts +41 -0
- package/dist/components/content/useDragToSelect.d.ts.map +1 -0
- package/dist/components/content/useDragToSelect.js +190 -0
- package/dist/components/content/useDragToSelect.js.map +1 -0
- package/dist/components/date-time/Calendar.d.ts +67 -0
- package/dist/components/date-time/Calendar.d.ts.map +1 -0
- package/dist/components/date-time/Calendar.js +28 -0
- package/dist/components/date-time/Calendar.js.map +1 -0
- package/dist/components/date-time/DatePicker.d.ts +57 -0
- package/dist/components/date-time/DatePicker.d.ts.map +1 -0
- package/dist/components/date-time/DatePicker.js +37 -0
- package/dist/components/date-time/DatePicker.js.map +1 -0
- package/dist/components/date-time/DateRangePicker.d.ts +91 -0
- package/dist/components/date-time/DateRangePicker.d.ts.map +1 -0
- package/dist/components/date-time/DateRangePicker.js +72 -0
- package/dist/components/date-time/DateRangePicker.js.map +1 -0
- package/dist/components/date-time/DateTimePicker.d.ts +55 -0
- package/dist/components/date-time/DateTimePicker.d.ts.map +1 -0
- package/dist/components/date-time/DateTimePicker.js +9 -0
- package/dist/components/date-time/DateTimePicker.js.map +1 -0
- package/dist/components/date-time/RangeCalendar.d.ts +50 -0
- package/dist/components/date-time/RangeCalendar.d.ts.map +1 -0
- package/dist/components/date-time/RangeCalendar.js +17 -0
- package/dist/components/date-time/RangeCalendar.js.map +1 -0
- package/dist/components/date-time/TimePicker.d.ts +47 -0
- package/dist/components/date-time/TimePicker.d.ts.map +1 -0
- package/dist/components/date-time/TimePicker.js +148 -0
- package/dist/components/date-time/TimePicker.js.map +1 -0
- package/dist/components/inputs/Checkbox.d.ts +140 -0
- package/dist/components/inputs/Checkbox.d.ts.map +1 -0
- package/dist/components/inputs/Checkbox.js +29 -0
- package/dist/components/inputs/Checkbox.js.map +1 -0
- package/dist/components/inputs/CheckboxCard.d.ts +17 -0
- package/dist/components/inputs/CheckboxCard.d.ts.map +1 -0
- package/dist/components/inputs/CheckboxCard.js +25 -0
- package/dist/components/inputs/CheckboxCard.js.map +1 -0
- package/dist/components/inputs/CheckboxGroup.d.ts +68 -0
- package/dist/components/inputs/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/inputs/CheckboxGroup.js +14 -0
- package/dist/components/inputs/CheckboxGroup.js.map +1 -0
- package/dist/components/inputs/ChoiceCardBody.d.ts +16 -0
- package/dist/components/inputs/ChoiceCardBody.d.ts.map +1 -0
- package/dist/components/inputs/ChoiceCardBody.js +10 -0
- package/dist/components/inputs/ChoiceCardBody.js.map +1 -0
- package/dist/components/inputs/ColorPicker.d.ts +71 -0
- package/dist/components/inputs/ColorPicker.d.ts.map +1 -0
- package/dist/components/inputs/ColorPicker.js +30 -0
- package/dist/components/inputs/ColorPicker.js.map +1 -0
- package/dist/components/inputs/Combobox.d.ts +41 -0
- package/dist/components/inputs/Combobox.d.ts.map +1 -0
- package/dist/components/inputs/Combobox.js +16 -0
- package/dist/components/inputs/Combobox.js.map +1 -0
- package/dist/components/inputs/FileDropzone.d.ts +51 -0
- package/dist/components/inputs/FileDropzone.d.ts.map +1 -0
- package/dist/components/inputs/FileDropzone.js +75 -0
- package/dist/components/inputs/FileDropzone.js.map +1 -0
- package/dist/components/inputs/Form.d.ts +50 -0
- package/dist/components/inputs/Form.d.ts.map +1 -0
- package/dist/components/inputs/Form.js +14 -0
- package/dist/components/inputs/Form.js.map +1 -0
- package/dist/components/inputs/FormField.d.ts +89 -0
- package/dist/components/inputs/FormField.d.ts.map +1 -0
- package/dist/components/inputs/FormField.js +24 -0
- package/dist/components/inputs/FormField.js.map +1 -0
- package/dist/components/inputs/FormLayout.d.ts +47 -0
- package/dist/components/inputs/FormLayout.d.ts.map +1 -0
- package/dist/components/inputs/FormLayout.js +12 -0
- package/dist/components/inputs/FormLayout.js.map +1 -0
- package/dist/components/inputs/InlineEdit.d.ts +50 -0
- package/dist/components/inputs/InlineEdit.d.ts.map +1 -0
- package/dist/components/inputs/InlineEdit.js +70 -0
- package/dist/components/inputs/InlineEdit.js.map +1 -0
- package/dist/components/inputs/MaskedInput.d.ts +66 -0
- package/dist/components/inputs/MaskedInput.d.ts.map +1 -0
- package/dist/components/inputs/MaskedInput.js +73 -0
- package/dist/components/inputs/MaskedInput.js.map +1 -0
- package/dist/components/inputs/NumberInput.d.ts +53 -0
- package/dist/components/inputs/NumberInput.d.ts.map +1 -0
- package/dist/components/inputs/NumberInput.js +17 -0
- package/dist/components/inputs/NumberInput.js.map +1 -0
- package/dist/components/inputs/PasswordInput.d.ts +49 -0
- package/dist/components/inputs/PasswordInput.d.ts.map +1 -0
- package/dist/components/inputs/PasswordInput.js +49 -0
- package/dist/components/inputs/PasswordInput.js.map +1 -0
- package/dist/components/inputs/PhoneInput.d.ts +35 -0
- package/dist/components/inputs/PhoneInput.d.ts.map +1 -0
- package/dist/components/inputs/PhoneInput.js +9 -0
- package/dist/components/inputs/PhoneInput.js.map +1 -0
- package/dist/components/inputs/PinInput.d.ts +50 -0
- package/dist/components/inputs/PinInput.d.ts.map +1 -0
- package/dist/components/inputs/PinInput.js +67 -0
- package/dist/components/inputs/PinInput.js.map +1 -0
- package/dist/components/inputs/RadioGroup.d.ts +86 -0
- package/dist/components/inputs/RadioGroup.d.ts.map +1 -0
- package/dist/components/inputs/RadioGroup.js +51 -0
- package/dist/components/inputs/RadioGroup.js.map +1 -0
- package/dist/components/inputs/Rating.d.ts +69 -0
- package/dist/components/inputs/Rating.d.ts.map +1 -0
- package/dist/components/inputs/Rating.js +51 -0
- package/dist/components/inputs/Rating.js.map +1 -0
- package/dist/components/inputs/SearchControl.d.ts +85 -0
- package/dist/components/inputs/SearchControl.d.ts.map +1 -0
- package/dist/components/inputs/SearchControl.js +62 -0
- package/dist/components/inputs/SearchControl.js.map +1 -0
- package/dist/components/inputs/Select.d.ts +205 -0
- package/dist/components/inputs/Select.d.ts.map +1 -0
- package/dist/components/inputs/Select.js +136 -0
- package/dist/components/inputs/Select.js.map +1 -0
- package/dist/components/inputs/Slider.d.ts +59 -0
- package/dist/components/inputs/Slider.d.ts.map +1 -0
- package/dist/components/inputs/Slider.js +153 -0
- package/dist/components/inputs/Slider.js.map +1 -0
- package/dist/components/inputs/SwatchGroup.d.ts +101 -0
- package/dist/components/inputs/SwatchGroup.d.ts.map +1 -0
- package/dist/components/inputs/SwatchGroup.js +57 -0
- package/dist/components/inputs/SwatchGroup.js.map +1 -0
- package/dist/components/inputs/TagInput.d.ts +45 -0
- package/dist/components/inputs/TagInput.d.ts.map +1 -0
- package/dist/components/inputs/TagInput.js +56 -0
- package/dist/components/inputs/TagInput.js.map +1 -0
- package/dist/components/inputs/TextControl.d.ts +101 -0
- package/dist/components/inputs/TextControl.d.ts.map +1 -0
- package/dist/components/inputs/TextControl.js +31 -0
- package/dist/components/inputs/TextControl.js.map +1 -0
- package/dist/components/inputs/Transfer.d.ts +84 -0
- package/dist/components/inputs/Transfer.d.ts.map +1 -0
- package/dist/components/inputs/Transfer.js +112 -0
- package/dist/components/inputs/Transfer.js.map +1 -0
- package/dist/components/inputs/TreeSelect.d.ts +73 -0
- package/dist/components/inputs/TreeSelect.d.ts.map +1 -0
- package/dist/components/inputs/TreeSelect.js +60 -0
- package/dist/components/inputs/TreeSelect.js.map +1 -0
- package/dist/components/inputs/UploadQueue.d.ts +84 -0
- package/dist/components/inputs/UploadQueue.d.ts.map +1 -0
- package/dist/components/inputs/UploadQueue.js +30 -0
- package/dist/components/inputs/UploadQueue.js.map +1 -0
- package/dist/components/navigation/Accordion.d.ts +44 -0
- package/dist/components/navigation/Accordion.d.ts.map +1 -0
- package/dist/components/navigation/Accordion.js +12 -0
- package/dist/components/navigation/Accordion.js.map +1 -0
- package/dist/components/navigation/Breadcrumbs.d.ts +35 -0
- package/dist/components/navigation/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/navigation/Breadcrumbs.js +17 -0
- package/dist/components/navigation/Breadcrumbs.js.map +1 -0
- package/dist/components/navigation/ContextualSaveBar.d.ts +90 -0
- package/dist/components/navigation/ContextualSaveBar.d.ts.map +1 -0
- package/dist/components/navigation/ContextualSaveBar.js +20 -0
- package/dist/components/navigation/ContextualSaveBar.js.map +1 -0
- package/dist/components/navigation/PageHeader.d.ts +17 -0
- package/dist/components/navigation/PageHeader.d.ts.map +1 -0
- package/dist/components/navigation/PageHeader.js +8 -0
- package/dist/components/navigation/PageHeader.js.map +1 -0
- package/dist/components/navigation/Pagination.d.ts +44 -0
- package/dist/components/navigation/Pagination.d.ts.map +1 -0
- package/dist/components/navigation/Pagination.js +57 -0
- package/dist/components/navigation/Pagination.js.map +1 -0
- package/dist/components/navigation/SectionHeader.d.ts +32 -0
- package/dist/components/navigation/SectionHeader.d.ts.map +1 -0
- package/dist/components/navigation/SectionHeader.js +13 -0
- package/dist/components/navigation/SectionHeader.js.map +1 -0
- package/dist/components/navigation/SelectionBar.d.ts +65 -0
- package/dist/components/navigation/SelectionBar.d.ts.map +1 -0
- package/dist/components/navigation/SelectionBar.js +24 -0
- package/dist/components/navigation/SelectionBar.js.map +1 -0
- package/dist/components/navigation/Stepper.d.ts +45 -0
- package/dist/components/navigation/Stepper.d.ts.map +1 -0
- package/dist/components/navigation/Stepper.js +16 -0
- package/dist/components/navigation/Stepper.js.map +1 -0
- package/dist/components/navigation/Tabs.d.ts +45 -0
- package/dist/components/navigation/Tabs.d.ts.map +1 -0
- package/dist/components/navigation/Tabs.js +51 -0
- package/dist/components/navigation/Tabs.js.map +1 -0
- package/dist/components/navigation/TreeView.d.ts +101 -0
- package/dist/components/navigation/TreeView.d.ts.map +1 -0
- package/dist/components/navigation/TreeView.js +27 -0
- package/dist/components/navigation/TreeView.js.map +1 -0
- package/dist/components/overlays/CommandPalette.d.ts +115 -0
- package/dist/components/overlays/CommandPalette.d.ts.map +1 -0
- package/dist/components/overlays/CommandPalette.js +43 -0
- package/dist/components/overlays/CommandPalette.js.map +1 -0
- package/dist/components/overlays/ConfirmDialog.d.ts +67 -0
- package/dist/components/overlays/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/overlays/ConfirmDialog.js +47 -0
- package/dist/components/overlays/ConfirmDialog.js.map +1 -0
- package/dist/components/overlays/ContextMenu.d.ts +122 -0
- package/dist/components/overlays/ContextMenu.d.ts.map +1 -0
- package/dist/components/overlays/ContextMenu.js +39 -0
- package/dist/components/overlays/ContextMenu.js.map +1 -0
- package/dist/components/overlays/Dialog.d.ts +113 -0
- package/dist/components/overlays/Dialog.d.ts.map +1 -0
- package/dist/components/overlays/Dialog.js +43 -0
- package/dist/components/overlays/Dialog.js.map +1 -0
- package/dist/components/overlays/Drawer.d.ts +53 -0
- package/dist/components/overlays/Drawer.d.ts.map +1 -0
- package/dist/components/overlays/Drawer.js +32 -0
- package/dist/components/overlays/Drawer.js.map +1 -0
- package/dist/components/overlays/HelpTooltip.d.ts +41 -0
- package/dist/components/overlays/HelpTooltip.d.ts.map +1 -0
- package/dist/components/overlays/HelpTooltip.js +10 -0
- package/dist/components/overlays/HelpTooltip.js.map +1 -0
- package/dist/components/overlays/HoverCard.d.ts +62 -0
- package/dist/components/overlays/HoverCard.d.ts.map +1 -0
- package/dist/components/overlays/HoverCard.js +175 -0
- package/dist/components/overlays/HoverCard.js.map +1 -0
- package/dist/components/overlays/Menu.d.ts +113 -0
- package/dist/components/overlays/Menu.d.ts.map +1 -0
- package/dist/components/overlays/Menu.js +26 -0
- package/dist/components/overlays/Menu.js.map +1 -0
- package/dist/components/overlays/ModalHeader.d.ts +77 -0
- package/dist/components/overlays/ModalHeader.d.ts.map +1 -0
- package/dist/components/overlays/ModalHeader.js +11 -0
- package/dist/components/overlays/ModalHeader.js.map +1 -0
- package/dist/components/overlays/ModalOverlay.d.ts +45 -0
- package/dist/components/overlays/ModalOverlay.d.ts.map +1 -0
- package/dist/components/overlays/ModalOverlay.js +29 -0
- package/dist/components/overlays/ModalOverlay.js.map +1 -0
- package/dist/components/overlays/Popover.d.ts +56 -0
- package/dist/components/overlays/Popover.d.ts.map +1 -0
- package/dist/components/overlays/Popover.js +16 -0
- package/dist/components/overlays/Popover.js.map +1 -0
- package/dist/components/overlays/ShortcutsHelp.d.ts +70 -0
- package/dist/components/overlays/ShortcutsHelp.d.ts.map +1 -0
- package/dist/components/overlays/ShortcutsHelp.js +20 -0
- package/dist/components/overlays/ShortcutsHelp.js.map +1 -0
- package/dist/components/overlays/Tooltip.d.ts +35 -0
- package/dist/components/overlays/Tooltip.d.ts.map +1 -0
- package/dist/components/overlays/Tooltip.js +18 -0
- package/dist/components/overlays/Tooltip.js.map +1 -0
- package/dist/components/table/DataTable.d.ts +60 -0
- package/dist/components/table/DataTable.d.ts.map +1 -0
- package/dist/components/table/DataTable.js +20 -0
- package/dist/components/table/DataTable.js.map +1 -0
- package/dist/components/table/FilterBar.d.ts +35 -0
- package/dist/components/table/FilterBar.d.ts.map +1 -0
- package/dist/components/table/FilterBar.js +17 -0
- package/dist/components/table/FilterBar.js.map +1 -0
- package/dist/components/table/FilterBarAdd.d.ts +57 -0
- package/dist/components/table/FilterBarAdd.d.ts.map +1 -0
- package/dist/components/table/FilterBarAdd.js +83 -0
- package/dist/components/table/FilterBarAdd.js.map +1 -0
- package/dist/components/table/SavedViews.d.ts +83 -0
- package/dist/components/table/SavedViews.d.ts.map +1 -0
- package/dist/components/table/SavedViews.js +12 -0
- package/dist/components/table/SavedViews.js.map +1 -0
- package/dist/components/table/TablePreferences.d.ts +45 -0
- package/dist/components/table/TablePreferences.d.ts.map +1 -0
- package/dist/components/table/TablePreferences.js +41 -0
- package/dist/components/table/TablePreferences.js.map +1 -0
- package/dist/components/table/TableToolbar.d.ts +38 -0
- package/dist/components/table/TableToolbar.d.ts.map +1 -0
- package/dist/components/table/TableToolbar.js +11 -0
- package/dist/components/table/TableToolbar.js.map +1 -0
- package/dist/editor/RichTextEditor.d.ts +274 -0
- package/dist/editor/RichTextEditor.d.ts.map +1 -0
- package/dist/editor/RichTextEditor.js +671 -0
- package/dist/editor/RichTextEditor.js.map +1 -0
- package/dist/editor/RichTextView.d.ts +70 -0
- package/dist/editor/RichTextView.d.ts.map +1 -0
- package/dist/editor/RichTextView.js +24 -0
- package/dist/editor/RichTextView.js.map +1 -0
- package/dist/editor/core/atomText.d.ts +21 -0
- package/dist/editor/core/atomText.d.ts.map +1 -0
- package/dist/editor/core/atomText.js +77 -0
- package/dist/editor/core/atomText.js.map +1 -0
- package/dist/editor/core/blockCommands.d.ts +94 -0
- package/dist/editor/core/blockCommands.d.ts.map +1 -0
- package/dist/editor/core/blockCommands.js +188 -0
- package/dist/editor/core/blockCommands.js.map +1 -0
- package/dist/editor/core/blockTypes.d.ts +89 -0
- package/dist/editor/core/blockTypes.d.ts.map +1 -0
- package/dist/editor/core/blockTypes.js +121 -0
- package/dist/editor/core/blockTypes.js.map +1 -0
- package/dist/editor/core/containers.d.ts +43 -0
- package/dist/editor/core/containers.d.ts.map +1 -0
- package/dist/editor/core/containers.js +52 -0
- package/dist/editor/core/containers.js.map +1 -0
- package/dist/editor/core/customMarkdown.d.ts +8 -0
- package/dist/editor/core/customMarkdown.d.ts.map +1 -0
- package/dist/editor/core/customMarkdown.js +34 -0
- package/dist/editor/core/customMarkdown.js.map +1 -0
- package/dist/editor/core/customTool.d.ts +407 -0
- package/dist/editor/core/customTool.d.ts.map +1 -0
- package/dist/editor/core/customTool.js +31 -0
- package/dist/editor/core/customTool.js.map +1 -0
- package/dist/editor/core/customToolEngine.d.ts +31 -0
- package/dist/editor/core/customToolEngine.d.ts.map +1 -0
- package/dist/editor/core/customToolEngine.js +324 -0
- package/dist/editor/core/customToolEngine.js.map +1 -0
- package/dist/editor/core/document.d.ts +17 -0
- package/dist/editor/core/document.d.ts.map +1 -0
- package/dist/editor/core/document.js +11 -0
- package/dist/editor/core/document.js.map +1 -0
- package/dist/editor/core/emptiness.d.ts +18 -0
- package/dist/editor/core/emptiness.d.ts.map +1 -0
- package/dist/editor/core/emptiness.js +14 -0
- package/dist/editor/core/emptiness.js.map +1 -0
- package/dist/editor/core/extensions.d.ts +78 -0
- package/dist/editor/core/extensions.d.ts.map +1 -0
- package/dist/editor/core/extensions.js +134 -0
- package/dist/editor/core/extensions.js.map +1 -0
- package/dist/editor/core/fieldNotice.d.ts +48 -0
- package/dist/editor/core/fieldNotice.d.ts.map +1 -0
- package/dist/editor/core/fieldNotice.js +18 -0
- package/dist/editor/core/fieldNotice.js.map +1 -0
- package/dist/editor/core/handle.d.ts +110 -0
- package/dist/editor/core/handle.d.ts.map +1 -0
- package/dist/editor/core/handle.js +149 -0
- package/dist/editor/core/handle.js.map +1 -0
- package/dist/editor/core/insertItems.d.ts +147 -0
- package/dist/editor/core/insertItems.d.ts.map +1 -0
- package/dist/editor/core/insertItems.js +215 -0
- package/dist/editor/core/insertItems.js.map +1 -0
- package/dist/editor/core/jsonDocument.d.ts +42 -0
- package/dist/editor/core/jsonDocument.d.ts.map +1 -0
- package/dist/editor/core/jsonDocument.js +44 -0
- package/dist/editor/core/jsonDocument.js.map +1 -0
- package/dist/editor/core/markdown.d.ts +47 -0
- package/dist/editor/core/markdown.d.ts.map +1 -0
- package/dist/editor/core/markdown.js +169 -0
- package/dist/editor/core/markdown.js.map +1 -0
- package/dist/editor/core/maxLength.d.ts +43 -0
- package/dist/editor/core/maxLength.d.ts.map +1 -0
- package/dist/editor/core/maxLength.js +45 -0
- package/dist/editor/core/maxLength.js.map +1 -0
- package/dist/editor/core/pasteTrim.d.ts +8 -0
- package/dist/editor/core/pasteTrim.d.ts.map +1 -0
- package/dist/editor/core/pasteTrim.js +61 -0
- package/dist/editor/core/pasteTrim.js.map +1 -0
- package/dist/editor/core/schema.d.ts +479 -0
- package/dist/editor/core/schema.d.ts.map +1 -0
- package/dist/editor/core/schema.js +371 -0
- package/dist/editor/core/schema.js.map +1 -0
- package/dist/editor/core/schemaConform.d.ts +30 -0
- package/dist/editor/core/schemaConform.d.ts.map +1 -0
- package/dist/editor/core/schemaConform.js +72 -0
- package/dist/editor/core/schemaConform.js.map +1 -0
- package/dist/editor/core/shortcuts.d.ts +110 -0
- package/dist/editor/core/shortcuts.d.ts.map +1 -0
- package/dist/editor/core/shortcuts.js +299 -0
- package/dist/editor/core/shortcuts.js.map +1 -0
- package/dist/editor/core/skeleton.d.ts +11 -0
- package/dist/editor/core/skeleton.d.ts.map +1 -0
- package/dist/editor/core/skeleton.js +48 -0
- package/dist/editor/core/skeleton.js.map +1 -0
- package/dist/editor/core/slashCommand.d.ts +46 -0
- package/dist/editor/core/slashCommand.d.ts.map +1 -0
- package/dist/editor/core/slashCommand.js +67 -0
- package/dist/editor/core/slashCommand.js.map +1 -0
- package/dist/editor/core/sourceFormat.d.ts +30 -0
- package/dist/editor/core/sourceFormat.d.ts.map +1 -0
- package/dist/editor/core/sourceFormat.js +136 -0
- package/dist/editor/core/sourceFormat.js.map +1 -0
- package/dist/editor/core/toolButtons.d.ts +58 -0
- package/dist/editor/core/toolButtons.d.ts.map +1 -0
- package/dist/editor/core/toolButtons.js +64 -0
- package/dist/editor/core/toolButtons.js.map +1 -0
- package/dist/editor/core/toolDescriptor.d.ts +304 -0
- package/dist/editor/core/toolDescriptor.d.ts.map +1 -0
- package/dist/editor/core/toolDescriptor.js +29 -0
- package/dist/editor/core/toolDescriptor.js.map +1 -0
- package/dist/editor/core/toolEntryShortcuts.d.ts +20 -0
- package/dist/editor/core/toolEntryShortcuts.d.ts.map +1 -0
- package/dist/editor/core/toolEntryShortcuts.js +46 -0
- package/dist/editor/core/toolEntryShortcuts.js.map +1 -0
- package/dist/editor/core/toolLoader.d.ts +14 -0
- package/dist/editor/core/toolLoader.d.ts.map +1 -0
- package/dist/editor/core/toolLoader.js +20 -0
- package/dist/editor/core/toolLoader.js.map +1 -0
- package/dist/editor/core/tools.d.ts +90 -0
- package/dist/editor/core/tools.d.ts.map +1 -0
- package/dist/editor/core/tools.js +56 -0
- package/dist/editor/core/tools.js.map +1 -0
- package/dist/editor/core/viewIsland.d.ts +17 -0
- package/dist/editor/core/viewIsland.d.ts.map +1 -0
- package/dist/editor/core/viewIsland.js +4 -0
- package/dist/editor/core/viewIsland.js.map +1 -0
- package/dist/editor/features/builtins.d.ts +25 -0
- package/dist/editor/features/builtins.d.ts.map +1 -0
- package/dist/editor/features/builtins.js +88 -0
- package/dist/editor/features/builtins.js.map +1 -0
- package/dist/editor/features/code/CodeBlockView.d.ts +38 -0
- package/dist/editor/features/code/CodeBlockView.d.ts.map +1 -0
- package/dist/editor/features/code/CodeBlockView.js +98 -0
- package/dist/editor/features/code/CodeBlockView.js.map +1 -0
- package/dist/editor/features/code/CodeCopyButton.d.ts +20 -0
- package/dist/editor/features/code/CodeCopyButton.d.ts.map +1 -0
- package/dist/editor/features/code/CodeCopyButton.js +29 -0
- package/dist/editor/features/code/CodeCopyButton.js.map +1 -0
- package/dist/editor/features/code/CodeCopyIsland.d.ts +37 -0
- package/dist/editor/features/code/CodeCopyIsland.d.ts.map +1 -0
- package/dist/editor/features/code/CodeCopyIsland.js +21 -0
- package/dist/editor/features/code/CodeCopyIsland.js.map +1 -0
- package/dist/editor/features/code/codeBlock.d.ts +25 -0
- package/dist/editor/features/code/codeBlock.d.ts.map +1 -0
- package/dist/editor/features/code/codeBlock.js +116 -0
- package/dist/editor/features/code/codeBlock.js.map +1 -0
- package/dist/editor/features/code/codeBlockTool.d.ts +24 -0
- package/dist/editor/features/code/codeBlockTool.d.ts.map +1 -0
- package/dist/editor/features/code/codeBlockTool.js +66 -0
- package/dist/editor/features/code/codeBlockTool.js.map +1 -0
- package/dist/editor/features/code/codeHeader.d.ts +41 -0
- package/dist/editor/features/code/codeHeader.d.ts.map +1 -0
- package/dist/editor/features/code/codeHeader.js +25 -0
- package/dist/editor/features/code/codeHeader.js.map +1 -0
- package/dist/editor/features/code/codeLanguages.d.ts +76 -0
- package/dist/editor/features/code/codeLanguages.d.ts.map +1 -0
- package/dist/editor/features/code/codeLanguages.js +24 -0
- package/dist/editor/features/code/codeLanguages.js.map +1 -0
- package/dist/editor/features/code/highlight.d.ts +20 -0
- package/dist/editor/features/code/highlight.d.ts.map +1 -0
- package/dist/editor/features/code/highlight.js +51 -0
- package/dist/editor/features/code/highlight.js.map +1 -0
- package/dist/editor/features/code/highlightNodes.d.ts +31 -0
- package/dist/editor/features/code/highlightNodes.d.ts.map +1 -0
- package/dist/editor/features/code/highlightNodes.js +25 -0
- package/dist/editor/features/code/highlightNodes.js.map +1 -0
- package/dist/editor/features/code/lowlight.d.ts +20 -0
- package/dist/editor/features/code/lowlight.d.ts.map +1 -0
- package/dist/editor/features/code/lowlight.js +26 -0
- package/dist/editor/features/code/lowlight.js.map +1 -0
- package/dist/editor/features/color/CustomColorPopover.d.ts +40 -0
- package/dist/editor/features/color/CustomColorPopover.d.ts.map +1 -0
- package/dist/editor/features/color/CustomColorPopover.js +70 -0
- package/dist/editor/features/color/CustomColorPopover.js.map +1 -0
- package/dist/editor/features/color/contrast.d.ts +26 -0
- package/dist/editor/features/color/contrast.d.ts.map +1 -0
- package/dist/editor/features/color/contrast.js +27 -0
- package/dist/editor/features/color/contrast.js.map +1 -0
- package/dist/editor/features/color/customColor.d.ts +65 -0
- package/dist/editor/features/color/customColor.d.ts.map +1 -0
- package/dist/editor/features/color/customColor.js +29 -0
- package/dist/editor/features/color/customColor.js.map +1 -0
- package/dist/editor/features/color/styleExtensions.d.ts +28 -0
- package/dist/editor/features/color/styleExtensions.d.ts.map +1 -0
- package/dist/editor/features/color/styleExtensions.js +172 -0
- package/dist/editor/features/color/styleExtensions.js.map +1 -0
- package/dist/editor/features/emoji/EmojiGrid.d.ts +34 -0
- package/dist/editor/features/emoji/EmojiGrid.d.ts.map +1 -0
- package/dist/editor/features/emoji/EmojiGrid.js +71 -0
- package/dist/editor/features/emoji/EmojiGrid.js.map +1 -0
- package/dist/editor/features/emoji/emoji.d.ts +47 -0
- package/dist/editor/features/emoji/emoji.d.ts.map +1 -0
- package/dist/editor/features/emoji/emoji.js +108 -0
- package/dist/editor/features/emoji/emoji.js.map +1 -0
- package/dist/editor/features/emoji/emojiTool.d.ts +32 -0
- package/dist/editor/features/emoji/emojiTool.d.ts.map +1 -0
- package/dist/editor/features/emoji/emojiTool.js +34 -0
- package/dist/editor/features/emoji/emojiTool.js.map +1 -0
- package/dist/editor/features/image/ImagePopover.d.ts +29 -0
- package/dist/editor/features/image/ImagePopover.d.ts.map +1 -0
- package/dist/editor/features/image/ImagePopover.js +89 -0
- package/dist/editor/features/image/ImagePopover.js.map +1 -0
- package/dist/editor/features/image/ImageToolbar.d.ts +25 -0
- package/dist/editor/features/image/ImageToolbar.d.ts.map +1 -0
- package/dist/editor/features/image/ImageToolbar.js +49 -0
- package/dist/editor/features/image/ImageToolbar.js.map +1 -0
- package/dist/editor/features/image/image.d.ts +115 -0
- package/dist/editor/features/image/image.d.ts.map +1 -0
- package/dist/editor/features/image/image.js +539 -0
- package/dist/editor/features/image/image.js.map +1 -0
- package/dist/editor/features/image/imageNotice.d.ts +6 -0
- package/dist/editor/features/image/imageNotice.d.ts.map +1 -0
- package/dist/editor/features/image/imageNotice.js +16 -0
- package/dist/editor/features/image/imageNotice.js.map +1 -0
- package/dist/editor/features/layout/columnLayouts.d.ts +36 -0
- package/dist/editor/features/layout/columnLayouts.d.ts.map +1 -0
- package/dist/editor/features/layout/columnLayouts.js +33 -0
- package/dist/editor/features/layout/columnLayouts.js.map +1 -0
- package/dist/editor/features/layout/layout.d.ts +81 -0
- package/dist/editor/features/layout/layout.d.ts.map +1 -0
- package/dist/editor/features/layout/layout.js +318 -0
- package/dist/editor/features/layout/layout.js.map +1 -0
- package/dist/editor/features/link/LinkPopover.d.ts +21 -0
- package/dist/editor/features/link/LinkPopover.d.ts.map +1 -0
- package/dist/editor/features/link/LinkPopover.js +54 -0
- package/dist/editor/features/link/LinkPopover.js.map +1 -0
- package/dist/editor/features/link/link.d.ts +41 -0
- package/dist/editor/features/link/link.d.ts.map +1 -0
- package/dist/editor/features/link/link.js +66 -0
- package/dist/editor/features/link/link.js.map +1 -0
- package/dist/editor/features/link/linkTool.d.ts +13 -0
- package/dist/editor/features/link/linkTool.d.ts.map +1 -0
- package/dist/editor/features/link/linkTool.js +25 -0
- package/dist/editor/features/link/linkTool.js.map +1 -0
- package/dist/editor/features/search/SearchPanel.d.ts +31 -0
- package/dist/editor/features/search/SearchPanel.d.ts.map +1 -0
- package/dist/editor/features/search/SearchPanel.js +101 -0
- package/dist/editor/features/search/SearchPanel.js.map +1 -0
- package/dist/editor/features/search/revealMatch.d.ts +25 -0
- package/dist/editor/features/search/revealMatch.d.ts.map +1 -0
- package/dist/editor/features/search/revealMatch.js +41 -0
- package/dist/editor/features/search/revealMatch.js.map +1 -0
- package/dist/editor/features/search/searchMatch.d.ts +53 -0
- package/dist/editor/features/search/searchMatch.d.ts.map +1 -0
- package/dist/editor/features/search/searchMatch.js +67 -0
- package/dist/editor/features/search/searchMatch.js.map +1 -0
- package/dist/editor/features/search/searchPlugin.d.ts +48 -0
- package/dist/editor/features/search/searchPlugin.d.ts.map +1 -0
- package/dist/editor/features/search/searchPlugin.js +151 -0
- package/dist/editor/features/search/searchPlugin.js.map +1 -0
- package/dist/editor/features/search/searchTool.d.ts +13 -0
- package/dist/editor/features/search/searchTool.d.ts.map +1 -0
- package/dist/editor/features/search/searchTool.js +18 -0
- package/dist/editor/features/search/searchTool.js.map +1 -0
- package/dist/editor/features/table/TableInsertDialog.d.ts +29 -0
- package/dist/editor/features/table/TableInsertDialog.d.ts.map +1 -0
- package/dist/editor/features/table/TableInsertDialog.js +37 -0
- package/dist/editor/features/table/TableInsertDialog.js.map +1 -0
- package/dist/editor/features/table/TableMenuButton.d.ts +40 -0
- package/dist/editor/features/table/TableMenuButton.d.ts.map +1 -0
- package/dist/editor/features/table/TableMenuButton.js +97 -0
- package/dist/editor/features/table/TableMenuButton.js.map +1 -0
- package/dist/editor/features/table/TableSizeGrid.d.ts +60 -0
- package/dist/editor/features/table/TableSizeGrid.d.ts.map +1 -0
- package/dist/editor/features/table/TableSizeGrid.js +88 -0
- package/dist/editor/features/table/TableSizeGrid.js.map +1 -0
- package/dist/editor/features/table/tableActions.d.ts +110 -0
- package/dist/editor/features/table/tableActions.d.ts.map +1 -0
- package/dist/editor/features/table/tableActions.js +254 -0
- package/dist/editor/features/table/tableActions.js.map +1 -0
- package/dist/editor/features/table/tableCells.d.ts +41 -0
- package/dist/editor/features/table/tableCells.d.ts.map +1 -0
- package/dist/editor/features/table/tableCells.js +38 -0
- package/dist/editor/features/table/tableCells.js.map +1 -0
- package/dist/editor/features/table/tableChunk.d.ts +4 -0
- package/dist/editor/features/table/tableChunk.d.ts.map +1 -0
- package/dist/editor/features/table/tableChunk.js +5 -0
- package/dist/editor/features/table/tableChunk.js.map +1 -0
- package/dist/editor/features/table/tableTool.d.ts +22 -0
- package/dist/editor/features/table/tableTool.d.ts.map +1 -0
- package/dist/editor/features/table/tableTool.js +42 -0
- package/dist/editor/features/table/tableTool.js.map +1 -0
- package/dist/editor/features/table/tables.d.ts +79 -0
- package/dist/editor/features/table/tables.d.ts.map +1 -0
- package/dist/editor/features/table/tables.js +118 -0
- package/dist/editor/features/table/tables.js.map +1 -0
- package/dist/editor/features/wrapper/wrapper.d.ts +73 -0
- package/dist/editor/features/wrapper/wrapper.d.ts.map +1 -0
- package/dist/editor/features/wrapper/wrapper.js +198 -0
- package/dist/editor/features/wrapper/wrapper.js.map +1 -0
- package/dist/editor/features/wrapper/wrapperTones.d.ts +39 -0
- package/dist/editor/features/wrapper/wrapperTones.d.ts.map +1 -0
- package/dist/editor/features/wrapper/wrapperTones.js +19 -0
- package/dist/editor/features/wrapper/wrapperTones.js.map +1 -0
- package/dist/editor/highlight-entry.d.ts +24 -0
- package/dist/editor/highlight-entry.d.ts.map +1 -0
- package/dist/editor/highlight-entry.js +3 -0
- package/dist/editor/highlight-entry.js.map +1 -0
- package/dist/editor/hooks/useChangeThrottle.d.ts +24 -0
- package/dist/editor/hooks/useChangeThrottle.d.ts.map +1 -0
- package/dist/editor/hooks/useChangeThrottle.js +35 -0
- package/dist/editor/hooks/useChangeThrottle.js.map +1 -0
- package/dist/editor/hooks/useCoarsePointer.d.ts +17 -0
- package/dist/editor/hooks/useCoarsePointer.d.ts.map +1 -0
- package/dist/editor/hooks/useCoarsePointer.js +19 -0
- package/dist/editor/hooks/useCoarsePointer.js.map +1 -0
- package/dist/editor/hooks/useFieldsetDisabled.d.ts +22 -0
- package/dist/editor/hooks/useFieldsetDisabled.d.ts.map +1 -0
- package/dist/editor/hooks/useFieldsetDisabled.js +29 -0
- package/dist/editor/hooks/useFieldsetDisabled.js.map +1 -0
- package/dist/editor/hooks/useRichTextEditorState.d.ts +25 -0
- package/dist/editor/hooks/useRichTextEditorState.d.ts.map +1 -0
- package/dist/editor/hooks/useRichTextEditorState.js +17 -0
- package/dist/editor/hooks/useRichTextEditorState.js.map +1 -0
- package/dist/editor/hooks/useSubmenuPlacement.d.ts +19 -0
- package/dist/editor/hooks/useSubmenuPlacement.d.ts.map +1 -0
- package/dist/editor/hooks/useSubmenuPlacement.js +20 -0
- package/dist/editor/hooks/useSubmenuPlacement.js.map +1 -0
- package/dist/editor/index.d.ts +32 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +7 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/schema-entry.d.ts +29 -0
- package/dist/editor/schema-entry.d.ts.map +1 -0
- package/dist/editor/schema-entry.js +3 -0
- package/dist/editor/schema-entry.js.map +1 -0
- package/dist/editor/styles/codeTheme.d.ts +49 -0
- package/dist/editor/styles/codeTheme.d.ts.map +1 -0
- package/dist/editor/styles/codeTheme.js +11 -0
- package/dist/editor/styles/codeTheme.js.map +1 -0
- package/dist/editor/styles/glass.d.ts +40 -0
- package/dist/editor/styles/glass.d.ts.map +1 -0
- package/dist/editor/styles/glass.js +15 -0
- package/dist/editor/styles/glass.js.map +1 -0
- package/dist/editor/styles/palette.d.ts +181 -0
- package/dist/editor/styles/palette.d.ts.map +1 -0
- package/dist/editor/styles/palette.js +57 -0
- package/dist/editor/styles/palette.js.map +1 -0
- package/dist/editor/styles/prose.d.ts +56 -0
- package/dist/editor/styles/prose.d.ts.map +1 -0
- package/dist/editor/styles/prose.js +154 -0
- package/dist/editor/styles/prose.js.map +1 -0
- package/dist/editor/styles/surface.d.ts +22 -0
- package/dist/editor/styles/surface.d.ts.map +1 -0
- package/dist/editor/styles/surface.js +4 -0
- package/dist/editor/styles/surface.js.map +1 -0
- package/dist/editor/styles/tokens.d.ts +136 -0
- package/dist/editor/styles/tokens.d.ts.map +1 -0
- package/dist/editor/styles/tokens.js +38 -0
- package/dist/editor/styles/tokens.js.map +1 -0
- package/dist/editor/ui/BlockHandle.d.ts +40 -0
- package/dist/editor/ui/BlockHandle.d.ts.map +1 -0
- package/dist/editor/ui/BlockHandle.js +394 -0
- package/dist/editor/ui/BlockHandle.js.map +1 -0
- package/dist/editor/ui/BlockIsland.d.ts +3 -0
- package/dist/editor/ui/BlockIsland.d.ts.map +1 -0
- package/dist/editor/ui/BlockIsland.js +8 -0
- package/dist/editor/ui/BlockIsland.js.map +1 -0
- package/dist/editor/ui/BlockIslandSlots.d.ts +31 -0
- package/dist/editor/ui/BlockIslandSlots.d.ts.map +1 -0
- package/dist/editor/ui/BlockIslandSlots.js +61 -0
- package/dist/editor/ui/BlockIslandSlots.js.map +1 -0
- package/dist/editor/ui/ColorMenus.d.ts +18 -0
- package/dist/editor/ui/ColorMenus.d.ts.map +1 -0
- package/dist/editor/ui/ColorMenus.js +281 -0
- package/dist/editor/ui/ColorMenus.js.map +1 -0
- package/dist/editor/ui/EditorToolbar.d.ts +71 -0
- package/dist/editor/ui/EditorToolbar.d.ts.map +1 -0
- package/dist/editor/ui/EditorToolbar.js +197 -0
- package/dist/editor/ui/EditorToolbar.js.map +1 -0
- package/dist/editor/ui/FieldResizer.d.ts +22 -0
- package/dist/editor/ui/FieldResizer.d.ts.map +1 -0
- package/dist/editor/ui/FieldResizer.js +75 -0
- package/dist/editor/ui/FieldResizer.js.map +1 -0
- package/dist/editor/ui/FieldStatus.d.ts +32 -0
- package/dist/editor/ui/FieldStatus.d.ts.map +1 -0
- package/dist/editor/ui/FieldStatus.js +15 -0
- package/dist/editor/ui/FieldStatus.js.map +1 -0
- package/dist/editor/ui/FloatingToolbar.d.ts +32 -0
- package/dist/editor/ui/FloatingToolbar.d.ts.map +1 -0
- package/dist/editor/ui/FloatingToolbar.js +17 -0
- package/dist/editor/ui/FloatingToolbar.js.map +1 -0
- package/dist/editor/ui/FormatMenus.d.ts +210 -0
- package/dist/editor/ui/FormatMenus.d.ts.map +1 -0
- package/dist/editor/ui/FormatMenus.js +296 -0
- package/dist/editor/ui/FormatMenus.js.map +1 -0
- package/dist/editor/ui/InsertMenuButton.d.ts +25 -0
- package/dist/editor/ui/InsertMenuButton.d.ts.map +1 -0
- package/dist/editor/ui/InsertMenuButton.js +28 -0
- package/dist/editor/ui/InsertMenuButton.js.map +1 -0
- package/dist/editor/ui/SelectionBubble.d.ts +46 -0
- package/dist/editor/ui/SelectionBubble.d.ts.map +1 -0
- package/dist/editor/ui/SelectionBubble.js +90 -0
- package/dist/editor/ui/SelectionBubble.js.map +1 -0
- package/dist/editor/ui/ShortcutsButton.d.ts +29 -0
- package/dist/editor/ui/ShortcutsButton.d.ts.map +1 -0
- package/dist/editor/ui/ShortcutsButton.js +34 -0
- package/dist/editor/ui/ShortcutsButton.js.map +1 -0
- package/dist/editor/ui/SlashMenu.d.ts +42 -0
- package/dist/editor/ui/SlashMenu.d.ts.map +1 -0
- package/dist/editor/ui/SlashMenu.js +114 -0
- package/dist/editor/ui/SlashMenu.js.map +1 -0
- package/dist/editor/ui/SuggestionList.d.ts +60 -0
- package/dist/editor/ui/SuggestionList.d.ts.map +1 -0
- package/dist/editor/ui/SuggestionList.js +61 -0
- package/dist/editor/ui/SuggestionList.js.map +1 -0
- package/dist/editor/ui/TextCard.d.ts +20 -0
- package/dist/editor/ui/TextCard.d.ts.map +1 -0
- package/dist/editor/ui/TextCard.js +192 -0
- package/dist/editor/ui/TextCard.js.map +1 -0
- package/dist/editor/ui/ToolButtonView.d.ts +58 -0
- package/dist/editor/ui/ToolButtonView.d.ts.map +1 -0
- package/dist/editor/ui/ToolButtonView.js +86 -0
- package/dist/editor/ui/ToolButtonView.js.map +1 -0
- package/dist/editor/ui/TriggerMenu.d.ts +25 -0
- package/dist/editor/ui/TriggerMenu.d.ts.map +1 -0
- package/dist/editor/ui/TriggerMenu.js +180 -0
- package/dist/editor/ui/TriggerMenu.js.map +1 -0
- package/dist/editor/ui/focusWithin.d.ts +22 -0
- package/dist/editor/ui/focusWithin.d.ts.map +1 -0
- package/dist/editor/ui/focusWithin.js +5 -0
- package/dist/editor/ui/focusWithin.js.map +1 -0
- package/dist/editor/ui/lockableMenu.d.ts +28 -0
- package/dist/editor/ui/lockableMenu.d.ts.map +1 -0
- package/dist/editor/ui/lockableMenu.js +17 -0
- package/dist/editor/ui/lockableMenu.js.map +1 -0
- package/dist/editor/ui/rowMarks.d.ts +21 -0
- package/dist/editor/ui/rowMarks.d.ts.map +1 -0
- package/dist/editor/ui/rowMarks.js +35 -0
- package/dist/editor/ui/rowMarks.js.map +1 -0
- package/dist/editor/ui/selectionMenu.d.ts +61 -0
- package/dist/editor/ui/selectionMenu.d.ts.map +1 -0
- package/dist/editor/ui/selectionMenu.js +32 -0
- package/dist/editor/ui/selectionMenu.js.map +1 -0
- package/dist/hooks/useFieldDescription.d.ts +45 -0
- package/dist/hooks/useFieldDescription.d.ts.map +1 -0
- package/dist/hooks/useFieldDescription.js +23 -0
- package/dist/hooks/useFieldDescription.js.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +25 -0
- package/dist/hooks/useMediaQuery.d.ts.map +1 -0
- package/dist/hooks/useMediaQuery.js +14 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/useOpenerFocus.d.ts +10 -0
- package/dist/hooks/useOpenerFocus.d.ts.map +1 -0
- package/dist/hooks/useOpenerFocus.js +35 -0
- package/dist/hooks/useOpenerFocus.js.map +1 -0
- package/dist/hooks/useOverlayLayer.d.ts +23 -0
- package/dist/hooks/useOverlayLayer.d.ts.map +1 -0
- package/dist/hooks/useOverlayLayer.js +19 -0
- package/dist/hooks/useOverlayLayer.js.map +1 -0
- package/dist/hooks/useScrollLock.d.ts +3 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -0
- package/dist/hooks/useScrollLock.js +52 -0
- package/dist/hooks/useScrollLock.js.map +1 -0
- package/dist/hooks/useStickyOffset.d.ts +53 -0
- package/dist/hooks/useStickyOffset.d.ts.map +1 -0
- package/dist/hooks/useStickyOffset.js +91 -0
- package/dist/hooks/useStickyOffset.js.map +1 -0
- package/dist/hooks/useTableState.d.ts +35 -0
- package/dist/hooks/useTableState.d.ts.map +1 -0
- package/dist/hooks/useTableState.js +23 -0
- package/dist/hooks/useTableState.js.map +1 -0
- package/dist/i18n/UiProvider.d.ts +53 -0
- package/dist/i18n/UiProvider.d.ts.map +1 -0
- package/dist/i18n/UiProvider.js +63 -0
- package/dist/i18n/UiProvider.js.map +1 -0
- package/dist/i18n/context.d.ts +26 -0
- package/dist/i18n/context.d.ts.map +1 -0
- package/dist/i18n/context.js +4 -0
- package/dist/i18n/context.js.map +1 -0
- package/dist/i18n/defaults.d.ts +19 -0
- package/dist/i18n/defaults.d.ts.map +1 -0
- package/dist/i18n/defaults.js +574 -0
- package/dist/i18n/defaults.js.map +1 -0
- package/dist/i18n/messages.d.ts +1178 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +2 -0
- package/dist/i18n/messages.js.map +1 -0
- package/dist/i18n/useMessages.d.ts +26 -0
- package/dist/i18n/useMessages.d.ts.map +1 -0
- package/dist/i18n/useMessages.js +22 -0
- package/dist/i18n/useMessages.js.map +1 -0
- package/dist/icons.d.ts +437 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +2 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +250 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/accessible-name.d.ts +34 -0
- package/dist/lib/accessible-name.d.ts.map +1 -0
- package/dist/lib/accessible-name.js +2 -0
- package/dist/lib/accessible-name.js.map +1 -0
- package/dist/lib/bottom-bar-slot.d.ts +24 -0
- package/dist/lib/bottom-bar-slot.d.ts.map +1 -0
- package/dist/lib/bottom-bar-slot.js +4 -0
- package/dist/lib/bottom-bar-slot.js.map +1 -0
- package/dist/lib/button.d.ts +36 -0
- package/dist/lib/button.d.ts.map +1 -0
- package/dist/lib/button.js +35 -0
- package/dist/lib/button.js.map +1 -0
- package/dist/lib/choice-card.d.ts +64 -0
- package/dist/lib/choice-card.d.ts.map +1 -0
- package/dist/lib/choice-card.js +15 -0
- package/dist/lib/choice-card.js.map +1 -0
- package/dist/lib/clamp.d.ts +17 -0
- package/dist/lib/clamp.d.ts.map +1 -0
- package/dist/lib/clamp.js +4 -0
- package/dist/lib/clamp.js.map +1 -0
- package/dist/lib/cn.d.ts +12 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +14 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/date.d.ts +61 -0
- package/dist/lib/date.d.ts.map +1 -0
- package/dist/lib/date.js +30 -0
- package/dist/lib/date.js.map +1 -0
- package/dist/lib/dev-warn.d.ts +26 -0
- package/dist/lib/dev-warn.d.ts.map +1 -0
- package/dist/lib/dev-warn.js +28 -0
- package/dist/lib/dev-warn.js.map +1 -0
- package/dist/lib/empty.d.ts +35 -0
- package/dist/lib/empty.d.ts.map +1 -0
- package/dist/lib/empty.js +11 -0
- package/dist/lib/empty.js.map +1 -0
- package/dist/lib/field.d.ts +105 -0
- package/dist/lib/field.d.ts.map +1 -0
- package/dist/lib/field.js +18 -0
- package/dist/lib/field.js.map +1 -0
- package/dist/lib/filter-range.d.ts +24 -0
- package/dist/lib/filter-range.d.ts.map +1 -0
- package/dist/lib/filter-range.js +27 -0
- package/dist/lib/filter-range.js.map +1 -0
- package/dist/lib/interaction-modality.d.ts +40 -0
- package/dist/lib/interaction-modality.d.ts.map +1 -0
- package/dist/lib/interaction-modality.js +60 -0
- package/dist/lib/interaction-modality.js.map +1 -0
- package/dist/lib/mask.d.ts +94 -0
- package/dist/lib/mask.d.ts.map +1 -0
- package/dist/lib/mask.js +114 -0
- package/dist/lib/mask.js.map +1 -0
- package/dist/lib/menu.d.ts +85 -0
- package/dist/lib/menu.d.ts.map +1 -0
- package/dist/lib/menu.js +33 -0
- package/dist/lib/menu.js.map +1 -0
- package/dist/lib/overlay-layer.d.ts +101 -0
- package/dist/lib/overlay-layer.d.ts.map +1 -0
- package/dist/lib/overlay-layer.js +40 -0
- package/dist/lib/overlay-layer.js.map +1 -0
- package/dist/lib/period.d.ts +82 -0
- package/dist/lib/period.d.ts.map +1 -0
- package/dist/lib/period.js +58 -0
- package/dist/lib/period.js.map +1 -0
- package/dist/lib/progress-status.d.ts +38 -0
- package/dist/lib/progress-status.d.ts.map +1 -0
- package/dist/lib/progress-status.js +7 -0
- package/dist/lib/progress-status.js.map +1 -0
- package/dist/lib/published-height.d.ts +16 -0
- package/dist/lib/published-height.d.ts.map +1 -0
- package/dist/lib/published-height.js +72 -0
- package/dist/lib/published-height.js.map +1 -0
- package/dist/lib/reorder.d.ts +44 -0
- package/dist/lib/reorder.d.ts.map +1 -0
- package/dist/lib/reorder.js +22 -0
- package/dist/lib/reorder.js.map +1 -0
- package/dist/lib/responsive.d.ts +51 -0
- package/dist/lib/responsive.d.ts.map +1 -0
- package/dist/lib/responsive.js +12 -0
- package/dist/lib/responsive.js.map +1 -0
- package/dist/lib/state.d.ts +25 -0
- package/dist/lib/state.d.ts.map +1 -0
- package/dist/lib/state.js +21 -0
- package/dist/lib/state.js.map +1 -0
- package/dist/lib/table-state.d.ts +105 -0
- package/dist/lib/table-state.d.ts.map +1 -0
- package/dist/lib/table-state.js +121 -0
- package/dist/lib/table-state.js.map +1 -0
- package/dist/lib/tag.d.ts +25 -0
- package/dist/lib/tag.d.ts.map +1 -0
- package/dist/lib/tag.js +6 -0
- package/dist/lib/tag.js.map +1 -0
- package/dist/lib/themes.d.ts +54 -0
- package/dist/lib/themes.d.ts.map +1 -0
- package/dist/lib/themes.js +40 -0
- package/dist/lib/themes.js.map +1 -0
- package/dist/lib/time.d.ts +35 -0
- package/dist/lib/time.d.ts.map +1 -0
- package/dist/lib/time.js +68 -0
- package/dist/lib/time.js.map +1 -0
- package/dist/lib/toolbar-axis.d.ts +17 -0
- package/dist/lib/toolbar-axis.d.ts.map +1 -0
- package/dist/lib/toolbar-axis.js +10 -0
- package/dist/lib/toolbar-axis.js.map +1 -0
- package/dist/lib/touch.d.ts +16 -0
- package/dist/lib/touch.d.ts.map +1 -0
- package/dist/lib/touch.js +2 -0
- package/dist/lib/touch.js.map +1 -0
- package/dist/lib/variants.d.ts +204 -0
- package/dist/lib/variants.d.ts.map +1 -0
- package/dist/lib/variants.js +127 -0
- package/dist/lib/variants.js.map +1 -0
- package/dist/locales/en.d.ts +11 -0
- package/dist/locales/en.d.ts.map +1 -0
- package/dist/locales/en.js +3 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/locales/ru.d.ts +5 -0
- package/dist/locales/ru.d.ts.map +1 -0
- package/dist/locales/ru.js +591 -0
- package/dist/locales/ru.js.map +1 -0
- package/docs/accessibility.en.md +79 -0
- package/docs/accessibility.md +73 -0
- package/docs/api/editor-extension.en.md +309 -0
- package/docs/api/editor-extension.md +308 -0
- package/docs/api/messages.md +750 -0
- package/docs/api/migration-notes.en.md +885 -0
- package/docs/api/migration-notes.md +890 -0
- package/docs/api/utilities.md +252 -0
- package/docs/component-selection.en.md +48 -0
- package/docs/component-selection.md +44 -0
- package/docs/components/actions/button.en.md +59 -0
- package/docs/components/actions/button.md +58 -0
- package/docs/components/actions/chip.en.md +47 -0
- package/docs/components/actions/chip.md +46 -0
- package/docs/components/actions/copy-and-truncate.en.md +98 -0
- package/docs/components/actions/copy-and-truncate.md +96 -0
- package/docs/components/actions/feedback.en.md +69 -0
- package/docs/components/actions/feedback.md +68 -0
- package/docs/components/actions/split-button.en.md +76 -0
- package/docs/components/actions/split-button.md +75 -0
- package/docs/components/actions/toggles.en.md +139 -0
- package/docs/components/actions/toggles.md +136 -0
- package/docs/components/actions/toolbar.en.md +197 -0
- package/docs/components/actions/toolbar.md +192 -0
- package/docs/components/app-shell/app-shell.en.md +172 -0
- package/docs/components/app-shell/app-shell.md +172 -0
- package/docs/components/app-shell/mobile-tab-bar.en.md +207 -0
- package/docs/components/app-shell/mobile-tab-bar.md +210 -0
- package/docs/components/app-shell/side-nav.en.md +153 -0
- package/docs/components/app-shell/side-nav.md +152 -0
- package/docs/components/app-shell/split-panel.en.md +148 -0
- package/docs/components/app-shell/split-panel.md +147 -0
- package/docs/components/app-shell/top-bar.en.md +103 -0
- package/docs/components/app-shell/top-bar.md +100 -0
- package/docs/components/content/avatar.en.md +123 -0
- package/docs/components/content/avatar.md +119 -0
- package/docs/components/content/card.en.md +123 -0
- package/docs/components/content/card.md +122 -0
- package/docs/components/content/carousel.en.md +236 -0
- package/docs/components/content/carousel.md +227 -0
- package/docs/components/content/code-view.en.md +177 -0
- package/docs/components/content/code-view.md +172 -0
- package/docs/components/content/data-display.en.md +205 -0
- package/docs/components/content/data-display.md +212 -0
- package/docs/components/content/editable-list.en.md +437 -0
- package/docs/components/content/editable-list.md +418 -0
- package/docs/components/content/empty-and-loading.en.md +149 -0
- package/docs/components/content/empty-and-loading.md +149 -0
- package/docs/components/content/grid.en.md +148 -0
- package/docs/components/content/grid.md +142 -0
- package/docs/components/content/image.en.md +115 -0
- package/docs/components/content/image.md +114 -0
- package/docs/components/content/keyboard.en.md +129 -0
- package/docs/components/content/keyboard.md +129 -0
- package/docs/components/content/layout-primitives.en.md +105 -0
- package/docs/components/content/layout-primitives.md +104 -0
- package/docs/components/content/media-card.en.md +137 -0
- package/docs/components/content/media-card.md +132 -0
- package/docs/components/content/notifications.en.md +216 -0
- package/docs/components/content/notifications.md +207 -0
- package/docs/components/content/rich-text-view.en.md +325 -0
- package/docs/components/content/rich-text-view.md +324 -0
- package/docs/components/content/sortable-list.en.md +212 -0
- package/docs/components/content/sortable-list.md +206 -0
- package/docs/components/content/tag-group.en.md +158 -0
- package/docs/components/content/tag-group.md +151 -0
- package/docs/components/content/timeline.en.md +77 -0
- package/docs/components/content/timeline.md +76 -0
- package/docs/components/content/typography.en.md +152 -0
- package/docs/components/content/typography.md +146 -0
- package/docs/components/content/virtual-grid.en.md +305 -0
- package/docs/components/content/virtual-grid.md +315 -0
- package/docs/components/date-time/calendar.en.md +47 -0
- package/docs/components/date-time/calendar.md +46 -0
- package/docs/components/date-time/date-picker.en.md +52 -0
- package/docs/components/date-time/date-picker.md +50 -0
- package/docs/components/date-time/date-range-picker.en.md +58 -0
- package/docs/components/date-time/date-range-picker.md +57 -0
- package/docs/components/date-time/date-time-picker.en.md +44 -0
- package/docs/components/date-time/date-time-picker.md +43 -0
- package/docs/components/date-time/range-calendar.en.md +47 -0
- package/docs/components/date-time/range-calendar.md +46 -0
- package/docs/components/date-time/time-picker.en.md +47 -0
- package/docs/components/date-time/time-picker.md +51 -0
- package/docs/components/index.en.md +155 -0
- package/docs/components/index.md +150 -0
- package/docs/components/inputs/choice-controls.en.md +118 -0
- package/docs/components/inputs/choice-controls.md +112 -0
- package/docs/components/inputs/color-picker.en.md +126 -0
- package/docs/components/inputs/color-picker.md +122 -0
- package/docs/components/inputs/combobox.en.md +62 -0
- package/docs/components/inputs/combobox.md +58 -0
- package/docs/components/inputs/file-dropzone.en.md +51 -0
- package/docs/components/inputs/file-dropzone.md +50 -0
- package/docs/components/inputs/form-layout.en.md +99 -0
- package/docs/components/inputs/form-layout.md +97 -0
- package/docs/components/inputs/form.en.md +87 -0
- package/docs/components/inputs/form.md +86 -0
- package/docs/components/inputs/inline-edit.en.md +93 -0
- package/docs/components/inputs/inline-edit.md +94 -0
- package/docs/components/inputs/masked-input.en.md +149 -0
- package/docs/components/inputs/masked-input.md +147 -0
- package/docs/components/inputs/number-input.en.md +81 -0
- package/docs/components/inputs/number-input.md +80 -0
- package/docs/components/inputs/password-input.en.md +101 -0
- package/docs/components/inputs/password-input.md +97 -0
- package/docs/components/inputs/phone-input.en.md +78 -0
- package/docs/components/inputs/phone-input.md +76 -0
- package/docs/components/inputs/pin-input.en.md +109 -0
- package/docs/components/inputs/pin-input.md +108 -0
- package/docs/components/inputs/rating.en.md +100 -0
- package/docs/components/inputs/rating.md +99 -0
- package/docs/components/inputs/rich-text-editor.en.md +1539 -0
- package/docs/components/inputs/rich-text-editor.md +1538 -0
- package/docs/components/inputs/search-control.en.md +60 -0
- package/docs/components/inputs/search-control.md +58 -0
- package/docs/components/inputs/select.en.md +68 -0
- package/docs/components/inputs/select.md +65 -0
- package/docs/components/inputs/slider.en.md +60 -0
- package/docs/components/inputs/slider.md +59 -0
- package/docs/components/inputs/swatch-group.en.md +181 -0
- package/docs/components/inputs/swatch-group.md +177 -0
- package/docs/components/inputs/tag-input.en.md +50 -0
- package/docs/components/inputs/tag-input.md +48 -0
- package/docs/components/inputs/text-control.en.md +76 -0
- package/docs/components/inputs/text-control.md +74 -0
- package/docs/components/inputs/transfer.en.md +118 -0
- package/docs/components/inputs/transfer.md +114 -0
- package/docs/components/inputs/tree-select.en.md +91 -0
- package/docs/components/inputs/tree-select.md +89 -0
- package/docs/components/inputs/upload-queue.en.md +160 -0
- package/docs/components/inputs/upload-queue.md +158 -0
- package/docs/components/navigation/accordion.en.md +76 -0
- package/docs/components/navigation/accordion.md +75 -0
- package/docs/components/navigation/breadcrumbs.en.md +73 -0
- package/docs/components/navigation/breadcrumbs.md +72 -0
- package/docs/components/navigation/contextual-save-bar.en.md +104 -0
- package/docs/components/navigation/contextual-save-bar.md +103 -0
- package/docs/components/navigation/page-header.en.md +71 -0
- package/docs/components/navigation/page-header.md +70 -0
- package/docs/components/navigation/pagination.en.md +69 -0
- package/docs/components/navigation/pagination.md +69 -0
- package/docs/components/navigation/section-header.en.md +67 -0
- package/docs/components/navigation/section-header.md +66 -0
- package/docs/components/navigation/selection-bar.en.md +83 -0
- package/docs/components/navigation/selection-bar.md +83 -0
- package/docs/components/navigation/stepper.en.md +78 -0
- package/docs/components/navigation/stepper.md +77 -0
- package/docs/components/navigation/tabs.en.md +71 -0
- package/docs/components/navigation/tabs.md +70 -0
- package/docs/components/navigation/tree-view.en.md +173 -0
- package/docs/components/navigation/tree-view.md +172 -0
- package/docs/components/overlays/command-palette.en.md +153 -0
- package/docs/components/overlays/command-palette.md +147 -0
- package/docs/components/overlays/confirm-dialog.en.md +134 -0
- package/docs/components/overlays/confirm-dialog.md +127 -0
- package/docs/components/overlays/context-menu.en.md +115 -0
- package/docs/components/overlays/context-menu.md +113 -0
- package/docs/components/overlays/dialog.en.md +120 -0
- package/docs/components/overlays/dialog.md +117 -0
- package/docs/components/overlays/drawer.en.md +87 -0
- package/docs/components/overlays/drawer.md +88 -0
- package/docs/components/overlays/hover-card.en.md +179 -0
- package/docs/components/overlays/hover-card.md +175 -0
- package/docs/components/overlays/menu.en.md +103 -0
- package/docs/components/overlays/menu.md +100 -0
- package/docs/components/overlays/popover.en.md +78 -0
- package/docs/components/overlays/popover.md +77 -0
- package/docs/components/overlays/shortcuts-help.en.md +190 -0
- package/docs/components/overlays/shortcuts-help.md +186 -0
- package/docs/components/overlays/tooltip.en.md +78 -0
- package/docs/components/overlays/tooltip.md +77 -0
- package/docs/components/table/data-table.en.md +137 -0
- package/docs/components/table/data-table.md +133 -0
- package/docs/components/table/filter-bar.en.md +161 -0
- package/docs/components/table/filter-bar.md +155 -0
- package/docs/components/table/saved-views.en.md +117 -0
- package/docs/components/table/saved-views.md +115 -0
- package/docs/components/table/toolbar.en.md +100 -0
- package/docs/components/table/toolbar.md +97 -0
- package/docs/conventions.md +358 -0
- package/docs/getting-started.en.md +382 -0
- package/docs/getting-started.md +381 -0
- package/docs/glossary.en.md +179 -0
- package/docs/glossary.md +174 -0
- package/docs/i18n.en.md +147 -0
- package/docs/i18n.md +143 -0
- package/docs/icons.en.md +252 -0
- package/docs/icons.md +251 -0
- package/docs/index.md +62 -0
- package/docs/palette.en.md +400 -0
- package/docs/palette.md +396 -0
- package/docs/theming.en.md +522 -0
- package/docs/theming.md +518 -0
- package/llms.txt +144 -0
- package/package.json +173 -4
- package/src/color.ts +21 -0
- package/src/components/actions/Alert.tsx +121 -0
- package/src/components/actions/Banner.tsx +120 -0
- package/src/components/actions/Button.tsx +241 -0
- package/src/components/actions/ButtonGroup.tsx +65 -0
- package/src/components/actions/Chip.tsx +113 -0
- package/src/components/actions/CopyButton.tsx +112 -0
- package/src/components/actions/Progress.tsx +103 -0
- package/src/components/actions/Segmented.tsx +162 -0
- package/src/components/actions/Spinner.tsx +80 -0
- package/src/components/actions/SplitButton.tsx +164 -0
- package/src/components/actions/StatusBadge.tsx +61 -0
- package/src/components/actions/Toaster.tsx +148 -0
- package/src/components/actions/Toggle.tsx +224 -0
- package/src/components/actions/ToggleGroup.tsx +147 -0
- package/src/components/actions/Toolbar.tsx +223 -0
- package/src/components/actions/Truncate.tsx +96 -0
- package/src/components/app-shell/AppShell.tsx +268 -0
- package/src/components/app-shell/MobileTabBar.tsx +305 -0
- package/src/components/app-shell/NavItem.tsx +149 -0
- package/src/components/app-shell/SideNav.tsx +217 -0
- package/src/components/app-shell/SplitPanel.tsx +381 -0
- package/src/components/app-shell/TopBar.tsx +115 -0
- package/src/components/content/AspectRatio.tsx +45 -0
- package/src/components/content/Avatar.tsx +132 -0
- package/src/components/content/AvatarGroup.tsx +92 -0
- package/src/components/content/Badge.tsx +78 -0
- package/src/components/content/Card.tsx +117 -0
- package/src/components/content/Carousel.tsx +427 -0
- package/src/components/content/CodeView.tsx +178 -0
- package/src/components/content/DescriptionList.tsx +64 -0
- package/src/components/content/EditableList.tsx +879 -0
- package/src/components/content/EmptyState.tsx +65 -0
- package/src/components/content/ErrorState.tsx +100 -0
- package/src/components/content/Grid.tsx +208 -0
- package/src/components/content/Heading.tsx +81 -0
- package/src/components/content/Image.tsx +235 -0
- package/src/components/content/Kbd.tsx +67 -0
- package/src/components/content/Keyboard.tsx +634 -0
- package/src/components/content/Link.tsx +199 -0
- package/src/components/content/MediaCard.tsx +167 -0
- package/src/components/content/NotificationCenter.tsx +168 -0
- package/src/components/content/NotificationList.tsx +329 -0
- package/src/components/content/ScrollArea.tsx +69 -0
- package/src/components/content/Separator.tsx +62 -0
- package/src/components/content/Skeleton.tsx +40 -0
- package/src/components/content/SortableList.tsx +249 -0
- package/src/components/content/Stat.tsx +75 -0
- package/src/components/content/Table.tsx +500 -0
- package/src/components/content/TagGroup.tsx +222 -0
- package/src/components/content/Text.tsx +127 -0
- package/src/components/content/Timeline.tsx +126 -0
- package/src/components/content/VirtualGrid.tsx +726 -0
- package/src/components/content/VisuallyHidden.tsx +25 -0
- package/src/components/content/keyboardEditing.ts +51 -0
- package/src/components/content/useDragToSelect.ts +255 -0
- package/src/components/date-time/Calendar.tsx +181 -0
- package/src/components/date-time/DatePicker.tsx +143 -0
- package/src/components/date-time/DateRangePicker.tsx +349 -0
- package/src/components/date-time/DateTimePicker.tsx +92 -0
- package/src/components/date-time/RangeCalendar.tsx +156 -0
- package/src/components/date-time/TimePicker.tsx +377 -0
- package/src/components/inputs/Checkbox.tsx +284 -0
- package/src/components/inputs/CheckboxCard.tsx +132 -0
- package/src/components/inputs/CheckboxGroup.tsx +140 -0
- package/src/components/inputs/ChoiceCardBody.tsx +53 -0
- package/src/components/inputs/ColorPicker.tsx +221 -0
- package/src/components/inputs/Combobox.tsx +156 -0
- package/src/components/inputs/FileDropzone.tsx +253 -0
- package/src/components/inputs/Form.tsx +77 -0
- package/src/components/inputs/FormField.tsx +235 -0
- package/src/components/inputs/FormLayout.tsx +80 -0
- package/src/components/inputs/InlineEdit.tsx +205 -0
- package/src/components/inputs/MaskedInput.tsx +288 -0
- package/src/components/inputs/NumberInput.tsx +138 -0
- package/src/components/inputs/PasswordInput.tsx +166 -0
- package/src/components/inputs/PhoneInput.tsx +55 -0
- package/src/components/inputs/PinInput.tsx +197 -0
- package/src/components/inputs/RadioGroup.tsx +322 -0
- package/src/components/inputs/Rating.tsx +224 -0
- package/src/components/inputs/SearchControl.tsx +278 -0
- package/src/components/inputs/Select.tsx +741 -0
- package/src/components/inputs/Slider.tsx +436 -0
- package/src/components/inputs/SwatchGroup.tsx +342 -0
- package/src/components/inputs/TagInput.tsx +221 -0
- package/src/components/inputs/TextControl.tsx +335 -0
- package/src/components/inputs/Transfer.tsx +368 -0
- package/src/components/inputs/TreeSelect.tsx +275 -0
- package/src/components/inputs/UploadQueue.tsx +240 -0
- package/src/components/navigation/Accordion.tsx +118 -0
- package/src/components/navigation/Breadcrumbs.tsx +112 -0
- package/src/components/navigation/ContextualSaveBar.tsx +174 -0
- package/src/components/navigation/PageHeader.tsx +41 -0
- package/src/components/navigation/Pagination.tsx +184 -0
- package/src/components/navigation/SectionHeader.tsx +54 -0
- package/src/components/navigation/SelectionBar.tsx +151 -0
- package/src/components/navigation/Stepper.tsx +153 -0
- package/src/components/navigation/Tabs.tsx +130 -0
- package/src/components/navigation/TreeView.tsx +246 -0
- package/src/components/overlays/CommandPalette.tsx +343 -0
- package/src/components/overlays/ConfirmDialog.tsx +272 -0
- package/src/components/overlays/ContextMenu.tsx +284 -0
- package/src/components/overlays/Dialog.tsx +283 -0
- package/src/components/overlays/Drawer.tsx +193 -0
- package/src/components/overlays/HelpTooltip.tsx +96 -0
- package/src/components/overlays/HoverCard.tsx +404 -0
- package/src/components/overlays/Menu.tsx +243 -0
- package/src/components/overlays/ModalHeader.tsx +125 -0
- package/src/components/overlays/ModalOverlay.tsx +108 -0
- package/src/components/overlays/Popover.tsx +120 -0
- package/src/components/overlays/ShortcutsHelp.tsx +147 -0
- package/src/components/overlays/Tooltip.tsx +89 -0
- package/src/components/table/DataTable.tsx +164 -0
- package/src/components/table/FilterBar.tsx +114 -0
- package/src/components/table/FilterBarAdd.tsx +268 -0
- package/src/components/table/SavedViews.tsx +122 -0
- package/src/components/table/TablePreferences.tsx +173 -0
- package/src/components/table/TableToolbar.tsx +74 -0
- package/src/editor/RichTextEditor.tsx +1747 -0
- package/src/editor/RichTextView.tsx +119 -0
- package/src/editor/core/atomText.ts +140 -0
- package/src/editor/core/blockCommands.ts +329 -0
- package/src/editor/core/blockTypes.ts +252 -0
- package/src/editor/core/containers.ts +100 -0
- package/src/editor/core/customMarkdown.ts +74 -0
- package/src/editor/core/customTool.ts +472 -0
- package/src/editor/core/customToolEngine.ts +442 -0
- package/src/editor/core/document.ts +27 -0
- package/src/editor/core/emptiness.ts +31 -0
- package/src/editor/core/extensions.ts +295 -0
- package/src/editor/core/fieldNotice.ts +75 -0
- package/src/editor/core/handle.ts +311 -0
- package/src/editor/core/insertItems.ts +434 -0
- package/src/editor/core/jsonDocument.ts +99 -0
- package/src/editor/core/markdown.ts +313 -0
- package/src/editor/core/maxLength.ts +99 -0
- package/src/editor/core/pasteTrim.ts +85 -0
- package/src/editor/core/schema.ts +986 -0
- package/src/editor/core/schemaConform.ts +122 -0
- package/src/editor/core/shortcuts.ts +435 -0
- package/src/editor/core/skeleton.ts +108 -0
- package/src/editor/core/slashCommand.ts +143 -0
- package/src/editor/core/sourceFormat.ts +194 -0
- package/src/editor/core/toolButtons.ts +133 -0
- package/src/editor/core/toolDescriptor.ts +359 -0
- package/src/editor/core/toolEntryShortcuts.ts +66 -0
- package/src/editor/core/toolLoader.ts +50 -0
- package/src/editor/core/tools.ts +150 -0
- package/src/editor/core/viewIsland.ts +35 -0
- package/src/editor/features/builtins.ts +145 -0
- package/src/editor/features/code/CodeBlockView.tsx +240 -0
- package/src/editor/features/code/CodeCopyButton.tsx +76 -0
- package/src/editor/features/code/CodeCopyIsland.tsx +71 -0
- package/src/editor/features/code/codeBlock.ts +188 -0
- package/src/editor/features/code/codeBlockTool.ts +107 -0
- package/src/editor/features/code/codeHeader.ts +97 -0
- package/src/editor/features/code/codeLanguages.ts +62 -0
- package/src/editor/features/code/highlight.ts +109 -0
- package/src/editor/features/code/highlightNodes.ts +65 -0
- package/src/editor/features/code/lowlight.ts +45 -0
- package/src/editor/features/color/CustomColorPopover.tsx +180 -0
- package/src/editor/features/color/contrast.ts +52 -0
- package/src/editor/features/color/customColor.ts +91 -0
- package/src/editor/features/color/styleExtensions.ts +316 -0
- package/src/editor/features/emoji/EmojiGrid.tsx +160 -0
- package/src/editor/features/emoji/emoji.ts +156 -0
- package/src/editor/features/emoji/emojiTool.tsx +67 -0
- package/src/editor/features/image/ImagePopover.tsx +254 -0
- package/src/editor/features/image/ImageToolbar.tsx +147 -0
- package/src/editor/features/image/image.ts +821 -0
- package/src/editor/features/image/imageNotice.ts +27 -0
- package/src/editor/features/layout/columnLayouts.ts +71 -0
- package/src/editor/features/layout/layout.ts +537 -0
- package/src/editor/features/link/LinkPopover.tsx +114 -0
- package/src/editor/features/link/link.ts +112 -0
- package/src/editor/features/link/linkTool.tsx +36 -0
- package/src/editor/features/search/SearchPanel.tsx +264 -0
- package/src/editor/features/search/revealMatch.ts +69 -0
- package/src/editor/features/search/searchMatch.ts +129 -0
- package/src/editor/features/search/searchPlugin.ts +254 -0
- package/src/editor/features/search/searchTool.ts +30 -0
- package/src/editor/features/table/TableInsertDialog.tsx +129 -0
- package/src/editor/features/table/TableMenuButton.tsx +503 -0
- package/src/editor/features/table/TableSizeGrid.tsx +265 -0
- package/src/editor/features/table/tableActions.ts +380 -0
- package/src/editor/features/table/tableCells.ts +63 -0
- package/src/editor/features/table/tableChunk.ts +11 -0
- package/src/editor/features/table/tableTool.ts +74 -0
- package/src/editor/features/table/tables.ts +220 -0
- package/src/editor/features/wrapper/wrapper.ts +350 -0
- package/src/editor/features/wrapper/wrapperTones.ts +51 -0
- package/src/editor/highlight-entry.ts +23 -0
- package/src/editor/highlight-grammars.d.ts +12 -0
- package/src/editor/hooks/useChangeThrottle.ts +62 -0
- package/src/editor/hooks/useCoarsePointer.ts +36 -0
- package/src/editor/hooks/useFieldsetDisabled.ts +53 -0
- package/src/editor/hooks/useRichTextEditorState.ts +51 -0
- package/src/editor/hooks/useSubmenuPlacement.ts +40 -0
- package/src/editor/index.ts +59 -0
- package/src/editor/schema-entry.ts +40 -0
- package/src/editor/styles/codeTheme.ts +66 -0
- package/src/editor/styles/glass.ts +66 -0
- package/src/editor/styles/palette.ts +191 -0
- package/src/editor/styles/prose.ts +429 -0
- package/src/editor/styles/surface.ts +24 -0
- package/src/editor/styles/tokens.ts +173 -0
- package/src/editor/ui/BlockHandle.tsx +601 -0
- package/src/editor/ui/BlockIsland.tsx +23 -0
- package/src/editor/ui/BlockIslandSlots.tsx +114 -0
- package/src/editor/ui/ColorMenus.tsx +613 -0
- package/src/editor/ui/EditorToolbar.tsx +630 -0
- package/src/editor/ui/FieldResizer.tsx +155 -0
- package/src/editor/ui/FieldStatus.tsx +85 -0
- package/src/editor/ui/FloatingToolbar.tsx +77 -0
- package/src/editor/ui/FormatMenus.tsx +706 -0
- package/src/editor/ui/InsertMenuButton.tsx +104 -0
- package/src/editor/ui/SelectionBubble.tsx +317 -0
- package/src/editor/ui/ShortcutsButton.tsx +128 -0
- package/src/editor/ui/SlashMenu.tsx +199 -0
- package/src/editor/ui/SuggestionList.tsx +217 -0
- package/src/editor/ui/TextCard.tsx +312 -0
- package/src/editor/ui/ToolButtonView.tsx +242 -0
- package/src/editor/ui/TriggerMenu.tsx +255 -0
- package/src/editor/ui/focusWithin.ts +26 -0
- package/src/editor/ui/lockableMenu.ts +37 -0
- package/src/editor/ui/rowMarks.ts +66 -0
- package/src/editor/ui/selectionMenu.ts +97 -0
- package/src/hooks/useFieldDescription.ts +126 -0
- package/src/hooks/useMediaQuery.ts +46 -0
- package/src/hooks/useOpenerFocus.ts +118 -0
- package/src/hooks/useOverlayLayer.ts +42 -0
- package/src/hooks/useScrollLock.ts +92 -0
- package/src/hooks/useStickyOffset.ts +228 -0
- package/src/hooks/useTableState.ts +76 -0
- package/src/i18n/UiProvider.tsx +152 -0
- package/src/i18n/context.ts +30 -0
- package/src/i18n/defaults.ts +657 -0
- package/src/i18n/messages.ts +1183 -0
- package/src/i18n/useMessages.ts +47 -0
- package/src/icons.ts +566 -0
- package/src/index.ts +502 -0
- package/src/lib/accessible-name.ts +35 -0
- package/src/lib/bottom-bar-slot.ts +27 -0
- package/src/lib/button.ts +158 -0
- package/src/lib/choice-card.ts +79 -0
- package/src/lib/clamp.ts +18 -0
- package/src/lib/cn.ts +48 -0
- package/src/lib/date.ts +87 -0
- package/src/lib/dev-warn.ts +82 -0
- package/src/lib/empty.ts +43 -0
- package/src/lib/field.ts +125 -0
- package/src/lib/filter-range.ts +48 -0
- package/src/lib/interaction-modality.ts +134 -0
- package/src/lib/mask.ts +226 -0
- package/src/lib/menu.ts +196 -0
- package/src/lib/overlay-layer.ts +163 -0
- package/src/lib/period.ts +167 -0
- package/src/lib/progress-status.ts +44 -0
- package/src/lib/published-height.ts +147 -0
- package/src/lib/reorder.ts +65 -0
- package/src/lib/responsive.ts +71 -0
- package/src/lib/state.ts +39 -0
- package/src/lib/table-state.ts +264 -0
- package/src/lib/tag.ts +31 -0
- package/src/lib/themes.ts +144 -0
- package/src/lib/time.ts +107 -0
- package/src/lib/toolbar-axis.tsx +31 -0
- package/src/lib/touch.ts +15 -0
- package/src/lib/variants.ts +342 -0
- package/src/locales/en.ts +10 -0
- package/src/locales/ru.ts +695 -0
- package/styles.css +1650 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { Editor, JSONContent } from "@tiptap/core";
|
|
4
|
+
import type { Schema } from "@tiptap/pm/model";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Дерево JSON — к Схеме Редактора, до `Schema.nodeFromJSON`.
|
|
8
|
+
*
|
|
9
|
+
* ПОЧЕМУ ЧИСТИМ JSON САМИ. `nodeFromJSON` не проверяет ни допустимость уровня
|
|
10
|
+
* заголовка, ни порядок вложенности и на неизвестном типе узла бросает — и
|
|
11
|
+
* тогда Tiptap молча подменяет весь документ пустым. Поэтому перед загрузкой
|
|
12
|
+
* JSON сверяется со Схемой: чужие узлы разворачиваются в своё содержимое,
|
|
13
|
+
* чужие метки снимаются, уровень заголовка прижимается к разрешённым. Список
|
|
14
|
+
* узлов здесь не зашит: что в Схеме сейчас, то и пройдёт — выключенный
|
|
15
|
+
* Инструмент убирает узел из Схемы, а этот код менять не придётся.
|
|
16
|
+
*
|
|
17
|
+
* Зовут его импорт Markdown (`markdown.ts`): `@tiptap/markdown` разбирает текст
|
|
18
|
+
* в JSON по набору расширений движка.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** Разрешённые уровни заголовка: из расширения, а не из константы кита. */
|
|
22
|
+
export function headingLevels(editor: Editor): number[] {
|
|
23
|
+
const heading = editor.extensionManager.extensions.find(({ name }) => name === "heading");
|
|
24
|
+
const levels: unknown = heading?.options?.levels;
|
|
25
|
+
return Array.isArray(levels) && levels.length > 0 ? levels.map(Number) : [];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Ближайший разрешённый уровень: `#` при H2–H4 становится H2, `#####` — H4. */
|
|
29
|
+
function clampLevel(level: number, allowed: readonly number[]): number {
|
|
30
|
+
return allowed.reduce((best, candidate) =>
|
|
31
|
+
Math.abs(candidate - level) < Math.abs(best - level) ? candidate : best
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const isInline = (node: JSONContent, schema: Schema) =>
|
|
36
|
+
node.type === "text" || (!!node.type && !!schema.nodes[node.type]?.isInline);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Голый текст в блоке, который держит только блоки, прячется в абзац. Так
|
|
40
|
+
* выглядит пункт списка, когда расширения для его разметки в движке нет:
|
|
41
|
+
* `- [ ] дело` без чек-листа приходит пунктом с текстом без абзаца, и без
|
|
42
|
+
* обёртки вставка потеряла бы его целиком.
|
|
43
|
+
*/
|
|
44
|
+
function wrapInlineRuns(children: JSONContent[], schema: Schema): JSONContent[] {
|
|
45
|
+
if (!schema.nodes.paragraph) return children;
|
|
46
|
+
const blocks: JSONContent[] = [];
|
|
47
|
+
let run: JSONContent[] = [];
|
|
48
|
+
const flush = () => {
|
|
49
|
+
if (run.length > 0) blocks.push({ type: "paragraph", content: run });
|
|
50
|
+
run = [];
|
|
51
|
+
};
|
|
52
|
+
for (const child of children) {
|
|
53
|
+
if (isInline(child, schema)) {
|
|
54
|
+
run.push(child);
|
|
55
|
+
} else {
|
|
56
|
+
flush();
|
|
57
|
+
blocks.push(child);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
flush();
|
|
61
|
+
return blocks;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ConformOptions {
|
|
65
|
+
/** Разрешённые уровни заголовка (`headingLevels`); пусто — уровень как есть. */
|
|
66
|
+
levels: readonly number[];
|
|
67
|
+
/**
|
|
68
|
+
* Узлы, которые разворачиваются в содержимое, даже если они есть в Схеме:
|
|
69
|
+
* так вход говорит, чего из него не создаётся (Markdown — Раскладки и Обёртки).
|
|
70
|
+
*/
|
|
71
|
+
excluded?: ReadonlySet<string>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Приводит узел JSON к Схеме: чужое разворачивается или снимается. */
|
|
75
|
+
export function conformToSchema(
|
|
76
|
+
node: JSONContent,
|
|
77
|
+
schema: Schema,
|
|
78
|
+
options: ConformOptions
|
|
79
|
+
): JSONContent[] {
|
|
80
|
+
if (node.type === "text") {
|
|
81
|
+
const marks = node.marks?.filter((mark) => mark.type in schema.marks);
|
|
82
|
+
return [{ ...node, marks: marks?.length ? marks : undefined }];
|
|
83
|
+
}
|
|
84
|
+
const children = (node.content ?? []).flatMap((child) => conformToSchema(child, schema, options));
|
|
85
|
+
const type = node.type && !options.excluded?.has(node.type) ? schema.nodes[node.type] : undefined;
|
|
86
|
+
if (!type) return children;
|
|
87
|
+
|
|
88
|
+
const content = type.inlineContent || type.isLeaf ? children : wrapInlineRuns(children, schema);
|
|
89
|
+
const result: JSONContent = { ...node, content: content.length ? content : undefined };
|
|
90
|
+
const { levels } = options;
|
|
91
|
+
if (type.name === "heading" && levels.length > 0) {
|
|
92
|
+
result.attrs = { ...node.attrs, level: clampLevel(Number(node.attrs?.level), levels) };
|
|
93
|
+
}
|
|
94
|
+
return type.inlineContent ? liftBlocks(result, schema) : [result];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Блок внутри текстового Блока выносится наружу, а текст вокруг остаётся
|
|
99
|
+
* абзацами по обе стороны. Так приходит картинка посреди строки: в Markdown
|
|
100
|
+
* `` — строчный элемент, а в Схеме картинка — Блок (`figure`).
|
|
101
|
+
* `nodeFromJSON` вложенность не проверяет, и без выноса Блок оказался бы
|
|
102
|
+
* внутри абзаца.
|
|
103
|
+
*/
|
|
104
|
+
function liftBlocks(node: JSONContent, schema: Schema): JSONContent[] {
|
|
105
|
+
const children = node.content ?? [];
|
|
106
|
+
if (children.every((child) => isInline(child, schema))) return [node];
|
|
107
|
+
const parts: JSONContent[] = [];
|
|
108
|
+
let run: JSONContent[] = [];
|
|
109
|
+
const flush = () => {
|
|
110
|
+
if (run.length > 0) parts.push({ ...node, content: run });
|
|
111
|
+
run = [];
|
|
112
|
+
};
|
|
113
|
+
for (const child of children) {
|
|
114
|
+
if (isInline(child, schema)) run.push(child);
|
|
115
|
+
else {
|
|
116
|
+
flush();
|
|
117
|
+
parts.push(child);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
flush();
|
|
121
|
+
return parts;
|
|
122
|
+
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
import type { UiMessages } from "../../i18n/messages.js";
|
|
2
|
+
import { describedTools, toolLabel, type ToolList } from "./toolDescriptor.js";
|
|
3
|
+
import type { PrefixedName } from "./customTool.js";
|
|
4
|
+
import type { Tool } from "./tools.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Таблица сочетаний клавиш Редактора: одна запись на команду.
|
|
8
|
+
*
|
|
9
|
+
* ОДНА ТАБЛИЦА НА ВСЕХ ПОТРЕБИТЕЛЕЙ. Подсказки и `aria-keyshortcuts` Панели,
|
|
10
|
+
* подписи в Меню вставки и справочник сочетаний читают отсюда. Раньше сочетания
|
|
11
|
+
* жили в `GROUPS` Панели, в `insertItems.ts` и в самих расширениях, и подпись
|
|
12
|
+
* могла разойтись с движком молча. Расширения по-прежнему САМИ вешают клавиши
|
|
13
|
+
* (`blockCommands.ts`, `styleExtensions.ts`, Tiptap), поэтому записи здесь —
|
|
14
|
+
* ПОДПИСИ, а не привязки: совпадение с движком сторожит
|
|
15
|
+
* `tests/rich-text-editor-shortcuts.test.tsx`, нажимая каждое сочетание в живом
|
|
16
|
+
* Редакторе. Запись без привязки — подпись, которая обещает то, чего нет.
|
|
17
|
+
*
|
|
18
|
+
* Модуль серверно-безопасен: данные и две чистые функции, без React и Tiptap —
|
|
19
|
+
* его читают и меню выделения, и справочник, и скрипты.
|
|
20
|
+
*
|
|
21
|
+
* `keys` — в нотации Панели: `mod` — `⌘` на Apple и `Ctrl` у остальных, `alt` и
|
|
22
|
+
* `shift`, дальше сама клавиша как надпись (`Z`, `↑`, `F10`).
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
type EditorMessages = UiMessages["editor"];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Группы справочника — в порядке показа. Группа «Ссылка» — место кита для
|
|
29
|
+
* сочетания кнопки ссылки: само сочетание живёт в её описании (`linkTool.tsx`).
|
|
30
|
+
*/
|
|
31
|
+
export const SHORTCUT_GROUPS = [
|
|
32
|
+
"selection",
|
|
33
|
+
"history",
|
|
34
|
+
"blocks",
|
|
35
|
+
"clear",
|
|
36
|
+
"marks",
|
|
37
|
+
"blockType",
|
|
38
|
+
"lists",
|
|
39
|
+
"align",
|
|
40
|
+
"link",
|
|
41
|
+
"search",
|
|
42
|
+
"toolbar",
|
|
43
|
+
] as const;
|
|
44
|
+
|
|
45
|
+
export type ShortcutGroup = (typeof SHORTCUT_GROUPS)[number];
|
|
46
|
+
|
|
47
|
+
export interface ShortcutCommand {
|
|
48
|
+
/** Стабильный ключ; совпадает с id кнопки Панели и пункта Меню вставки, где они есть. */
|
|
49
|
+
id: string;
|
|
50
|
+
group: ShortcutGroup;
|
|
51
|
+
/**
|
|
52
|
+
* Инструмент, при котором сочетание живёт: строка в справочнике есть только
|
|
53
|
+
* у включённого. Массив — достаточно любого из них (сдвиг пункта живёт в
|
|
54
|
+
* любом списке); `null` — команда есть всегда (Блоки, выделение, `Alt+F10`).
|
|
55
|
+
*/
|
|
56
|
+
tool: Tool | readonly Tool[] | null;
|
|
57
|
+
/** Дополнительное условие: заголовок первого уровня есть только вместе с `heading`. */
|
|
58
|
+
requires?: Tool;
|
|
59
|
+
keys: readonly string[];
|
|
60
|
+
/** Подпись из каталога — та же, что на кнопке или в пункте меню. */
|
|
61
|
+
label: (messages: EditorMessages) => string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Инструменты со списками: у любого есть пункты, а значит — что сдвигать. */
|
|
65
|
+
const LIST_TOOLS: readonly Tool[] = ["bulletList", "orderedList", "taskList"];
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Таблица — сочетания кита и Инструментов, ещё не переехавших на описание.
|
|
69
|
+
* Сочетание кнопки описания — поле самой кнопки (`toolDescriptor.ts`): её
|
|
70
|
+
* строку справочник берёт оттуда, клавишу вешает `toolButtons.ts`.
|
|
71
|
+
*/
|
|
72
|
+
export const SHORTCUTS: readonly ShortcutCommand[] = [
|
|
73
|
+
// Выделение: первое `⌘A` берёт текст Блока, второе — весь Документ (`blockCommands.ts`).
|
|
74
|
+
{
|
|
75
|
+
id: "selectBlock",
|
|
76
|
+
group: "selection",
|
|
77
|
+
tool: null,
|
|
78
|
+
keys: ["mod", "A"],
|
|
79
|
+
label: (m) => m.selectBlock,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: "selectDocument",
|
|
83
|
+
group: "selection",
|
|
84
|
+
tool: null,
|
|
85
|
+
keys: ["mod", "A"],
|
|
86
|
+
label: (m) => m.selectDocument,
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
{ id: "undo", group: "history", tool: "history", keys: ["mod", "Z"], label: (m) => m.undo },
|
|
90
|
+
{
|
|
91
|
+
id: "redo",
|
|
92
|
+
group: "history",
|
|
93
|
+
tool: "history",
|
|
94
|
+
keys: ["mod", "shift", "Z"],
|
|
95
|
+
label: (m) => m.redo,
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
{
|
|
99
|
+
id: "duplicateBlock",
|
|
100
|
+
group: "blocks",
|
|
101
|
+
tool: null,
|
|
102
|
+
keys: ["mod", "shift", "D"],
|
|
103
|
+
label: (m) => m.duplicateBlock,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: "moveBlockUp",
|
|
107
|
+
group: "blocks",
|
|
108
|
+
tool: null,
|
|
109
|
+
keys: ["alt", "shift", "↑"],
|
|
110
|
+
label: (m) => m.moveBlockUp,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "moveBlockDown",
|
|
114
|
+
group: "blocks",
|
|
115
|
+
tool: null,
|
|
116
|
+
keys: ["alt", "shift", "↓"],
|
|
117
|
+
label: (m) => m.moveBlockDown,
|
|
118
|
+
},
|
|
119
|
+
// Меню ручки Блока: ручка есть в любой правке, при любой Панели.
|
|
120
|
+
{
|
|
121
|
+
id: "blockActions",
|
|
122
|
+
group: "blocks",
|
|
123
|
+
tool: null,
|
|
124
|
+
keys: ["mod", "/"],
|
|
125
|
+
label: (m) => m.blockActions,
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
{
|
|
129
|
+
id: "clearFormatting",
|
|
130
|
+
group: "clear",
|
|
131
|
+
tool: "clearFormatting",
|
|
132
|
+
keys: ["mod", "\\"],
|
|
133
|
+
label: (m) => m.clearFormatting,
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
{ id: "bold", group: "marks", tool: "bold", keys: ["mod", "B"], label: (m) => m.bold },
|
|
137
|
+
{ id: "italic", group: "marks", tool: "italic", keys: ["mod", "I"], label: (m) => m.italic },
|
|
138
|
+
{
|
|
139
|
+
id: "strike",
|
|
140
|
+
group: "marks",
|
|
141
|
+
tool: "strike",
|
|
142
|
+
keys: ["mod", "shift", "S"],
|
|
143
|
+
label: (m) => m.strike,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "underline",
|
|
147
|
+
group: "marks",
|
|
148
|
+
tool: "underline",
|
|
149
|
+
keys: ["mod", "U"],
|
|
150
|
+
label: (m) => m.underline,
|
|
151
|
+
},
|
|
152
|
+
{ id: "code", group: "marks", tool: "code", keys: ["mod", "E"], label: (m) => m.code },
|
|
153
|
+
{
|
|
154
|
+
id: "superscript",
|
|
155
|
+
group: "marks",
|
|
156
|
+
tool: "superscript",
|
|
157
|
+
keys: ["mod", "."],
|
|
158
|
+
label: (m) => m.superscript,
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "subscript",
|
|
162
|
+
group: "marks",
|
|
163
|
+
tool: "subscript",
|
|
164
|
+
keys: ["mod", ","],
|
|
165
|
+
label: (m) => m.subscript,
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// Подпись — как у пункта «¶» («Текст»), а не «Абзац» Меню вставки: справочник
|
|
169
|
+
// называет команду тем словом, которым её выбирают на Панели.
|
|
170
|
+
{
|
|
171
|
+
id: "paragraph",
|
|
172
|
+
group: "blockType",
|
|
173
|
+
tool: "heading",
|
|
174
|
+
keys: ["mod", "alt", "0"],
|
|
175
|
+
label: (m) => m.textBlock,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "h1",
|
|
179
|
+
group: "blockType",
|
|
180
|
+
tool: "heading1",
|
|
181
|
+
requires: "heading",
|
|
182
|
+
keys: ["mod", "alt", "1"],
|
|
183
|
+
label: (m) => m.heading({ level: 1 }),
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
id: "h2",
|
|
187
|
+
group: "blockType",
|
|
188
|
+
tool: "heading",
|
|
189
|
+
keys: ["mod", "alt", "2"],
|
|
190
|
+
label: (m) => m.heading({ level: 2 }),
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "h3",
|
|
194
|
+
group: "blockType",
|
|
195
|
+
tool: "heading",
|
|
196
|
+
keys: ["mod", "alt", "3"],
|
|
197
|
+
label: (m) => m.heading({ level: 3 }),
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "h4",
|
|
201
|
+
group: "blockType",
|
|
202
|
+
tool: "heading",
|
|
203
|
+
keys: ["mod", "alt", "4"],
|
|
204
|
+
label: (m) => m.heading({ level: 4 }),
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "codeBlock",
|
|
208
|
+
group: "blockType",
|
|
209
|
+
tool: "codeBlock",
|
|
210
|
+
keys: ["mod", "alt", "C"],
|
|
211
|
+
label: (m) => m.codeBlock,
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
{
|
|
215
|
+
id: "bulletList",
|
|
216
|
+
group: "lists",
|
|
217
|
+
tool: "bulletList",
|
|
218
|
+
keys: ["mod", "shift", "8"],
|
|
219
|
+
label: (m) => m.bulletList,
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: "orderedList",
|
|
223
|
+
group: "lists",
|
|
224
|
+
tool: "orderedList",
|
|
225
|
+
keys: ["mod", "shift", "7"],
|
|
226
|
+
label: (m) => m.orderedList,
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: "taskList",
|
|
230
|
+
group: "lists",
|
|
231
|
+
tool: "taskList",
|
|
232
|
+
keys: ["mod", "shift", "9"],
|
|
233
|
+
label: (m) => m.taskList,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: "indentListItem",
|
|
237
|
+
group: "lists",
|
|
238
|
+
tool: LIST_TOOLS,
|
|
239
|
+
keys: ["mod", "]"],
|
|
240
|
+
label: (m) => m.indentListItem,
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
id: "outdentListItem",
|
|
244
|
+
group: "lists",
|
|
245
|
+
tool: LIST_TOOLS,
|
|
246
|
+
keys: ["mod", "["],
|
|
247
|
+
label: (m) => m.outdentListItem,
|
|
248
|
+
},
|
|
249
|
+
|
|
250
|
+
{
|
|
251
|
+
id: "alignLeft",
|
|
252
|
+
group: "align",
|
|
253
|
+
tool: "align",
|
|
254
|
+
keys: ["mod", "shift", "L"],
|
|
255
|
+
label: (m) => m.alignLeft,
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
id: "alignCenter",
|
|
259
|
+
group: "align",
|
|
260
|
+
tool: "align",
|
|
261
|
+
keys: ["mod", "shift", "E"],
|
|
262
|
+
label: (m) => m.alignCenter,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: "alignRight",
|
|
266
|
+
group: "align",
|
|
267
|
+
tool: "align",
|
|
268
|
+
keys: ["mod", "shift", "R"],
|
|
269
|
+
label: (m) => m.alignRight,
|
|
270
|
+
},
|
|
271
|
+
|
|
272
|
+
{
|
|
273
|
+
id: "focusToolbar",
|
|
274
|
+
group: "toolbar",
|
|
275
|
+
tool: null,
|
|
276
|
+
keys: ["alt", "F10"],
|
|
277
|
+
label: (m) => m.focusToolbar,
|
|
278
|
+
},
|
|
279
|
+
];
|
|
280
|
+
|
|
281
|
+
const BY_ID = new Map(SHORTCUTS.map((command) => [command.id, command]));
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Сочетание команды по id или `undefined`, если у команды его нет. Панель
|
|
285
|
+
* спрашивает так про каждую свою кнопку: у горизонтальной линии, картинки и
|
|
286
|
+
* меню цвета сочетаний нет.
|
|
287
|
+
*/
|
|
288
|
+
export function findShortcutKeys(id: string): readonly string[] | undefined {
|
|
289
|
+
return BY_ID.get(id)?.keys;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Сочетание команды по id — для мест, где оно обязано быть (Меню вставки).
|
|
294
|
+
* Неизвестный id — ошибка разработчика, а не пустая подсказка: подпись, которой
|
|
295
|
+
* нет, молча пропала бы из меню.
|
|
296
|
+
*/
|
|
297
|
+
export function shortcutKeys(id: string): readonly string[] {
|
|
298
|
+
const keys = findShortcutKeys(id);
|
|
299
|
+
if (!keys) throw new Error(`No shortcut "${id}" in the editor shortcut table`);
|
|
300
|
+
return keys;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/** Включена ли команда при данном наборе инструментов. */
|
|
304
|
+
function enabled(command: ShortcutCommand, tools: ReadonlySet<Tool>): boolean {
|
|
305
|
+
if (command.requires && !tools.has(command.requires)) return false;
|
|
306
|
+
if (command.tool === null) return true;
|
|
307
|
+
return typeof command.tool === "string"
|
|
308
|
+
? tools.has(command.tool)
|
|
309
|
+
: command.tool.some((tool) => tools.has(tool));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/** Строка справочника: подпись команды и её сочетание. */
|
|
313
|
+
export type ShortcutRow = Pick<ShortcutCommand, "id" | "keys" | "label">;
|
|
314
|
+
|
|
315
|
+
/** Группа справочника: группа кита или группа одного Инструмента — без заголовка. */
|
|
316
|
+
export interface ShortcutSection {
|
|
317
|
+
group: ShortcutGroup | Tool | PrefixedName;
|
|
318
|
+
commands: readonly ShortcutRow[];
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Место строки переехавшего Инструмента в своей группе: id строки → id строки
|
|
323
|
+
* из `SHORTCUTS`, перед которой она встаёт. Остальные переехавшие строки идут
|
|
324
|
+
* в конец группы. Порядок справочника — не поле описания: место на поверхности
|
|
325
|
+
* держит кит, как `INSERT_ORDER` у Меню вставки.
|
|
326
|
+
*/
|
|
327
|
+
const MOVED_BEFORE: Readonly<Record<string, string>> = { blockquote: "codeBlock" };
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Команды включённых инструментов по группам; пустые группы не возвращаются.
|
|
331
|
+
*
|
|
332
|
+
* Проекция списка описаний: строки не переехавших Инструментов — из
|
|
333
|
+
* `SHORTCUTS`, переехавших — из их описаний (`toolDescriptor.ts`): клавиши
|
|
334
|
+
* Части для движка — поле `shortcuts`, сочетания кнопок — поле кнопки. Строка
|
|
335
|
+
* встаёт на место из `MOVED_BEFORE` или следом за строками своей группы кита;
|
|
336
|
+
* кнопка без группы кита — в группу своего Инструмента после групп кита, в
|
|
337
|
+
* порядке списка (ADR-0058, п. 6.8).
|
|
338
|
+
*/
|
|
339
|
+
export function shortcutGroupsFor(
|
|
340
|
+
tools: ToolList,
|
|
341
|
+
/** Локаль `UiProvider` — для подписи кнопки, заданной функцией от контекста. */
|
|
342
|
+
locale = "en-US"
|
|
343
|
+
): readonly ShortcutSection[] {
|
|
344
|
+
const described = describedTools(tools);
|
|
345
|
+
const moved = described.flatMap((descriptor) => descriptor.shortcuts ?? []);
|
|
346
|
+
const anchored = (row: ShortcutCommand) =>
|
|
347
|
+
SHORTCUTS.some((command) => command.id === MOVED_BEFORE[row.id]);
|
|
348
|
+
const commands = [
|
|
349
|
+
...SHORTCUTS.flatMap((command) => [
|
|
350
|
+
...moved.filter((row) => MOVED_BEFORE[row.id] === command.id),
|
|
351
|
+
command,
|
|
352
|
+
]),
|
|
353
|
+
...moved.filter((row) => !anchored(row)),
|
|
354
|
+
].filter((command) => enabled(command, tools));
|
|
355
|
+
const ownGroups: ShortcutSection[] = [];
|
|
356
|
+
for (const descriptor of described) {
|
|
357
|
+
const own: ShortcutRow[] = [];
|
|
358
|
+
for (const button of descriptor.buttons ?? []) {
|
|
359
|
+
if (!button.shortcut) continue;
|
|
360
|
+
const row: ShortcutRow = {
|
|
361
|
+
id: button.id,
|
|
362
|
+
keys: button.shortcut,
|
|
363
|
+
label: (messages) => toolLabel(button.label, { locale, messages }),
|
|
364
|
+
};
|
|
365
|
+
// Набор уже отфильтрован: кнопка есть только у включённого Инструмента.
|
|
366
|
+
if (button.shortcutGroup) {
|
|
367
|
+
// Группа справочника — привилегия кита: она бывает только у встроенного.
|
|
368
|
+
commands.push({ ...row, group: button.shortcutGroup, tool: descriptor.name as Tool });
|
|
369
|
+
} else own.push(row);
|
|
370
|
+
}
|
|
371
|
+
// Пункты вставки и Действия над Блоком: сочетание — их поле (ADR-0058, п. 5.7).
|
|
372
|
+
for (const entry of [...(descriptor.insertItems ?? []), ...(descriptor.blockActions ?? [])]) {
|
|
373
|
+
if (entry.shortcut) {
|
|
374
|
+
own.push({
|
|
375
|
+
id: entry.id,
|
|
376
|
+
keys: entry.shortcut,
|
|
377
|
+
label: (messages) => entry.label(messages, locale),
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
if (own.length > 0) ownGroups.push({ group: descriptor.name, commands: own });
|
|
382
|
+
}
|
|
383
|
+
return [
|
|
384
|
+
...SHORTCUT_GROUPS.map((group) => ({
|
|
385
|
+
group,
|
|
386
|
+
commands: commands.filter((command) => command.group === group),
|
|
387
|
+
})),
|
|
388
|
+
...ownGroups,
|
|
389
|
+
].filter((entry) => entry.commands.length > 0);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Apple ли это — ТЕМ ЖЕ признаком, что у ProseMirror (`prosemirror-keymap`):
|
|
394
|
+
* `mod` там значит `⌘` ровно тогда, когда `navigator.platform` похож на Mac или
|
|
395
|
+
* iOS. Подпись, выведенная иначе, разошлась бы с тем, что движок реально
|
|
396
|
+
* слушает. Панель рисуется только в браузере (движок создаётся после
|
|
397
|
+
* гидратации), поэтому `navigator` здесь есть всегда; проверка `typeof` — ради
|
|
398
|
+
* серверного импорта модуля.
|
|
399
|
+
*/
|
|
400
|
+
export function isApple(): boolean {
|
|
401
|
+
return typeof navigator !== "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
const APPLE_SYMBOLS: Record<string, string> = { mod: "⌘", alt: "⌥", shift: "⇧" };
|
|
405
|
+
const OTHER_NAMES: Record<string, string> = { mod: "Ctrl", alt: "Alt", shift: "Shift" };
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Сочетание для глаз: `⌘+⇧+S` на Apple, `Ctrl+Shift+S` у остальных. Названия
|
|
409
|
+
* клавиш не переводятся: это надписи на клавишах.
|
|
410
|
+
*
|
|
411
|
+
* Плюс между клавишами — и на Apple, хотя меню macOS пишут
|
|
412
|
+
* сочетание слитно: в справочнике из трёх десятков строк `⌘⌥⇧↑` читается
|
|
413
|
+
* как одно слово, а `⌘+⌥+⇧+↑` — как клавиши, которые нажимают вместе. Одна
|
|
414
|
+
* функция на все подписи Редактора, поэтому тултип и справочник не расходятся.
|
|
415
|
+
*/
|
|
416
|
+
export function shortcutLabel(keys: readonly string[], apple: boolean): string {
|
|
417
|
+
const names = apple ? APPLE_SYMBOLS : OTHER_NAMES;
|
|
418
|
+
return keys.map((key) => names[key] ?? key).join("+");
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Сочетание для `aria-keyshortcuts`: имена клавиш по спецификации ARIA
|
|
423
|
+
* (`Control`, `Meta`, `Shift`, `Alt`), а не символы — скринридер читает их сам.
|
|
424
|
+
* Стрелки по ARIA называются `ArrowUp` и `ArrowDown`.
|
|
425
|
+
*/
|
|
426
|
+
export function ariaShortcut(keys: readonly string[], apple: boolean): string {
|
|
427
|
+
const names: Record<string, string> = {
|
|
428
|
+
mod: apple ? "Meta" : "Control",
|
|
429
|
+
alt: "Alt",
|
|
430
|
+
shift: "Shift",
|
|
431
|
+
"↑": "ArrowUp",
|
|
432
|
+
"↓": "ArrowDown",
|
|
433
|
+
};
|
|
434
|
+
return keys.map((key) => names[key] ?? key).join("+");
|
|
435
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { createDocument, getSchema } from "@tiptap/core";
|
|
4
|
+
import { DOMSerializer } from "@tiptap/pm/model";
|
|
5
|
+
import { withCodeHeaders } from "../features/code/codeHeader.js";
|
|
6
|
+
import { createEditorExtensions, type EditorExtensionOptions } from "./extensions.js";
|
|
7
|
+
import { toolList, type ToolDescriptor, type ToolList } from "./toolDescriptor.js";
|
|
8
|
+
import type { ToolLoader } from "./toolLoader.js";
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
Документ Скелета (ADR-0058, п. 11.4): `value`, очищенный Схемой
|
|
12
|
+
кита, — тот же разбор, что у движка, только без движка.
|
|
13
|
+
|
|
14
|
+
Скелет стоит на месте Документа до Готовности, и до эпика Редактор был
|
|
15
|
+
безопасен и с неочищенным `value`: строка шла только через разбор Схемой.
|
|
16
|
+
Вставить её как есть значило бы исполнить `<img onerror>` из чужого значения.
|
|
17
|
+
Поэтому строка разбирается в инертном документе (`DOMParser` браузера: там не
|
|
18
|
+
исполняются ни скрипты, ни обработчики и не грузятся картинки) по Схеме
|
|
19
|
+
набора и выгружается обратно в HTML — в документ, тоже инертный. Что Схема не
|
|
20
|
+
знает (теги, атрибуты, обработчики, `javascript:`), не доходит до страницы.
|
|
21
|
+
|
|
22
|
+
Схема — та, что получит движок, но без Частей для движка, чьи загрузчики ещё
|
|
23
|
+
не отработали: их Блоки видны текстом, обёртку Схема снимает. Ленивый
|
|
24
|
+
встроенный (`codeBlock`, `table`) вместо Части для движка даёт
|
|
25
|
+
форму Блоков (`skeleton` описания) — его Блоки видны своей разметкой, и поле
|
|
26
|
+
не прыгает с приходом чанка. Шапка блока кода — та же, что у `RichTextView`
|
|
27
|
+
(`withCodeHeaders`): в Редакторе она есть, и без неё Скелет был бы ниже. Набор
|
|
28
|
+
расширений собирается ради одной Схемы: движка, плагинов и представлений
|
|
29
|
+
узлов здесь нет, а мосты `RichTextEditor` не нужны — им стоят заглушки.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const quiet = () => {};
|
|
33
|
+
const no = () => false;
|
|
34
|
+
|
|
35
|
+
/** Мосты набора движка: Схема их не читает, а картинке без них нет места в Схеме. */
|
|
36
|
+
const SCHEMA_ONLY: Omit<EditorExtensionOptions, "tools"> = {
|
|
37
|
+
placeholder: () => "",
|
|
38
|
+
limit: () => undefined,
|
|
39
|
+
taskCheckbox: (text) => text,
|
|
40
|
+
openPopover: quiet,
|
|
41
|
+
focusToolbar: no,
|
|
42
|
+
openBlockMenu: no,
|
|
43
|
+
onNotice: quiet,
|
|
44
|
+
image: {
|
|
45
|
+
onOpenEditor: quiet,
|
|
46
|
+
captionPlaceholder: () => "",
|
|
47
|
+
uploadingLabel: (name) => name,
|
|
48
|
+
upload: () => undefined,
|
|
49
|
+
describeNotice: () => ({ tone: "status", text: "" }),
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Набор с описаниями, которые оставил `pick` (`undefined` — описание выпадает):
|
|
55
|
+
* имена — те же, Схему решают описания.
|
|
56
|
+
*/
|
|
57
|
+
function narrowed(
|
|
58
|
+
tools: ToolList,
|
|
59
|
+
pick: (descriptor: ToolDescriptor) => ToolDescriptor | undefined
|
|
60
|
+
): ToolList {
|
|
61
|
+
return toolList(
|
|
62
|
+
tools,
|
|
63
|
+
tools.descriptors.flatMap((d) => pick(d) ?? [])
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** HTML Документа по Схеме набора; Схема не собралась — `null`. */
|
|
68
|
+
function cleaned(html: string, tools: ToolList): string | null {
|
|
69
|
+
try {
|
|
70
|
+
const schema = getSchema(createEditorExtensions({ tools, ...SCHEMA_ONLY }));
|
|
71
|
+
const inert = document.implementation.createHTMLDocument("");
|
|
72
|
+
const box = inert.createElement("div");
|
|
73
|
+
box.append(
|
|
74
|
+
DOMSerializer.fromSchema(schema).serializeFragment(createDocument(html, schema).content, {
|
|
75
|
+
document: inert,
|
|
76
|
+
})
|
|
77
|
+
);
|
|
78
|
+
// Пустое гнездо «Копировать»: острова у Скелета нет, гнездо держит место.
|
|
79
|
+
return withCodeHeaders(box.innerHTML, "");
|
|
80
|
+
} catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Документ Скелета: `html`, очищенный Схемой набора без Частей ещё не
|
|
87
|
+
* отработавших загрузчиков (`pending`). Только в браузере.
|
|
88
|
+
*
|
|
89
|
+
* Набор с ошибкой своих Инструментов Схемы не даёт (ошибка поля, ADR-0058,
|
|
90
|
+
* п. 1.5) — тогда Скелет чистит Схемой встроенных: Документ остаётся виден.
|
|
91
|
+
*/
|
|
92
|
+
export function skeletonHtml(
|
|
93
|
+
html: string,
|
|
94
|
+
tools: ToolList,
|
|
95
|
+
pending: readonly ToolLoader[]
|
|
96
|
+
): string {
|
|
97
|
+
// Описание, чей загрузчик ещё не отработал, уступает место форме Блоков — или выпадает.
|
|
98
|
+
const settled = (d: ToolDescriptor): ToolDescriptor | undefined =>
|
|
99
|
+
!d.load || !pending.includes(d.load) ? d : d.skeleton && { name: d.name, engine: d.skeleton };
|
|
100
|
+
return (
|
|
101
|
+
cleaned(html, narrowed(tools, settled)) ??
|
|
102
|
+
cleaned(
|
|
103
|
+
html,
|
|
104
|
+
narrowed(tools, (d) => (d.custom ? undefined : settled(d)))
|
|
105
|
+
) ??
|
|
106
|
+
""
|
|
107
|
+
);
|
|
108
|
+
}
|