@shelamkoff/rector 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE +17 -0
- package/README.md +23 -0
- package/THIRD_PARTY_LICENSES.txt +298 -0
- package/dist/I18n.d.ts +1 -0
- package/dist/core/Block.d.ts +110 -0
- package/dist/core/Block.js +390 -0
- package/dist/core/BlockAnimator.d.ts +39 -0
- package/dist/core/BlockAnimator.js +106 -0
- package/dist/core/BlockManager.d.ts +163 -0
- package/dist/core/BlockManager.js +640 -0
- package/dist/core/BlockOperations.d.ts +67 -0
- package/dist/core/BlockOperations.js +238 -0
- package/dist/core/ChangeNotifier.d.ts +15 -0
- package/dist/core/ChangeNotifier.js +55 -0
- package/dist/core/CommandDispatcher.d.ts +52 -0
- package/dist/core/CommandDispatcher.js +208 -0
- package/dist/core/CrossBlockSelection.d.ts +30 -0
- package/dist/core/CrossBlockSelection.js +74 -0
- package/dist/core/Diagnostics.d.ts +23 -0
- package/dist/core/Diagnostics.js +62 -0
- package/dist/core/DocumentSchema.d.ts +29 -0
- package/dist/core/DocumentSchema.js +147 -0
- package/dist/core/DocumentSnapshotStore.d.ts +34 -0
- package/dist/core/DocumentSnapshotStore.js +153 -0
- package/dist/core/DragManager.d.ts +17 -0
- package/dist/core/DragManager.js +223 -0
- package/dist/core/EditorFacade.d.ts +154 -0
- package/dist/core/EditorFacade.js +361 -0
- package/dist/core/EditorHolderOwnership.d.ts +12 -0
- package/dist/core/EditorHolderOwnership.js +28 -0
- package/dist/core/I18n.d.ts +147 -0
- package/dist/core/I18n.js +296 -0
- package/dist/core/InlinePatternMatcher.d.ts +26 -0
- package/dist/core/InlinePatternMatcher.js +267 -0
- package/dist/core/InlinePluginRegistry.d.ts +55 -0
- package/dist/core/InlinePluginRegistry.js +128 -0
- package/dist/core/KeyboardManager.d.ts +17 -0
- package/dist/core/KeyboardManager.js +231 -0
- package/dist/core/LifecycleScope.d.ts +19 -0
- package/dist/core/LifecycleScope.js +41 -0
- package/dist/core/MouseSelectionManager.d.ts +30 -0
- package/dist/core/MouseSelectionManager.js +307 -0
- package/dist/core/PluginOwnership.d.ts +9 -0
- package/dist/core/PluginOwnership.js +40 -0
- package/dist/core/PopupManager.d.ts +50 -0
- package/dist/core/PopupManager.js +183 -0
- package/dist/core/PreservedBlockPlugin.d.ts +11 -0
- package/dist/core/PreservedBlockPlugin.js +42 -0
- package/dist/core/PublicEditorApi.d.ts +82 -0
- package/dist/core/PublicEditorApi.js +158 -0
- package/dist/core/SelectionManager.d.ts +50 -0
- package/dist/core/SelectionManager.js +205 -0
- package/dist/core/ShortcutRegistry.d.ts +29 -0
- package/dist/core/ShortcutRegistry.js +106 -0
- package/dist/core/SlashCommands.d.ts +34 -0
- package/dist/core/SlashCommands.js +483 -0
- package/dist/core/StyleInjector.d.ts +1 -0
- package/dist/core/StyleInjector.js +1 -0
- package/dist/core/Tooltip.d.ts +17 -0
- package/dist/core/Tooltip.js +60 -0
- package/dist/core/TriggerManager.d.ts +17 -0
- package/dist/core/TriggerManager.js +159 -0
- package/dist/core/TypeSelector.d.ts +31 -0
- package/dist/core/TypeSelector.js +464 -0
- package/dist/core/UndoManager.d.ts +72 -0
- package/dist/core/UndoManager.js +383 -0
- package/dist/core/block-settings-menu/BlockActions.d.ts +81 -0
- package/dist/core/block-settings-menu/BlockActions.js +233 -0
- package/dist/core/block-settings-menu/BlockSettingsMenu.d.ts +46 -0
- package/dist/core/block-settings-menu/BlockSettingsMenu.js +205 -0
- package/dist/core/block-settings-menu/MenuBuilder.d.ts +43 -0
- package/dist/core/block-settings-menu/MenuBuilder.js +203 -0
- package/dist/core/block-settings-menu/MenuPositioner.d.ts +22 -0
- package/dist/core/block-settings-menu/MenuPositioner.js +79 -0
- package/dist/core/clipboard/Clipboard.d.ts +47 -0
- package/dist/core/clipboard/Clipboard.js +653 -0
- package/dist/core/clipboard/CrossBlockEditor.d.ts +43 -0
- package/dist/core/clipboard/CrossBlockEditor.js +198 -0
- package/dist/core/clipboard/PasteRouter.d.ts +27 -0
- package/dist/core/clipboard/PasteRouter.js +86 -0
- package/dist/core/clipboard/pasteInsert.d.ts +35 -0
- package/dist/core/clipboard/pasteInsert.js +215 -0
- package/dist/core/clipboard/pasteUtils.d.ts +25 -0
- package/dist/core/clipboard/pasteUtils.js +98 -0
- package/dist/core/config.d.ts +77 -0
- package/dist/core/config.js +100 -0
- package/dist/core/constants.d.ts +23 -0
- package/dist/core/constants.js +30 -0
- package/dist/core/crossBlockConvert.d.ts +38 -0
- package/dist/core/crossBlockConvert.js +253 -0
- package/dist/core/dom.d.ts +35 -0
- package/dist/core/dom.js +65 -0
- package/dist/core/editorEvents.d.ts +89 -0
- package/dist/core/editorEvents.js +60 -0
- package/dist/core/hydrateInlinePlugins.d.ts +9 -0
- package/dist/core/hydrateInlinePlugins.js +36 -0
- package/dist/core/icons.d.ts +10 -0
- package/dist/core/icons.js +21 -0
- package/dist/core/index.d.ts +59 -0
- package/dist/core/index.js +703 -0
- package/dist/core/inline-toolbar/ActionsPanel.d.ts +61 -0
- package/dist/core/inline-toolbar/ActionsPanel.js +132 -0
- package/dist/core/inline-toolbar/InlinePositioner.d.ts +20 -0
- package/dist/core/inline-toolbar/InlinePositioner.js +63 -0
- package/dist/core/inline-toolbar/InlineToolbar.d.ts +45 -0
- package/dist/core/inline-toolbar/InlineToolbar.js +456 -0
- package/dist/core/inline-toolbar/PluginControlsSlot.d.ts +52 -0
- package/dist/core/inline-toolbar/PluginControlsSlot.js +118 -0
- package/dist/core/inline-toolbar/SelectionTracker.d.ts +63 -0
- package/dist/core/inline-toolbar/SelectionTracker.js +173 -0
- package/dist/core/inlinePluginInsert.d.ts +13 -0
- package/dist/core/inlinePluginInsert.js +56 -0
- package/dist/core/locale/en.d.ts +35 -0
- package/dist/core/locale/en.js +37 -0
- package/dist/core/locale/ru.d.ts +35 -0
- package/dist/core/locale/ru.js +37 -0
- package/dist/core/menuKeyboardNav.d.ts +15 -0
- package/dist/core/menuKeyboardNav.js +52 -0
- package/dist/core/sanitize.d.ts +2 -0
- package/dist/core/sanitize.js +6 -0
- package/dist/core/splitConvert.d.ts +46 -0
- package/dist/core/splitConvert.js +190 -0
- package/dist/core/textOffset.d.ts +46 -0
- package/dist/core/textOffset.js +180 -0
- package/dist/core/themes/dark.css +30 -0
- package/dist/core/themes/light.css +33 -0
- package/dist/core/themes/variables.css +1170 -0
- package/dist/core/toolbar/OffcanvasRoot.d.ts +37 -0
- package/dist/core/toolbar/OffcanvasRoot.js +127 -0
- package/dist/core/toolbar/Toolbar.d.ts +70 -0
- package/dist/core/toolbar/Toolbar.js +432 -0
- package/dist/core/toolbar/ToolbarPositioner.d.ts +60 -0
- package/dist/core/toolbar/ToolbarPositioner.js +188 -0
- package/dist/core/toolbar/ToolboxBuilder.d.ts +44 -0
- package/dist/core/toolbar/ToolboxBuilder.js +260 -0
- package/dist/core/types.d.ts +747 -0
- package/dist/core/uid.d.ts +6 -0
- package/dist/core/uid.js +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/inline-plugins/README.md +35 -0
- package/dist/inline-plugins/README.ru.md +35 -0
- package/dist/inline-plugins/color/README.md +61 -0
- package/dist/inline-plugins/color/README.ru.md +61 -0
- package/dist/inline-plugins/color.d.ts +8 -0
- package/dist/inline-plugins/color.js +184 -0
- package/dist/inline-plugins/locale/en.d.ts +7 -0
- package/dist/inline-plugins/locale/en.js +6 -0
- package/dist/inline-plugins/locale/ru.d.ts +7 -0
- package/dist/inline-plugins/locale/ru.js +6 -0
- package/dist/inline-plugins/mention/README.md +97 -0
- package/dist/inline-plugins/mention/README.ru.md +97 -0
- package/dist/inline-plugins/mention/index.d.ts +110 -0
- package/dist/inline-plugins/mention/index.js +1897 -0
- package/dist/inline-plugins/mention/styles.css +183 -0
- package/dist/inline-plugins/mention/widget.d.ts +16 -0
- package/dist/inline-plugins/mention/widget.js +75 -0
- package/dist/inline-tools/align.d.ts +14 -0
- package/dist/inline-tools/align.js +120 -0
- package/dist/inline-tools/bold.d.ts +8 -0
- package/dist/inline-tools/bold.js +12 -0
- package/dist/inline-tools/caseTransform.d.ts +8 -0
- package/dist/inline-tools/caseTransform.js +87 -0
- package/dist/inline-tools/clearFormatting.d.ts +8 -0
- package/dist/inline-tools/clearFormatting.js +74 -0
- package/dist/inline-tools/code.d.ts +8 -0
- package/dist/inline-tools/code.js +12 -0
- package/dist/inline-tools/colorPicker.d.ts +7 -0
- package/dist/inline-tools/colorPicker.js +271 -0
- package/dist/inline-tools/defaults.d.ts +10 -0
- package/dist/inline-tools/defaults.js +57 -0
- package/dist/inline-tools/fontSize.d.ts +7 -0
- package/dist/inline-tools/fontSize.js +524 -0
- package/dist/inline-tools/italic.d.ts +8 -0
- package/dist/inline-tools/italic.js +12 -0
- package/dist/inline-tools/link.d.ts +12 -0
- package/dist/inline-tools/link.js +251 -0
- package/dist/inline-tools/marker.d.ts +8 -0
- package/dist/inline-tools/marker.js +12 -0
- package/dist/inline-tools/scriptTool.d.ts +11 -0
- package/dist/inline-tools/scriptTool.js +149 -0
- package/dist/inline-tools/strikethrough.d.ts +8 -0
- package/dist/inline-tools/strikethrough.js +12 -0
- package/dist/inline-tools/utils.d.ts +220 -0
- package/dist/inline-tools/utils.js +992 -0
- package/dist/locale/en.d.ts +311 -0
- package/dist/locale/en.js +52 -0
- package/dist/locale/ru.d.ts +315 -0
- package/dist/locale/ru.js +52 -0
- package/dist/plugins/BlockPluginAbstract.d.ts +82 -0
- package/dist/plugins/BlockPluginAbstract.js +111 -0
- package/dist/plugins/README.md +44 -0
- package/dist/plugins/README.ru.md +40 -0
- package/dist/plugins/async.d.ts +35 -0
- package/dist/plugins/async.js +79 -0
- package/dist/plugins/attaches/README.md +86 -0
- package/dist/plugins/attaches/README.ru.md +87 -0
- package/dist/plugins/attaches/attaches.css +374 -0
- package/dist/plugins/attaches/index.d.ts +133 -0
- package/dist/plugins/attaches/index.js +921 -0
- package/dist/plugins/attaches/locale/en.d.ts +23 -0
- package/dist/plugins/attaches/locale/en.js +19 -0
- package/dist/plugins/attaches/locale/keys.d.ts +5 -0
- package/dist/plugins/attaches/locale/ru.d.ts +25 -0
- package/dist/plugins/attaches/locale/ru.js +19 -0
- package/dist/plugins/carousel/README.md +108 -0
- package/dist/plugins/carousel/README.ru.md +109 -0
- package/dist/plugins/carousel/carousel.css +198 -0
- package/dist/plugins/carousel/icons.d.ts +12 -0
- package/dist/plugins/carousel/icons.js +13 -0
- package/dist/plugins/carousel/index.d.ts +137 -0
- package/dist/plugins/carousel/index.js +859 -0
- package/dist/plugins/carousel/locale/en.d.ts +41 -0
- package/dist/plugins/carousel/locale/en.js +40 -0
- package/dist/plugins/carousel/locale/keys.d.ts +2 -0
- package/dist/plugins/carousel/locale/ru.d.ts +41 -0
- package/dist/plugins/carousel/locale/ru.js +40 -0
- package/dist/plugins/carousel/state.d.ts +29 -0
- package/dist/plugins/carousel/state.js +42 -0
- package/dist/plugins/checklist/README.md +54 -0
- package/dist/plugins/checklist/README.ru.md +55 -0
- package/dist/plugins/checklist/checklist.css +80 -0
- package/dist/plugins/checklist/index.d.ts +75 -0
- package/dist/plugins/checklist/index.js +407 -0
- package/dist/plugins/checklist/locale/en.d.ts +5 -0
- package/dist/plugins/checklist/locale/en.js +4 -0
- package/dist/plugins/checklist/locale/keys.d.ts +5 -0
- package/dist/plugins/checklist/locale/ru.d.ts +5 -0
- package/dist/plugins/checklist/locale/ru.js +4 -0
- package/dist/plugins/checklist/mapTextFields.d.ts +1 -0
- package/dist/plugins/checklist/mapTextFields.js +1 -0
- package/dist/plugins/code/README.md +59 -0
- package/dist/plugins/code/README.ru.md +60 -0
- package/dist/plugins/code/code.css +360 -0
- package/dist/plugins/code/index.d.ts +109 -0
- package/dist/plugins/code/index.js +1012 -0
- package/dist/plugins/code/locale/en.d.ts +11 -0
- package/dist/plugins/code/locale/en.js +10 -0
- package/dist/plugins/code/locale/keys.d.ts +5 -0
- package/dist/plugins/code/locale/ru.d.ts +11 -0
- package/dist/plugins/code/locale/ru.js +10 -0
- package/dist/plugins/columns/README.md +55 -0
- package/dist/plugins/columns/README.ru.md +56 -0
- package/dist/plugins/columns/columns.css +103 -0
- package/dist/plugins/columns/index.d.ts +58 -0
- package/dist/plugins/columns/index.js +236 -0
- package/dist/plugins/columns/locale/en.d.ts +6 -0
- package/dist/plugins/columns/locale/en.js +5 -0
- package/dist/plugins/columns/locale/keys.d.ts +5 -0
- package/dist/plugins/columns/locale/ru.d.ts +6 -0
- package/dist/plugins/columns/locale/ru.js +5 -0
- package/dist/plugins/delimiter/README.md +48 -0
- package/dist/plugins/delimiter/README.ru.md +49 -0
- package/dist/plugins/delimiter/delimiter.css +22 -0
- package/dist/plugins/delimiter/index.d.ts +38 -0
- package/dist/plugins/delimiter/index.js +69 -0
- package/dist/plugins/delimiter/locale/en.d.ts +4 -0
- package/dist/plugins/delimiter/locale/en.js +3 -0
- package/dist/plugins/delimiter/locale/keys.d.ts +5 -0
- package/dist/plugins/delimiter/locale/ru.d.ts +4 -0
- package/dist/plugins/delimiter/locale/ru.js +3 -0
- package/dist/plugins/embed/README.md +81 -0
- package/dist/plugins/embed/README.ru.md +82 -0
- package/dist/plugins/embed/embed.css +558 -0
- package/dist/plugins/embed/index.d.ts +271 -0
- package/dist/plugins/embed/index.js +967 -0
- package/dist/plugins/embed/locale/en.d.ts +20 -0
- package/dist/plugins/embed/locale/en.js +19 -0
- package/dist/plugins/embed/locale/keys.d.ts +5 -0
- package/dist/plugins/embed/locale/ru.d.ts +20 -0
- package/dist/plugins/embed/locale/ru.js +19 -0
- package/dist/plugins/embed/player.d.ts +1 -0
- package/dist/plugins/embed/player.js +1 -0
- package/dist/plugins/gallery/README.md +92 -0
- package/dist/plugins/gallery/README.ru.md +93 -0
- package/dist/plugins/gallery/css.d.ts +52 -0
- package/dist/plugins/gallery/css.js +67 -0
- package/dist/plugins/gallery/gallery.css +860 -0
- package/dist/plugins/gallery/icons.d.ts +13 -0
- package/dist/plugins/gallery/icons.js +45 -0
- package/dist/plugins/gallery/index.d.ts +126 -0
- package/dist/plugins/gallery/index.js +355 -0
- package/dist/plugins/gallery/layout.d.ts +35 -0
- package/dist/plugins/gallery/layout.js +79 -0
- package/dist/plugins/gallery/locale/en.d.ts +36 -0
- package/dist/plugins/gallery/locale/en.js +35 -0
- package/dist/plugins/gallery/locale/keys.d.ts +5 -0
- package/dist/plugins/gallery/locale/ru.d.ts +36 -0
- package/dist/plugins/gallery/locale/ru.js +35 -0
- package/dist/plugins/gallery/settings.d.ts +25 -0
- package/dist/plugins/gallery/settings.js +199 -0
- package/dist/plugins/gallery/slot.d.ts +73 -0
- package/dist/plugins/gallery/slot.js +260 -0
- package/dist/plugins/gallery/state.d.ts +67 -0
- package/dist/plugins/gallery/state.js +133 -0
- package/dist/plugins/gallery/styles.d.ts +10 -0
- package/dist/plugins/gallery/styles.js +24 -0
- package/dist/plugins/gallery/uploader.d.ts +31 -0
- package/dist/plugins/gallery/uploader.js +111 -0
- package/dist/plugins/gallery/view-empty.d.ts +41 -0
- package/dist/plugins/gallery/view-empty.js +56 -0
- package/dist/plugins/gallery/view-filled.d.ts +55 -0
- package/dist/plugins/gallery/view-filled.js +353 -0
- package/dist/plugins/heading/HeadingLevelSelect.d.ts +16 -0
- package/dist/plugins/heading/HeadingLevelSelect.js +183 -0
- package/dist/plugins/heading/README.md +58 -0
- package/dist/plugins/heading/README.ru.md +59 -0
- package/dist/plugins/heading/heading.css +76 -0
- package/dist/plugins/heading/index.d.ts +124 -0
- package/dist/plugins/heading/index.js +273 -0
- package/dist/plugins/heading/locale/en.d.ts +11 -0
- package/dist/plugins/heading/locale/en.js +10 -0
- package/dist/plugins/heading/locale/keys.d.ts +5 -0
- package/dist/plugins/heading/locale/ru.d.ts +11 -0
- package/dist/plugins/heading/locale/ru.js +10 -0
- package/dist/plugins/heading/mapTextFields.d.ts +1 -0
- package/dist/plugins/heading/mapTextFields.js +1 -0
- package/dist/plugins/image/README.md +93 -0
- package/dist/plugins/image/README.ru.md +94 -0
- package/dist/plugins/image/css.d.ts +47 -0
- package/dist/plugins/image/css.js +47 -0
- package/dist/plugins/image/icons.d.ts +13 -0
- package/dist/plugins/image/icons.js +26 -0
- package/dist/plugins/image/image.css +559 -0
- package/dist/plugins/image/index.d.ts +129 -0
- package/dist/plugins/image/index.js +346 -0
- package/dist/plugins/image/locale/en.d.ts +39 -0
- package/dist/plugins/image/locale/en.js +38 -0
- package/dist/plugins/image/locale/keys.d.ts +5 -0
- package/dist/plugins/image/locale/ru.d.ts +39 -0
- package/dist/plugins/image/locale/ru.js +38 -0
- package/dist/plugins/image/settings.d.ts +23 -0
- package/dist/plugins/image/settings.js +347 -0
- package/dist/plugins/image/state.d.ts +86 -0
- package/dist/plugins/image/state.js +151 -0
- package/dist/plugins/image/styles.d.ts +21 -0
- package/dist/plugins/image/styles.js +58 -0
- package/dist/plugins/image/uploader.d.ts +31 -0
- package/dist/plugins/image/uploader.js +92 -0
- package/dist/plugins/image/view-empty.d.ts +44 -0
- package/dist/plugins/image/view-empty.js +61 -0
- package/dist/plugins/image/view-filled.d.ts +49 -0
- package/dist/plugins/image/view-filled.js +282 -0
- package/dist/plugins/index.d.ts +21 -0
- package/dist/plugins/index.js +22 -0
- package/dist/plugins/link-preview/README.md +69 -0
- package/dist/plugins/link-preview/README.ru.md +70 -0
- package/dist/plugins/link-preview/index.d.ts +169 -0
- package/dist/plugins/link-preview/index.js +698 -0
- package/dist/plugins/link-preview/link-preview.css +254 -0
- package/dist/plugins/link-preview/locale/en.d.ts +14 -0
- package/dist/plugins/link-preview/locale/en.js +13 -0
- package/dist/plugins/link-preview/locale/keys.d.ts +5 -0
- package/dist/plugins/link-preview/locale/ru.d.ts +14 -0
- package/dist/plugins/link-preview/locale/ru.js +13 -0
- package/dist/plugins/list/README.md +59 -0
- package/dist/plugins/list/README.ru.md +60 -0
- package/dist/plugins/list/index.d.ts +134 -0
- package/dist/plugins/list/index.js +566 -0
- package/dist/plugins/list/list.css +57 -0
- package/dist/plugins/list/locale/en.d.ts +5 -0
- package/dist/plugins/list/locale/en.js +4 -0
- package/dist/plugins/list/locale/keys.d.ts +5 -0
- package/dist/plugins/list/locale/ru.d.ts +5 -0
- package/dist/plugins/list/locale/ru.js +4 -0
- package/dist/plugins/list/mapTextFields.d.ts +1 -0
- package/dist/plugins/list/mapTextFields.js +1 -0
- package/dist/plugins/paragraph/README.md +57 -0
- package/dist/plugins/paragraph/README.ru.md +58 -0
- package/dist/plugins/paragraph/index.d.ts +112 -0
- package/dist/plugins/paragraph/index.js +158 -0
- package/dist/plugins/paragraph/locale/en.d.ts +5 -0
- package/dist/plugins/paragraph/locale/en.js +4 -0
- package/dist/plugins/paragraph/locale/keys.d.ts +5 -0
- package/dist/plugins/paragraph/locale/ru.d.ts +5 -0
- package/dist/plugins/paragraph/locale/ru.js +4 -0
- package/dist/plugins/paragraph/mapTextFields.d.ts +1 -0
- package/dist/plugins/paragraph/mapTextFields.js +1 -0
- package/dist/plugins/paragraph/paragraph.css +56 -0
- package/dist/plugins/person/README.md +72 -0
- package/dist/plugins/person/README.ru.md +73 -0
- package/dist/plugins/person/index.d.ts +189 -0
- package/dist/plugins/person/index.js +777 -0
- package/dist/plugins/person/locale/en.d.ts +18 -0
- package/dist/plugins/person/locale/en.js +17 -0
- package/dist/plugins/person/locale/keys.d.ts +5 -0
- package/dist/plugins/person/locale/ru.d.ts +18 -0
- package/dist/plugins/person/locale/ru.js +17 -0
- package/dist/plugins/person/person.css +431 -0
- package/dist/plugins/person/socialResolver.d.ts +18 -0
- package/dist/plugins/person/socialResolver.js +69 -0
- package/dist/plugins/poll/README.md +96 -0
- package/dist/plugins/poll/README.ru.md +97 -0
- package/dist/plugins/poll/index.d.ts +134 -0
- package/dist/plugins/poll/index.js +825 -0
- package/dist/plugins/poll/locale/en.d.ts +23 -0
- package/dist/plugins/poll/locale/en.js +22 -0
- package/dist/plugins/poll/locale/keys.d.ts +5 -0
- package/dist/plugins/poll/locale/ru.d.ts +23 -0
- package/dist/plugins/poll/locale/ru.js +22 -0
- package/dist/plugins/poll/poll.css +400 -0
- package/dist/plugins/quote/README.md +55 -0
- package/dist/plugins/quote/README.ru.md +56 -0
- package/dist/plugins/quote/index.d.ts +81 -0
- package/dist/plugins/quote/index.js +165 -0
- package/dist/plugins/quote/locale/en.d.ts +6 -0
- package/dist/plugins/quote/locale/en.js +5 -0
- package/dist/plugins/quote/locale/keys.d.ts +5 -0
- package/dist/plugins/quote/locale/ru.d.ts +6 -0
- package/dist/plugins/quote/locale/ru.js +5 -0
- package/dist/plugins/quote/mapTextFields.d.ts +1 -0
- package/dist/plugins/quote/mapTextFields.js +1 -0
- package/dist/plugins/quote/quote.css +72 -0
- package/dist/plugins/raw/README.md +54 -0
- package/dist/plugins/raw/README.ru.md +55 -0
- package/dist/plugins/raw/index.d.ts +62 -0
- package/dist/plugins/raw/index.js +227 -0
- package/dist/plugins/raw/locale/en.d.ts +7 -0
- package/dist/plugins/raw/locale/en.js +6 -0
- package/dist/plugins/raw/locale/keys.d.ts +5 -0
- package/dist/plugins/raw/locale/ru.d.ts +7 -0
- package/dist/plugins/raw/locale/ru.js +6 -0
- package/dist/plugins/raw/raw.css +127 -0
- package/dist/plugins/shared/actionBar.d.ts +19 -0
- package/dist/plugins/shared/actionBar.js +35 -0
- package/dist/plugins/shared/dropzone.d.ts +106 -0
- package/dist/plugins/shared/dropzone.js +107 -0
- package/dist/plugins/shared/fileInput.d.ts +44 -0
- package/dist/plugins/shared/fileInput.js +62 -0
- package/dist/plugins/spoiler/README.md +55 -0
- package/dist/plugins/spoiler/README.ru.md +56 -0
- package/dist/plugins/spoiler/index.d.ts +61 -0
- package/dist/plugins/spoiler/index.js +169 -0
- package/dist/plugins/spoiler/locale/en.d.ts +7 -0
- package/dist/plugins/spoiler/locale/en.js +6 -0
- package/dist/plugins/spoiler/locale/keys.d.ts +5 -0
- package/dist/plugins/spoiler/locale/ru.d.ts +7 -0
- package/dist/plugins/spoiler/locale/ru.js +6 -0
- package/dist/plugins/spoiler/spoiler.css +101 -0
- package/dist/plugins/table/README.md +55 -0
- package/dist/plugins/table/README.ru.md +56 -0
- package/dist/plugins/table/index.d.ts +85 -0
- package/dist/plugins/table/index.js +399 -0
- package/dist/plugins/table/locale/en.d.ts +9 -0
- package/dist/plugins/table/locale/en.js +8 -0
- package/dist/plugins/table/locale/keys.d.ts +5 -0
- package/dist/plugins/table/locale/ru.d.ts +9 -0
- package/dist/plugins/table/locale/ru.js +8 -0
- package/dist/plugins/table/table.css +58 -0
- package/dist/plugins/toggle/README.md +56 -0
- package/dist/plugins/toggle/README.ru.md +57 -0
- package/dist/plugins/toggle/index.d.ts +69 -0
- package/dist/plugins/toggle/index.js +191 -0
- package/dist/plugins/toggle/locale/en.d.ts +7 -0
- package/dist/plugins/toggle/locale/en.js +6 -0
- package/dist/plugins/toggle/locale/keys.d.ts +5 -0
- package/dist/plugins/toggle/locale/ru.d.ts +7 -0
- package/dist/plugins/toggle/locale/ru.js +6 -0
- package/dist/plugins/toggle/toggle.css +101 -0
- package/dist/plugins/warning/README.md +55 -0
- package/dist/plugins/warning/README.ru.md +56 -0
- package/dist/plugins/warning/index.d.ts +66 -0
- package/dist/plugins/warning/index.js +167 -0
- package/dist/plugins/warning/locale/en.d.ts +6 -0
- package/dist/plugins/warning/locale/en.js +5 -0
- package/dist/plugins/warning/locale/keys.d.ts +5 -0
- package/dist/plugins/warning/locale/ru.d.ts +6 -0
- package/dist/plugins/warning/locale/ru.js +5 -0
- package/dist/plugins/warning/warning.css +63 -0
- package/dist/renderer/async.d.ts +1 -0
- package/dist/renderer/async.js +7 -0
- package/dist/renderer/errors.d.ts +27 -0
- package/dist/renderer/errors.js +48 -0
- package/dist/renderer/index.d.ts +82 -0
- package/dist/renderer/index.js +413 -0
- package/dist/renderer/inline.d.ts +5 -0
- package/dist/renderer/inline.js +61 -0
- package/dist/renderer/locale/en.d.ts +35 -0
- package/dist/renderer/locale/en.js +29 -0
- package/dist/renderer/locale/ru.d.ts +37 -0
- package/dist/renderer/locale/ru.js +29 -0
- package/dist/renderer/renderers/README.md +7 -0
- package/dist/renderer/renderers/README.ru.md +5 -0
- package/dist/renderer/renderers/async.d.ts +51 -0
- package/dist/renderer/renderers/async.js +99 -0
- package/dist/renderer/renderers/attaches/README.md +48 -0
- package/dist/renderer/renderers/attaches/README.ru.md +48 -0
- package/dist/renderer/renderers/attaches/index.d.ts +37 -0
- package/dist/renderer/renderers/attaches/index.js +451 -0
- package/dist/renderer/renderers/attaches/locale/en.d.ts +11 -0
- package/dist/renderer/renderers/attaches/locale/en.js +7 -0
- package/dist/renderer/renderers/attaches/locale/ru.d.ts +13 -0
- package/dist/renderer/renderers/attaches/locale/ru.js +7 -0
- package/dist/renderer/renderers/attaches/styles.css +196 -0
- package/dist/renderer/renderers/carousel/README.md +43 -0
- package/dist/renderer/renderers/carousel/README.ru.md +43 -0
- package/dist/renderer/renderers/carousel/index.d.ts +7 -0
- package/dist/renderer/renderers/carousel/index.js +110 -0
- package/dist/renderer/renderers/carousel/styles.css +7 -0
- package/dist/renderer/renderers/checklist/README.md +33 -0
- package/dist/renderer/renderers/checklist/README.ru.md +33 -0
- package/dist/renderer/renderers/checklist/index.d.ts +7 -0
- package/dist/renderer/renderers/checklist/index.js +55 -0
- package/dist/renderer/renderers/checklist/styles.css +54 -0
- package/dist/renderer/renderers/code/README.md +33 -0
- package/dist/renderer/renderers/code/README.ru.md +33 -0
- package/dist/renderer/renderers/code/index.d.ts +9 -0
- package/dist/renderer/renderers/code/index.js +137 -0
- package/dist/renderer/renderers/code/locale/en.d.ts +5 -0
- package/dist/renderer/renderers/code/locale/en.js +4 -0
- package/dist/renderer/renderers/code/locale/ru.d.ts +5 -0
- package/dist/renderer/renderers/code/locale/ru.js +4 -0
- package/dist/renderer/renderers/code/styles.css +330 -0
- package/dist/renderer/renderers/columns/README.md +33 -0
- package/dist/renderer/renderers/columns/README.ru.md +33 -0
- package/dist/renderer/renderers/columns/index.d.ts +7 -0
- package/dist/renderer/renderers/columns/index.js +53 -0
- package/dist/renderer/renderers/columns/styles.css +5 -0
- package/dist/renderer/renderers/delimiter/README.md +33 -0
- package/dist/renderer/renderers/delimiter/README.ru.md +33 -0
- package/dist/renderer/renderers/delimiter/index.d.ts +7 -0
- package/dist/renderer/renderers/delimiter/index.js +28 -0
- package/dist/renderer/renderers/delimiter/styles.css +12 -0
- package/dist/renderer/renderers/embed/README.md +35 -0
- package/dist/renderer/renderers/embed/README.ru.md +35 -0
- package/dist/renderer/renderers/embed/index.d.ts +8 -0
- package/dist/renderer/renderers/embed/index.js +66 -0
- package/dist/renderer/renderers/embed/styles.css +217 -0
- package/dist/renderer/renderers/gallery/README.md +41 -0
- package/dist/renderer/renderers/gallery/README.ru.md +41 -0
- package/dist/renderer/renderers/gallery/index.d.ts +8 -0
- package/dist/renderer/renderers/gallery/index.js +329 -0
- package/dist/renderer/renderers/gallery/styles.css +419 -0
- package/dist/renderer/renderers/heading/README.md +33 -0
- package/dist/renderer/renderers/heading/README.ru.md +33 -0
- package/dist/renderer/renderers/heading/index.d.ts +8 -0
- package/dist/renderer/renderers/heading/index.js +38 -0
- package/dist/renderer/renderers/heading/styles.css +26 -0
- package/dist/renderer/renderers/image/README.md +42 -0
- package/dist/renderer/renderers/image/README.ru.md +42 -0
- package/dist/renderer/renderers/image/index.d.ts +7 -0
- package/dist/renderer/renderers/image/index.js +93 -0
- package/dist/renderer/renderers/image/styles.css +40 -0
- package/dist/renderer/renderers/index.d.ts +47 -0
- package/dist/renderer/renderers/index.js +125 -0
- package/dist/renderer/renderers/link-preview/README.md +43 -0
- package/dist/renderer/renderers/link-preview/README.ru.md +43 -0
- package/dist/renderer/renderers/link-preview/index.d.ts +9 -0
- package/dist/renderer/renderers/link-preview/index.js +118 -0
- package/dist/renderer/renderers/link-preview/styles.css +246 -0
- package/dist/renderer/renderers/list/README.md +33 -0
- package/dist/renderer/renderers/list/README.ru.md +33 -0
- package/dist/renderer/renderers/list/index.d.ts +8 -0
- package/dist/renderer/renderers/list/index.js +42 -0
- package/dist/renderer/renderers/list/styles.css +20 -0
- package/dist/renderer/renderers/paragraph/README.md +33 -0
- package/dist/renderer/renderers/paragraph/README.ru.md +33 -0
- package/dist/renderer/renderers/paragraph/index.d.ts +7 -0
- package/dist/renderer/renderers/paragraph/index.js +35 -0
- package/dist/renderer/renderers/paragraph/styles.css +3 -0
- package/dist/renderer/renderers/person/README.md +44 -0
- package/dist/renderer/renderers/person/README.ru.md +44 -0
- package/dist/renderer/renderers/person/index.d.ts +7 -0
- package/dist/renderer/renderers/person/index.js +213 -0
- package/dist/renderer/renderers/person/locale/en.d.ts +6 -0
- package/dist/renderer/renderers/person/locale/en.js +5 -0
- package/dist/renderer/renderers/person/locale/ru.d.ts +6 -0
- package/dist/renderer/renderers/person/locale/ru.js +5 -0
- package/dist/renderer/renderers/person/styles.css +47 -0
- package/dist/renderer/renderers/poll/README.md +68 -0
- package/dist/renderer/renderers/poll/README.ru.md +68 -0
- package/dist/renderer/renderers/poll/index.d.ts +9 -0
- package/dist/renderer/renderers/poll/index.js +339 -0
- package/dist/renderer/renderers/poll/styles.css +148 -0
- package/dist/renderer/renderers/quote/README.md +33 -0
- package/dist/renderer/renderers/quote/README.ru.md +33 -0
- package/dist/renderer/renderers/quote/index.d.ts +7 -0
- package/dist/renderer/renderers/quote/index.js +59 -0
- package/dist/renderer/renderers/quote/styles.css +43 -0
- package/dist/renderer/renderers/raw/README.md +33 -0
- package/dist/renderer/renderers/raw/README.ru.md +33 -0
- package/dist/renderer/renderers/raw/index.d.ts +7 -0
- package/dist/renderer/renderers/raw/index.js +27 -0
- package/dist/renderer/renderers/spoiler/README.md +33 -0
- package/dist/renderer/renderers/spoiler/README.ru.md +33 -0
- package/dist/renderer/renderers/spoiler/index.d.ts +9 -0
- package/dist/renderer/renderers/spoiler/index.js +84 -0
- package/dist/renderer/renderers/spoiler/locale/en.d.ts +4 -0
- package/dist/renderer/renderers/spoiler/locale/en.js +3 -0
- package/dist/renderer/renderers/spoiler/locale/ru.d.ts +4 -0
- package/dist/renderer/renderers/spoiler/locale/ru.js +3 -0
- package/dist/renderer/renderers/spoiler/styles.css +61 -0
- package/dist/renderer/renderers/table/README.md +33 -0
- package/dist/renderer/renderers/table/README.ru.md +33 -0
- package/dist/renderer/renderers/table/index.d.ts +7 -0
- package/dist/renderer/renderers/table/index.js +83 -0
- package/dist/renderer/renderers/table/styles.css +34 -0
- package/dist/renderer/renderers/toggle/README.md +33 -0
- package/dist/renderer/renderers/toggle/README.ru.md +33 -0
- package/dist/renderer/renderers/toggle/index.d.ts +7 -0
- package/dist/renderer/renderers/toggle/index.js +59 -0
- package/dist/renderer/renderers/toggle/styles.css +49 -0
- package/dist/renderer/renderers/warning/README.md +33 -0
- package/dist/renderer/renderers/warning/README.ru.md +33 -0
- package/dist/renderer/renderers/warning/index.d.ts +7 -0
- package/dist/renderer/renderers/warning/index.js +62 -0
- package/dist/renderer/renderers/warning/styles.css +41 -0
- package/dist/renderer/styles/base.css +168 -0
- package/dist/renderer/types.d.ts +464 -0
- package/dist/shared/blockDataNormalizers.d.ts +14 -0
- package/dist/shared/blockDataNormalizers.js +235 -0
- package/dist/shared/blockDataValidators.d.ts +81 -0
- package/dist/shared/blockDataValidators.js +313 -0
- package/dist/shared/blockTypes.d.ts +2 -0
- package/dist/shared/blockTypes.js +26 -0
- package/dist/shared/carouselData.d.ts +34 -0
- package/dist/shared/carouselData.js +111 -0
- package/dist/shared/cloneEditorData.d.ts +11 -0
- package/dist/shared/cloneEditorData.js +20 -0
- package/dist/shared/documentTypes.d.ts +35 -0
- package/dist/shared/embedPlayer.d.ts +42 -0
- package/dist/shared/embedPlayer.js +141 -0
- package/dist/shared/fileUtils.d.ts +33 -0
- package/dist/shared/fileUtils.js +109 -0
- package/dist/shared/highlightRuntime.d.ts +38 -0
- package/dist/shared/highlightRuntime.js +75 -0
- package/dist/shared/inlineMarshal.d.ts +82 -0
- package/dist/shared/inlineMarshal.js +215 -0
- package/dist/shared/jsonData.d.ts +11 -0
- package/dist/shared/jsonData.js +53 -0
- package/dist/shared/localeTypes.d.ts +11 -0
- package/dist/shared/mapTextFields.d.ts +89 -0
- package/dist/shared/mapTextFields.js +119 -0
- package/dist/shared/pollData.d.ts +90 -0
- package/dist/shared/pollData.js +231 -0
- package/dist/shared/resolvePath.d.ts +8 -0
- package/dist/shared/resolvePath.js +10 -0
- package/dist/shared/runtime/dompurify.js +2424 -0
- package/dist/shared/runtime/highlightBundle.js +10 -0
- package/dist/shared/runtime/jszip.js +13 -0
- package/dist/shared/sanitize/allowlist.d.ts +21 -0
- package/dist/shared/sanitize/allowlist.js +40 -0
- package/dist/shared/sanitize/escapeHtml.d.ts +6 -0
- package/dist/shared/sanitize/escapeHtml.js +11 -0
- package/dist/shared/sanitize/index.d.ts +8 -0
- package/dist/shared/sanitize/index.js +8 -0
- package/dist/shared/sanitize/parseInline.d.ts +11 -0
- package/dist/shared/sanitize/parseInline.js +25 -0
- package/dist/shared/sanitize/sanitizeHtml.d.ts +8 -0
- package/dist/shared/sanitize/sanitizeHtml.js +19 -0
- package/dist/shared/sanitize/sanitizeRawHtml.d.ts +15 -0
- package/dist/shared/sanitize/sanitizeRawHtml.js +162 -0
- package/dist/shared/sanitize/sanitizeStyle.d.ts +9 -0
- package/dist/shared/sanitize/sanitizeStyle.js +39 -0
- package/dist/shared/sanitize/sanitizeUrl.d.ts +28 -0
- package/dist/shared/sanitize/sanitizeUrl.js +86 -0
- package/dist/shared/sanitize/walker.d.ts +15 -0
- package/dist/shared/sanitize/walker.js +98 -0
- package/dist/shared/styleRegistry.d.ts +4 -0
- package/dist/shared/styleRegistry.js +38 -0
- package/dist/shared/textFormat.d.ts +32 -0
- package/dist/shared/textFormat.js +48 -0
- package/dist/shared/zipRuntime.d.ts +19 -0
- package/dist/shared/zipRuntime.js +54 -0
- package/dist/styles/editor.css +3 -0
- package/dist/types.d.ts +1 -0
- package/package.json +149 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'plugin.attaches.title': string;
|
|
3
|
+
'plugin.attaches.upload': string;
|
|
4
|
+
'plugin.attaches.dropzoneUpload': string;
|
|
5
|
+
'plugin.attaches.dropzoneText': string;
|
|
6
|
+
'plugin.attaches.emptyReadonly': string;
|
|
7
|
+
'plugin.attaches.addFiles': string;
|
|
8
|
+
'plugin.attaches.delete': string;
|
|
9
|
+
'plugin.attaches.deleteAll': string;
|
|
10
|
+
'plugin.attaches.filesCount': {
|
|
11
|
+
one: string;
|
|
12
|
+
other: string;
|
|
13
|
+
};
|
|
14
|
+
'plugin.attaches.toggleGroup': string;
|
|
15
|
+
'plugin.attaches.settings': string;
|
|
16
|
+
'plugin.attaches.template': string;
|
|
17
|
+
'plugin.attaches.variantA': string;
|
|
18
|
+
'plugin.attaches.variantB': string;
|
|
19
|
+
'plugin.attaches.variantF': string;
|
|
20
|
+
'plugin.attaches.variantG': string;
|
|
21
|
+
'plugin.attaches.untitled': string;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'plugin.attaches.title': 'File',
|
|
3
|
+
'plugin.attaches.upload': 'Upload',
|
|
4
|
+
'plugin.attaches.dropzoneUpload': 'Upload',
|
|
5
|
+
'plugin.attaches.dropzoneText': 'files from your device or drag and drop them here',
|
|
6
|
+
'plugin.attaches.emptyReadonly': 'No files',
|
|
7
|
+
'plugin.attaches.addFiles': 'Add files',
|
|
8
|
+
'plugin.attaches.delete': 'Delete',
|
|
9
|
+
'plugin.attaches.deleteAll': 'Delete all',
|
|
10
|
+
'plugin.attaches.filesCount': { one: 'file', other: 'files' },
|
|
11
|
+
'plugin.attaches.toggleGroup': 'Show or hide files',
|
|
12
|
+
'plugin.attaches.settings': 'Settings',
|
|
13
|
+
'plugin.attaches.template': 'Template',
|
|
14
|
+
'plugin.attaches.variantA': 'Card',
|
|
15
|
+
'plugin.attaches.variantB': 'Inline',
|
|
16
|
+
'plugin.attaches.variantF': 'List',
|
|
17
|
+
'plugin.attaches.variantG': 'Elevated',
|
|
18
|
+
'plugin.attaches.untitled': 'File',
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
'plugin.attaches.title': string;
|
|
3
|
+
'plugin.attaches.upload': string;
|
|
4
|
+
'plugin.attaches.dropzoneUpload': string;
|
|
5
|
+
'plugin.attaches.dropzoneText': string;
|
|
6
|
+
'plugin.attaches.emptyReadonly': string;
|
|
7
|
+
'plugin.attaches.addFiles': string;
|
|
8
|
+
'plugin.attaches.delete': string;
|
|
9
|
+
'plugin.attaches.deleteAll': string;
|
|
10
|
+
'plugin.attaches.filesCount': {
|
|
11
|
+
one: string;
|
|
12
|
+
few: string;
|
|
13
|
+
many: string;
|
|
14
|
+
other: string;
|
|
15
|
+
};
|
|
16
|
+
'plugin.attaches.toggleGroup': string;
|
|
17
|
+
'plugin.attaches.settings': string;
|
|
18
|
+
'plugin.attaches.template': string;
|
|
19
|
+
'plugin.attaches.variantA': string;
|
|
20
|
+
'plugin.attaches.variantB': string;
|
|
21
|
+
'plugin.attaches.variantF': string;
|
|
22
|
+
'plugin.attaches.variantG': string;
|
|
23
|
+
'plugin.attaches.untitled': string;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'plugin.attaches.title': 'Файл',
|
|
3
|
+
'plugin.attaches.upload': 'Загрузить',
|
|
4
|
+
'plugin.attaches.dropzoneUpload': 'Загрузите',
|
|
5
|
+
'plugin.attaches.dropzoneText': 'файлы с устройства или перетащите их сюда',
|
|
6
|
+
'plugin.attaches.emptyReadonly': 'Файлов нет',
|
|
7
|
+
'plugin.attaches.addFiles': 'Добавить файлы',
|
|
8
|
+
'plugin.attaches.delete': 'Удалить',
|
|
9
|
+
'plugin.attaches.deleteAll': 'Удалить все',
|
|
10
|
+
'plugin.attaches.filesCount': { one: 'вложение', few: 'вложения', many: 'вложений', other: 'вложения' },
|
|
11
|
+
'plugin.attaches.toggleGroup': 'Показать или скрыть файлы',
|
|
12
|
+
'plugin.attaches.settings': 'Настройки',
|
|
13
|
+
'plugin.attaches.template': 'Шаблон',
|
|
14
|
+
'plugin.attaches.variantA': 'Карточка',
|
|
15
|
+
'plugin.attaches.variantB': 'Строчный',
|
|
16
|
+
'plugin.attaches.variantF': 'Список',
|
|
17
|
+
'plugin.attaches.variantG': 'Объёмный',
|
|
18
|
+
'plugin.attaches.untitled': 'Файл',
|
|
19
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# CarouselBlock block plugin
|
|
2
|
+
|
|
3
|
+
Mixed image, video, and sanitized HTML slides with navigation, pagination, thumbnails, autoplay, and ordering controls.
|
|
4
|
+
|
|
5
|
+
## Install and register
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @shelamkoff/rector
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { createEditor } from '@shelamkoff/rector'
|
|
13
|
+
import { CarouselBlock } from '@shelamkoff/rector/plugins/carousel'
|
|
14
|
+
import '@shelamkoff/rector/styles/editor.css'
|
|
15
|
+
|
|
16
|
+
const editor = createEditor({
|
|
17
|
+
holder: document.querySelector('#editor'),
|
|
18
|
+
plugins: [new CarouselBlock()],
|
|
19
|
+
})
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The registered block type is `carousel`. The class is also exported by the complete `@shelamkoff/rector/plugins` preset and can be loaded through `@shelamkoff/rector/plugins/async`.
|
|
23
|
+
|
|
24
|
+
`Carousel` is an exact alias of `CarouselBlock`, not a second implementation. Prefer `CarouselBlock` in new code; the alias is available from both the plugin subpath and the complete preset.
|
|
25
|
+
|
|
26
|
+
## Data
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"slides": [
|
|
31
|
+
{ "id": "cover", "type": "image", "src": "https://cdn.example/cover.jpg", "alt": "Cover", "caption": "Opening slide" },
|
|
32
|
+
{ "id": "clip", "type": "video", "src": "https://cdn.example/clip.mp4", "poster": "https://cdn.example/poster.jpg", "caption": "Video" },
|
|
33
|
+
{ "id": "note", "type": "html", "html": "<strong>Sanitized HTML</strong>" }
|
|
34
|
+
],
|
|
35
|
+
"options": { "loop": true, "autoplay": false, "autoplayDelay": 5000, "navigation": true, "pagination": true, "thumbnails": false, "aspectRatio": "16 / 9" }
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Field reference
|
|
40
|
+
|
|
41
|
+
| Field | Required | Meaning and constraints |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `slides` | yes | Non-empty array. Every slide needs a non-empty unique `id` and a `type` of `image`, `video`, or `html`. |
|
|
44
|
+
| `slides[].src` | image/video | Canonical media URL. Image and video slides cannot omit it. |
|
|
45
|
+
| `slides[].html` | HTML | Non-empty HTML string. It is sanitized during normalization and rendering. |
|
|
46
|
+
| `slides[].poster` | no | Optional media-policy poster URL for a video. |
|
|
47
|
+
| `slides[].alt`, `slides[].caption` | no | Optional strings. `alt` applies to media alternatives; `caption` is visible slide text. |
|
|
48
|
+
| `options.loop`, `options.autoplay`, `options.navigation`, `options.pagination`, `options.thumbnails` | yes | Boolean behavior controls. Defaults are respectively `false`, `false`, `true`, `true`, and `false`. |
|
|
49
|
+
| `options.autoplayDelay` | yes | Positive finite delay in milliseconds; normalization defaults it to `3000`. |
|
|
50
|
+
| `options.aspectRatio` | no | `auto` or a positive numeric ratio written as `width / height`, for example `16 / 9`. |
|
|
51
|
+
|
|
52
|
+
Every slide requires a stable `id` and a `type` of `image`, `video`, or `html`. Media sources pass the shared URL policy; HTML is sanitized. Without `uploadFile`, images become data URLs and videos use temporary object URLs, so persistent video documents require an uploader. The document renderer requires `@shelamkoff/carousel`.
|
|
53
|
+
|
|
54
|
+
## Configuration
|
|
55
|
+
|
|
56
|
+
Every built-in block plugin accepts two style ownership options: `injectStyles?: boolean` defaults to `true`; set it to `false` when the host bundles that plugin's CSS. `css?: string` adds one host-provided stylesheet URL after the plugin default, or acts as the replacement URL when default injection is disabled.
|
|
57
|
+
|
|
58
|
+
`uploadFile?: (file: File, context: { signal: AbortSignal }) => Promise<{ url: string; poster?: string }>` persists image or video files. `actions?: Array<{ icon?; label; handler({ signal }): Promise<CarouselSlide[] | null> }>` adds application-provided slide sources. Both callbacks must respect the supplied abort signal.
|
|
59
|
+
|
|
60
|
+
## Application file sources
|
|
61
|
+
|
|
62
|
+
Use `uploadFile` for image or video `File` objects and `actions` for existing slides selected from a media library, cloud drive, or another application-owned catalog. One action may return mixed image, video, and HTML slides.
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
const carousel = new CarouselBlock({
|
|
66
|
+
actions: [{
|
|
67
|
+
label: 'Media library',
|
|
68
|
+
async handler({ signal }) {
|
|
69
|
+
const assets = await openMediaLibrary({
|
|
70
|
+
accept: ['image/*', 'video/*', 'text/html'],
|
|
71
|
+
multiple: true,
|
|
72
|
+
signal,
|
|
73
|
+
})
|
|
74
|
+
return assets?.map(asset => asset.type === 'html'
|
|
75
|
+
? {
|
|
76
|
+
id: asset.id,
|
|
77
|
+
type: 'html',
|
|
78
|
+
html: asset.html,
|
|
79
|
+
caption: asset.caption,
|
|
80
|
+
}
|
|
81
|
+
: {
|
|
82
|
+
id: asset.id,
|
|
83
|
+
type: asset.type,
|
|
84
|
+
src: asset.url,
|
|
85
|
+
alt: asset.alt,
|
|
86
|
+
poster: asset.poster,
|
|
87
|
+
caption: asset.caption,
|
|
88
|
+
}) ?? null
|
|
89
|
+
},
|
|
90
|
+
}],
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Media items use `type: 'image' | 'video'` and `src`; HTML items use `type: 'html'` and `html`. Supply stable, unique `id` values when the application needs to preserve its own slide identities. The plugin generates an id for an omitted one and replaces duplicates before saving. Unusable entries are ignored. Return `null` when selection is cancelled. The complete selection becomes one undo/redo step. See [File sources and media libraries](https://shelamkoff.github.io/editor/guide/file-sources) for upload, cancellation, validation, and reusable adapter guidance.
|
|
95
|
+
|
|
96
|
+
## Capabilities
|
|
97
|
+
|
|
98
|
+
Image/video upload; URL and sanitized-HTML slides; add/remove/reorder; loop, autoplay, navigation, pagination, thumbnail, delay, and aspect-ratio controls; cancellable application actions and uploads.
|
|
99
|
+
|
|
100
|
+
## Undo, lifecycle, and styles
|
|
101
|
+
|
|
102
|
+
User actions exposed by the plugin enter the command pipeline through the supplied `context.mutate()` capability, so each completed action is one undo/redo step. The editor reference-counts the plugin's declared stylesheet URLs. Removing a block calls its cleanup hook; removing the editor calls `destroy()` for every remaining block and then releases shared plugin resources.
|
|
103
|
+
|
|
104
|
+
Do not remove the editor holder without first calling `editor.destroy()`.
|
|
105
|
+
|
|
106
|
+
## Document output
|
|
107
|
+
|
|
108
|
+
Use the matching renderer from `@shelamkoff/rector/renderer/renderers/carousel`. The VitePress guide documents configuration, commands and history, extension contracts, document migrations, styling, security, and lifecycle in a sequential form.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Блочный плагин CarouselBlock
|
|
2
|
+
|
|
3
|
+
Карусель из изображений, видео и очищенного HTML с навигацией, пагинацией, миниатюрами, автопрокруткой и управлением порядком.
|
|
4
|
+
|
|
5
|
+
## Установка и регистрация
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @shelamkoff/rector
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { createEditor } from '@shelamkoff/rector'
|
|
13
|
+
import { CarouselBlock } from '@shelamkoff/rector/plugins/carousel'
|
|
14
|
+
import '@shelamkoff/rector/styles/editor.css'
|
|
15
|
+
|
|
16
|
+
const editor = createEditor({
|
|
17
|
+
holder: document.querySelector('#editor'),
|
|
18
|
+
plugins: [new CarouselBlock()],
|
|
19
|
+
})
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Тип блока — `carousel`. Класс также экспортируется общей точкой входа `@shelamkoff/rector/plugins` и может загружаться по типу документа через `@shelamkoff/rector/plugins/async`.
|
|
23
|
+
|
|
24
|
+
`Carousel` — точный псевдоним класса `CarouselBlock`, а не отдельная реализация. В новом коде предпочтительно имя `CarouselBlock`; псевдоним доступен и из точки входа плагина, и из общей точки входа.
|
|
25
|
+
|
|
26
|
+
## Данные
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"slides": [
|
|
31
|
+
{ "id": "cover", "type": "image", "src": "https://cdn.example/cover.jpg", "alt": "Обложка", "caption": "Первый слайд" },
|
|
32
|
+
{ "id": "clip", "type": "video", "src": "https://cdn.example/clip.mp4", "poster": "https://cdn.example/poster.jpg", "caption": "Видео" },
|
|
33
|
+
{ "id": "note", "type": "html", "html": "<strong>Очищенный HTML</strong>" }
|
|
34
|
+
],
|
|
35
|
+
"options": { "loop": true, "autoplay": false, "autoplayDelay": 5000, "navigation": true, "pagination": true, "thumbnails": false, "aspectRatio": "16 / 9" }
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Поля данных
|
|
40
|
+
|
|
41
|
+
| Поле | Обязательное | Назначение и ограничения |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| `slides` | да | Непустой массив. Каждому слайду нужны непустой уникальный `id` и `type` со значением `image`, `video` или `html`. |
|
|
44
|
+
| `slides[].src` | для изображения и видео | Канонический адрес медиафайла. Слайды изображения и видео не могут его пропускать. |
|
|
45
|
+
| `slides[].html` | для HTML | Непустая строка HTML. Она очищается при нормализации и отображении. |
|
|
46
|
+
| `slides[].poster` | нет | Необязательный разрешённый политикой медиафайлов адрес постера видео. |
|
|
47
|
+
| `slides[].alt`, `slides[].caption` | нет | Необязательные строки. `alt` описывает медиафайл, `caption` содержит видимую подпись слайда. |
|
|
48
|
+
| `options.loop`, `options.autoplay`, `options.navigation`, `options.pagination`, `options.thumbnails` | да | Логические параметры поведения. Значения по умолчанию: `false`, `false`, `true`, `true` и `false` соответственно. |
|
|
49
|
+
| `options.autoplayDelay` | да | Положительная конечная задержка в миллисекундах; при нормализации по умолчанию `3000`. |
|
|
50
|
+
| `options.aspectRatio` | нет | `auto` или положительное числовое соотношение в форме `ширина / высота`, например `16 / 9`. |
|
|
51
|
+
|
|
52
|
+
Каждый слайд имеет устойчивый `id` и тип `image`, `video` или `html`. Адреса медиафайлов проходят общую проверку URL, а HTML очищается. Без `uploadFile` изображения сохраняются как URL со встроенными данными, а видео используют временные объектные URL. Для постоянного хранения видео настройте загрузчик. Рендереру требуется `@shelamkoff/carousel`.
|
|
53
|
+
|
|
54
|
+
## Конфигурация
|
|
55
|
+
|
|
56
|
+
Каждый встроенный блочный плагин принимает два параметра владения стилями: `injectStyles?: boolean` по умолчанию равен `true`; укажите `false`, если приложение само включает CSS этого плагина. `css?: string` добавляет URL таблицы стилей приложения после стандартной, а при отключённой стандартной инъекции служит URL замены.
|
|
57
|
+
|
|
58
|
+
`uploadFile(file, { signal })` сохраняет изображение или видео и возвращает `{ url, poster? }`. Обработчики в `actions` возвращают массив слайдов или `null`. Все обработчики должны учитывать переданный `AbortSignal`.
|
|
59
|
+
|
|
60
|
+
## Источники файлов приложения
|
|
61
|
+
|
|
62
|
+
Используйте `uploadFile` для браузерных объектов `File` с изображениями и видео, а `actions` — для готовых слайдов из медиатеки, облачного диска или другого каталога приложения. Одно действие может вернуть изображения, видео и HTML-слайды вместе.
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
const carousel = new CarouselBlock({
|
|
66
|
+
actions: [{
|
|
67
|
+
label: 'Медиатека',
|
|
68
|
+
async handler({ signal }) {
|
|
69
|
+
const assets = await openMediaLibrary({
|
|
70
|
+
accept: ['image/*', 'video/*', 'text/html'],
|
|
71
|
+
multiple: true,
|
|
72
|
+
signal,
|
|
73
|
+
})
|
|
74
|
+
return assets?.map(asset => asset.type === 'html'
|
|
75
|
+
? {
|
|
76
|
+
id: asset.id,
|
|
77
|
+
type: 'html',
|
|
78
|
+
html: asset.html,
|
|
79
|
+
caption: asset.caption,
|
|
80
|
+
}
|
|
81
|
+
: {
|
|
82
|
+
id: asset.id,
|
|
83
|
+
type: asset.type,
|
|
84
|
+
src: asset.url,
|
|
85
|
+
alt: asset.alt,
|
|
86
|
+
poster: asset.poster,
|
|
87
|
+
caption: asset.caption,
|
|
88
|
+
}) ?? null
|
|
89
|
+
},
|
|
90
|
+
}],
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Изображение и видео используют `type: 'image' | 'video'` и `src`; HTML-слайд использует `type: 'html'` и `html`. Передавайте устойчивые уникальные `id`, если приложению нужно сохранить собственные идентификаторы слайдов. Для пропущенного `id` плагин создаёт новый, а повторяющиеся значения заменяет до сохранения. Непригодные элементы игнорируются. При отмене выбора верните `null`. Весь выбор становится одним шагом отмены и повтора. Загрузка, отмена, проверка данных и общий адаптер описаны в разделе [«Источники файлов и медиатека»](https://shelamkoff.github.io/editor/ru/guide/file-sources).
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## Возможности
|
|
98
|
+
|
|
99
|
+
Загрузка изображений и видео; слайды по URL и с очищенным HTML; добавление, удаление и изменение порядка; настройка зацикливания, автопрокрутки, навигации, пагинации, миниатюр, задержки и соотношения сторон; прерываемые через `AbortSignal` загрузки и источники приложения.
|
|
100
|
+
|
|
101
|
+
## История, жизненный цикл и стили
|
|
102
|
+
|
|
103
|
+
Действия плагина входят в конвейер команд через предоставленный контекст `mutate()`, поэтому одно завершённое действие создаёт один шаг отмены и повтора. Редактор подсчитывает владельцев объявленных URL стилей. Удаление блока вызывает его метод освобождения ресурсов; `editor.destroy()` освобождает оставшиеся блоки и общие ресурсы.
|
|
104
|
+
|
|
105
|
+
Не удаляйте контейнер редактора до вызова `editor.destroy()`.
|
|
106
|
+
|
|
107
|
+
## Вывод документа
|
|
108
|
+
|
|
109
|
+
Используйте фабричную функцию из `@shelamkoff/rector/renderer/renderers/carousel`. Последовательное руководство VitePress описывает проверку данных, миграции, разработку расширений, диагностику, безопасность и стили.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
.oe-carousel-block {
|
|
2
|
+
border-radius: 0.5rem;
|
|
3
|
+
overflow-anchor: none;
|
|
4
|
+
text-align: center;
|
|
5
|
+
outline: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Empty state uses the same media-source pattern as Image and Gallery. */
|
|
9
|
+
.oe-carousel-block__select {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 0.75rem;
|
|
14
|
+
padding: 2rem;
|
|
15
|
+
border: 2px dashed var(--oe-border, #2e2e35);
|
|
16
|
+
border-radius: 0.5rem;
|
|
17
|
+
transition: border-color 0.2s;
|
|
18
|
+
}
|
|
19
|
+
.oe-carousel-block__select:hover,
|
|
20
|
+
.oe-carousel-block__select--dragover { border-color: var(--oe-accent, #4357b4); }
|
|
21
|
+
.oe-carousel-block__select-icon { color: var(--oe-text-3, #6e6e78); }
|
|
22
|
+
.oe-carousel-block__select-text { color: var(--oe-text-3, #6e6e78); font-size: 0.8125rem; line-height: 1.5; }
|
|
23
|
+
.oe-carousel-block__select-link {
|
|
24
|
+
padding: 0; border: 0; background: transparent; color: var(--oe-accent, #4357b4);
|
|
25
|
+
font: inherit; cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
.oe-carousel-block__select-link:hover { text-decoration: underline; }
|
|
28
|
+
.oe-carousel-block__select-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; }
|
|
29
|
+
.oe-carousel-block__select-action {
|
|
30
|
+
display: inline-flex; align-items: center; gap: 0.375rem;
|
|
31
|
+
padding: 0.375rem 0.625rem; border: 1px solid var(--oe-border, #2e2e35);
|
|
32
|
+
border-radius: 0.375rem; background: var(--oe-surface-2, #17171a); color: var(--oe-text-2, #c4c4c4);
|
|
33
|
+
font: inherit; font-size: 0.75rem; cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
.oe-carousel-block__select-action:hover { color: var(--oe-text-1, #fff); border-color: var(--oe-border-hover, #3a3a44); }
|
|
36
|
+
.oe-carousel-block__select-action svg { width: 14px; height: 14px; }
|
|
37
|
+
.oe-carousel-block__empty { padding: 2rem; color: var(--oe-text-3, #6e6e78); }
|
|
38
|
+
|
|
39
|
+
/* Active slide canvas. */
|
|
40
|
+
.oe-carousel-block__stage {
|
|
41
|
+
position: relative;
|
|
42
|
+
display: grid;
|
|
43
|
+
min-height: 18rem;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
border-radius: 0.5rem;
|
|
46
|
+
background: var(--oe-surface-2, #111114);
|
|
47
|
+
isolation: isolate;
|
|
48
|
+
}
|
|
49
|
+
.oe-carousel-block__media { display: grid; place-items: center; min-width: 0; min-height: 0; }
|
|
50
|
+
.oe-carousel-block__media > img,
|
|
51
|
+
.oe-carousel-block__media > video {
|
|
52
|
+
display: block;
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: 100%;
|
|
55
|
+
min-height: 18rem;
|
|
56
|
+
max-height: 38rem;
|
|
57
|
+
object-fit: contain;
|
|
58
|
+
background: var(--oe-surface-2, #111114);
|
|
59
|
+
}
|
|
60
|
+
.oe-carousel-block__html {
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
width: 100%;
|
|
63
|
+
min-height: 18rem;
|
|
64
|
+
padding: 2rem;
|
|
65
|
+
overflow: auto;
|
|
66
|
+
text-align: left;
|
|
67
|
+
color: var(--oe-text-1, #fff);
|
|
68
|
+
}
|
|
69
|
+
.oe-carousel-block__nav {
|
|
70
|
+
position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
|
|
71
|
+
display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0;
|
|
72
|
+
border: 1px solid rgba(255,255,255,0.18); border-radius: 50%;
|
|
73
|
+
background: rgba(9,9,11,0.72); color: #fff; cursor: pointer;
|
|
74
|
+
backdrop-filter: blur(8px);
|
|
75
|
+
}
|
|
76
|
+
.oe-carousel-block__nav:hover { background: rgba(9,9,11,0.9); }
|
|
77
|
+
.oe-carousel-block__nav--previous { left: 0.75rem; }
|
|
78
|
+
.oe-carousel-block__nav--next { right: 0.75rem; }
|
|
79
|
+
.oe-carousel-block__counter {
|
|
80
|
+
position: absolute; top: 0.75rem; right: 0.75rem; z-index: 3;
|
|
81
|
+
padding: 0.25rem 0.5rem; border-radius: 999px;
|
|
82
|
+
background: rgba(9,9,11,0.72); color: rgba(255,255,255,0.88);
|
|
83
|
+
font-size: 0.6875rem; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px);
|
|
84
|
+
}
|
|
85
|
+
.oe-carousel-block__caption {
|
|
86
|
+
position: absolute; inset: auto 0 0; z-index: 2;
|
|
87
|
+
min-height: 1.25rem; padding: 0.75rem 1rem;
|
|
88
|
+
background: linear-gradient(transparent, rgba(9,9,11,0.78));
|
|
89
|
+
color: #fff; font-size: 0.75rem; text-align: center; outline: none;
|
|
90
|
+
}
|
|
91
|
+
.oe-carousel-block__caption:empty::before { content: attr(data-placeholder); color: rgba(255,255,255,0.52); }
|
|
92
|
+
.oe-carousel-block__dots {
|
|
93
|
+
position: absolute; left: 50%; bottom: 2.75rem; z-index: 3; transform: translateX(-50%);
|
|
94
|
+
display: flex; gap: 0.35rem; padding: 0.3rem 0.45rem; border-radius: 999px;
|
|
95
|
+
background: rgba(9,9,11,0.5); backdrop-filter: blur(8px);
|
|
96
|
+
}
|
|
97
|
+
.oe-carousel-block__dot {
|
|
98
|
+
width: 0.375rem; height: 0.375rem; padding: 0; border: 0; border-radius: 50%;
|
|
99
|
+
background: rgba(255,255,255,0.42); cursor: pointer;
|
|
100
|
+
}
|
|
101
|
+
.oe-carousel-block__dot--active { background: #fff; transform: scale(1.2); }
|
|
102
|
+
.oe-carousel-block__thumbnails {
|
|
103
|
+
position: absolute; left: 50%; bottom: 4.2rem; z-index: 3; transform: translateX(-50%);
|
|
104
|
+
display: flex; max-width: calc(100% - 6rem); gap: 0.3rem; padding: 0.3rem;
|
|
105
|
+
overflow-x: auto; border-radius: 0.5rem; background: rgba(9,9,11,0.58); backdrop-filter: blur(8px);
|
|
106
|
+
}
|
|
107
|
+
.oe-carousel-block__thumbnail {
|
|
108
|
+
flex: 0 0 2.5rem; display: grid; place-items: center; width: 2.5rem; height: 2rem; padding: 0;
|
|
109
|
+
overflow: hidden; border: 1px solid transparent; border-radius: 0.25rem;
|
|
110
|
+
background: rgba(255,255,255,0.08); color: #fff; cursor: pointer;
|
|
111
|
+
}
|
|
112
|
+
.oe-carousel-block__thumbnail img { width: 100%; height: 100%; object-fit: cover; }
|
|
113
|
+
.oe-carousel-block__thumbnail--active { border-color: #fff; }
|
|
114
|
+
|
|
115
|
+
/* Compact Image/Gallery-style action bar. */
|
|
116
|
+
.oe-carousel-block__actions {
|
|
117
|
+
position: relative;
|
|
118
|
+
display: inline-flex; align-items: center; gap: 0;
|
|
119
|
+
margin-top: 0.5rem; padding: 0.1875rem;
|
|
120
|
+
border: 1px solid var(--oe-border, #1a1a1f); border-radius: 0.5rem;
|
|
121
|
+
background: var(--oe-surface, #0e0e10);
|
|
122
|
+
}
|
|
123
|
+
.oe-carousel-block__actions-view { display: inline-flex; align-items: center; }
|
|
124
|
+
.oe-carousel-block__actions-view[hidden] { display: none; }
|
|
125
|
+
.oe-carousel-block__action-btn {
|
|
126
|
+
position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.3125rem;
|
|
127
|
+
padding: 0.3125rem 0.5rem; border: 0; border-radius: 0.375rem;
|
|
128
|
+
background: transparent; color: var(--oe-text-1, #fff);
|
|
129
|
+
font: inherit; font-size: 0.6875rem; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer;
|
|
130
|
+
}
|
|
131
|
+
.oe-carousel-block__action-btn:hover { background: var(--oe-accent-alpha, rgba(67,87,180,0.18)); }
|
|
132
|
+
.oe-carousel-block__action-btn--danger { color: var(--oe-danger, #f87171); }
|
|
133
|
+
.oe-carousel-block__action-btn--danger:hover { background: rgba(248,113,113,0.16); }
|
|
134
|
+
.oe-carousel-block__actions-sep { width: 1px; height: 1.125rem; margin: 0 0.0625rem; background: var(--oe-border, #1a1a1f); }
|
|
135
|
+
.oe-carousel-block__dropdown { position: relative; display: inline-flex; }
|
|
136
|
+
.oe-carousel-block__dropdown-panel {
|
|
137
|
+
display: none; position: absolute; left: 50%; bottom: calc(100% + 0.5rem); z-index: 100;
|
|
138
|
+
box-sizing: border-box; width: min(25rem, calc(100vw - 2rem)); max-height: min(70vh, 24rem); padding: 0.75rem;
|
|
139
|
+
overflow: auto; transform: translateX(-50%);
|
|
140
|
+
border: 1px solid var(--oe-toolbar-border, var(--oe-border, #2e2e35)); border-radius: 0.625rem;
|
|
141
|
+
background: var(--oe-toolbar-bg, var(--oe-card, #111)); color: var(--oe-text-1, #fff);
|
|
142
|
+
box-shadow: var(--oe-toolbar-shadow, 0 12px 32px rgba(0,0,0,0.45)); text-align: left;
|
|
143
|
+
}
|
|
144
|
+
.oe-carousel-block__dropdown--open .oe-carousel-block__dropdown-panel { display: grid; gap: 0.65rem; }
|
|
145
|
+
.oe-carousel-block__settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.625rem; }
|
|
146
|
+
.oe-carousel-block__settings-title {
|
|
147
|
+
grid-column: 1 / -1;
|
|
148
|
+
color: var(--oe-text-3, #6e6e78); font-size: 0.625rem; font-weight: 700;
|
|
149
|
+
letter-spacing: 0.08em; text-transform: uppercase;
|
|
150
|
+
}
|
|
151
|
+
.oe-carousel-block__field { display: grid; gap: 0.25rem; color: var(--oe-text-3, #6e6e78); font-size: 0.6875rem; }
|
|
152
|
+
.oe-carousel-block__field--full { grid-column: 1 / -1; }
|
|
153
|
+
.oe-carousel-block__field input,
|
|
154
|
+
.oe-carousel-block__field textarea {
|
|
155
|
+
box-sizing: border-box; width: 100%; padding: 0.45rem 0.5rem;
|
|
156
|
+
border: 1px solid var(--oe-border, #2e2e35); border-radius: 0.375rem;
|
|
157
|
+
background: var(--oe-surface, #0e0e10); color: var(--oe-text-1, #fff); font: inherit;
|
|
158
|
+
}
|
|
159
|
+
.oe-carousel-block__field textarea { min-height: 5rem; resize: vertical; }
|
|
160
|
+
.oe-carousel-block__switches { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem 0.75rem; }
|
|
161
|
+
.oe-carousel-block__switch { display: flex; align-items: center; gap: 0.4rem; color: var(--oe-text-2, #c4c4c4); font-size: 0.75rem; }
|
|
162
|
+
.oe-carousel-block__slide-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; }
|
|
163
|
+
.oe-carousel-block__settings-button {
|
|
164
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem;
|
|
165
|
+
min-height: 2rem; padding: 0.35rem 0.5rem; border: 1px solid var(--oe-border, #2e2e35);
|
|
166
|
+
border-radius: 0.375rem; background: var(--oe-surface-2, #17171a); color: var(--oe-text-2, #c4c4c4);
|
|
167
|
+
font: inherit; font-size: 0.6875rem; cursor: pointer;
|
|
168
|
+
}
|
|
169
|
+
.oe-carousel-block__settings-button:hover:not(:disabled) { color: var(--oe-text-1, #fff); border-color: var(--oe-border-hover, #3a3a44); }
|
|
170
|
+
.oe-carousel-block__settings-button:disabled { opacity: 0.38; cursor: default; }
|
|
171
|
+
.oe-carousel-block__settings-button--danger { grid-column: 1 / -1; color: var(--oe-danger, #f87171); }
|
|
172
|
+
|
|
173
|
+
.oe-carousel-block button:focus-visible,
|
|
174
|
+
.oe-carousel-block input:focus-visible,
|
|
175
|
+
.oe-carousel-block textarea:focus-visible,
|
|
176
|
+
.oe-carousel-block [contenteditable='true']:focus-visible {
|
|
177
|
+
outline: 2px solid var(--oe-focus-ring, var(--oe-accent, #4357b4));
|
|
178
|
+
outline-offset: 2px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.oe-theme-light .oe-carousel-block__actions { background: var(--oe-surface, #fafafa); border-color: var(--oe-border, #e0e0e0); }
|
|
182
|
+
.oe-theme-light .oe-carousel-block__action-btn { color: var(--oe-text-1, #1a1a1a); }
|
|
183
|
+
.oe-theme-light .oe-carousel-block__select-action,
|
|
184
|
+
.oe-theme-light .oe-carousel-block__settings-button { background: var(--oe-surface-2, #f2f2f2); }
|
|
185
|
+
|
|
186
|
+
@media (max-width: 720px) {
|
|
187
|
+
.oe-carousel-block__stage,
|
|
188
|
+
.oe-carousel-block__media > img,
|
|
189
|
+
.oe-carousel-block__media > video,
|
|
190
|
+
.oe-carousel-block__html { min-height: 13rem; }
|
|
191
|
+
.oe-carousel-block__dropdown-panel { left: 0; transform: none; }
|
|
192
|
+
.oe-carousel-block__settings { grid-template-columns: 1fr; }
|
|
193
|
+
.oe-carousel-block__field--full,
|
|
194
|
+
.oe-carousel-block__settings-title,
|
|
195
|
+
.oe-carousel-block__slide-actions,
|
|
196
|
+
.oe-carousel-block__switches { grid-column: 1; }
|
|
197
|
+
.oe-carousel-block__switches { grid-template-columns: 1fr; }
|
|
198
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const ICON: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 6l.01 0\"/><path d=\"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8\"/><path d=\"M3 13l4 -4a3 5 0 0 1 3 0l4 4\"/><path d=\"M13 12l2 -2a3 5 0 0 1 3 0l3 3\"/><path d=\"M8 21l.01 0\"/><path d=\"M12 21l.01 0\"/><path d=\"M16 21l.01 0\"/></svg>";
|
|
2
|
+
export const ICON_SELECT: string;
|
|
3
|
+
export const ICON_SETTINGS: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></svg>";
|
|
4
|
+
export const ICON_UPLOAD: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2\"/><path d=\"M7 9l5-5l5 5\"/><path d=\"M12 4v12\"/></svg>";
|
|
5
|
+
export const ICON_REPLACE: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4\"/><path d=\"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4\"/></svg>";
|
|
6
|
+
export const ICON_URL: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5\"/><path d=\"M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5\"/></svg>";
|
|
7
|
+
export const ICON_CODE: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M7 8l-4 4l4 4\"/><path d=\"M17 8l4 4l-4 4\"/><path d=\"M14 4l-4 16\"/></svg>";
|
|
8
|
+
export const ICON_TRASH: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 7h16\"/><path d=\"M10 11v6\"/><path d=\"M14 11v6\"/><path d=\"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12\"/><path d=\"M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3\"/></svg>";
|
|
9
|
+
export const ICON_BACK: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 6l-6 6l6 6\"/></svg>";
|
|
10
|
+
export const ICON_CHEVRON: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 6l6 6l-6 6\"/></svg>";
|
|
11
|
+
export const ICON_PREVIOUS: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M15 6l-6 6l6 6\"/></svg>";
|
|
12
|
+
export const ICON_NEXT: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M9 6l6 6l-6 6\"/></svg>";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Tabler Icons. Kept in one module so the block view never invents glyphs.
|
|
2
|
+
export const ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l.01 0"/><path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8"/><path d="M3 13l4 -4a3 5 0 0 1 3 0l4 4"/><path d="M13 12l2 -2a3 5 0 0 1 3 0l3 3"/><path d="M8 21l.01 0"/><path d="M12 21l.01 0"/><path d="M16 21l.01 0"/></svg>'
|
|
3
|
+
export const ICON_SELECT = ICON.replace('width="16" height="16"', 'width="40" height="40"')
|
|
4
|
+
export const ICON_SETTINGS = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg>'
|
|
5
|
+
export const ICON_UPLOAD = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"/><path d="M7 9l5-5l5 5"/><path d="M12 4v12"/></svg>'
|
|
6
|
+
export const ICON_REPLACE = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"/><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>'
|
|
7
|
+
export const ICON_URL = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"/><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"/></svg>'
|
|
8
|
+
export const ICON_CODE = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 8l-4 4l4 4"/><path d="M17 8l4 4l-4 4"/><path d="M14 4l-4 16"/></svg>'
|
|
9
|
+
export const ICON_TRASH = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h16"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12"/><path d="M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"/></svg>'
|
|
10
|
+
export const ICON_BACK = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6l6 6"/></svg>'
|
|
11
|
+
export const ICON_CHEVRON = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6l-6 6"/></svg>'
|
|
12
|
+
export const ICON_PREVIOUS = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6l6 6"/></svg>'
|
|
13
|
+
export const ICON_NEXT = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6l-6 6"/></svg>'
|