@cool-office/docs-ui 0.0.0-stage → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +176 -0
- package/README.md +112 -2
- package/lib/cjs/facade.js +81 -0
- package/lib/cjs/index.js +33220 -0
- package/lib/cjs/locale/ar-SA.js +258 -0
- package/lib/cjs/locale/ca-ES.js +258 -0
- package/lib/cjs/locale/de-DE.js +258 -0
- package/lib/cjs/locale/en-US.js +273 -0
- package/lib/cjs/locale/es-ES.js +258 -0
- package/lib/cjs/locale/fa-IR.js +258 -0
- package/lib/cjs/locale/fr-FR.js +258 -0
- package/lib/cjs/locale/id-ID.js +258 -0
- package/lib/cjs/locale/it-IT.js +258 -0
- package/lib/cjs/locale/ja-JP.js +258 -0
- package/lib/cjs/locale/ko-KR.js +258 -0
- package/lib/cjs/locale/pl-PL.js +258 -0
- package/lib/cjs/locale/pt-BR.js +258 -0
- package/lib/cjs/locale/ru-RU.js +258 -0
- package/lib/cjs/locale/sk-SK.js +258 -0
- package/lib/cjs/locale/vi-VN.js +258 -0
- package/lib/cjs/locale/zh-CN.js +258 -0
- package/lib/cjs/locale/zh-HK.js +258 -0
- package/lib/cjs/locale/zh-TW.js +258 -0
- package/lib/es/facade.js +82 -0
- package/lib/es/index.js +32881 -0
- package/lib/es/locale/ar-SA.js +258 -0
- package/lib/es/locale/ca-ES.js +258 -0
- package/lib/es/locale/de-DE.js +258 -0
- package/lib/es/locale/en-US.js +273 -0
- package/lib/es/locale/es-ES.js +258 -0
- package/lib/es/locale/fa-IR.js +258 -0
- package/lib/es/locale/fr-FR.js +258 -0
- package/lib/es/locale/id-ID.js +258 -0
- package/lib/es/locale/it-IT.js +258 -0
- package/lib/es/locale/ja-JP.js +258 -0
- package/lib/es/locale/ko-KR.js +258 -0
- package/lib/es/locale/pl-PL.js +258 -0
- package/lib/es/locale/pt-BR.js +258 -0
- package/lib/es/locale/ru-RU.js +258 -0
- package/lib/es/locale/sk-SK.js +258 -0
- package/lib/es/locale/vi-VN.js +258 -0
- package/lib/es/locale/zh-CN.js +258 -0
- package/lib/es/locale/zh-HK.js +258 -0
- package/lib/es/locale/zh-TW.js +258 -0
- package/lib/facade.js +82 -0
- package/lib/index.css +1252 -0
- package/lib/index.js +32881 -0
- package/lib/locale/ar-SA.js +258 -0
- package/lib/locale/ca-ES.js +258 -0
- package/lib/locale/de-DE.js +258 -0
- package/lib/locale/en-US.js +273 -0
- package/lib/locale/es-ES.js +258 -0
- package/lib/locale/fa-IR.js +258 -0
- package/lib/locale/fr-FR.js +258 -0
- package/lib/locale/id-ID.js +258 -0
- package/lib/locale/it-IT.js +258 -0
- package/lib/locale/ja-JP.js +258 -0
- package/lib/locale/ko-KR.js +258 -0
- package/lib/locale/pl-PL.js +258 -0
- package/lib/locale/pt-BR.js +258 -0
- package/lib/locale/ru-RU.js +258 -0
- package/lib/locale/sk-SK.js +258 -0
- package/lib/locale/vi-VN.js +258 -0
- package/lib/locale/zh-CN.js +258 -0
- package/lib/locale/zh-HK.js +258 -0
- package/lib/locale/zh-TW.js +258 -0
- package/lib/types/basics/component-tools.d.ts +30 -0
- package/lib/types/basics/custom-decoration-factory.d.ts +40 -0
- package/lib/types/basics/doc-custom-range-chrome.d.ts +31 -0
- package/lib/types/basics/docs-view-key.d.ts +30 -0
- package/lib/types/basics/editor.d.ts +16 -0
- package/lib/types/basics/paragraph.d.ts +24 -0
- package/lib/types/basics/selection.d.ts +17 -0
- package/lib/types/basics/table.d.ts +31 -0
- package/lib/types/commands/commands/auto-format.command.d.ts +22 -0
- package/lib/types/commands/commands/break-line.command.d.ts +29 -0
- package/lib/types/commands/commands/clipboard.command.d.ts +39 -0
- package/lib/types/commands/commands/clipboard.inner.command.d.ts +43 -0
- package/lib/types/commands/commands/doc-block-move.command.d.ts +52 -0
- package/lib/types/commands/commands/doc-delete.command.d.ts +44 -0
- package/lib/types/commands/commands/doc-header-footer.command.d.ts +40 -0
- package/lib/types/commands/commands/doc-horizontal-line.command.d.ts +24 -0
- package/lib/types/commands/commands/doc-page-setup.command.d.ts +27 -0
- package/lib/types/commands/commands/doc-paragraph-setting.command.d.ts +20 -0
- package/lib/types/commands/commands/doc-select-all.command.d.ts +23 -0
- package/lib/types/commands/commands/format-painter.command.d.ts +33 -0
- package/lib/types/commands/commands/ime-input.command.d.ts +25 -0
- package/lib/types/commands/commands/inline-format.command.d.ts +36 -0
- package/lib/types/commands/commands/insert-below/insert-bullet-below.command.d.ts +21 -0
- package/lib/types/commands/commands/insert-custom-range.command.d.ts +26 -0
- package/lib/types/commands/commands/insert-header-footer-field.command.d.ts +28 -0
- package/lib/types/commands/commands/insert-special-character.command.d.ts +19 -0
- package/lib/types/commands/commands/list.command.d.ts +64 -0
- package/lib/types/commands/commands/paragraph-align.command.d.ts +34 -0
- package/lib/types/commands/commands/refresh-header-footer-fields.command.d.ts +22 -0
- package/lib/types/commands/commands/replace-content.command.d.ts +55 -0
- package/lib/types/commands/commands/set-doc-zoom-ratio.command.d.ts +21 -0
- package/lib/types/commands/commands/set-heading.command.d.ts +38 -0
- package/lib/types/commands/commands/switch-doc-mode.command.d.ts +19 -0
- package/lib/types/commands/commands/table/doc-table-create.command.d.ts +56 -0
- package/lib/types/commands/commands/table/doc-table-delete.command.d.ts +28 -0
- package/lib/types/commands/commands/table/doc-table-insert.command.d.ts +49 -0
- package/lib/types/commands/commands/table/doc-table-tab.command.d.ts +20 -0
- package/lib/types/commands/commands/table/table.d.ts +108 -0
- package/lib/types/commands/commands/util.d.ts +17 -0
- package/lib/types/commands/operations/doc-create-table.operation.d.ts +17 -0
- package/lib/types/commands/operations/doc-cursor.operation.d.ts +29 -0
- package/lib/types/commands/operations/doc-header-footer-panel.operation.d.ts +20 -0
- package/lib/types/commands/operations/doc-header-footer-ribbon.operation.d.ts +19 -0
- package/lib/types/commands/operations/doc-paragraph-setting-panel.operation.d.ts +17 -0
- package/lib/types/commands/operations/doc-section-setting-panel.operation.d.ts +17 -0
- package/lib/types/commands/operations/insert-break.operation.d.ts +21 -0
- package/lib/types/commands/operations/open-page-setting.operation.d.ts +17 -0
- package/lib/types/commands/operations/paragraph-permission.operation.d.ts +17 -0
- package/lib/types/commands/operations/permission-panel.operation.d.ts +17 -0
- package/lib/types/commands/operations/set-doc-zoom-ratio.operation.d.ts +22 -0
- package/lib/types/commands/util.d.ts +23 -0
- package/lib/types/components/doc-page-render-component.d.ts +21 -0
- package/lib/types/config/config.d.ts +50 -0
- package/lib/types/consts/mobile-context.d.ts +17 -0
- package/lib/types/controllers/components.controller.d.ts +25 -0
- package/lib/types/controllers/doc-auto-format.controller.d.ts +27 -0
- package/lib/types/controllers/doc-header-footer-ribbon.controller.d.ts +31 -0
- package/lib/types/controllers/doc-header-footer.controller.d.ts +46 -0
- package/lib/types/controllers/doc-move-cursor.controller.d.ts +71 -0
- package/lib/types/controllers/doc-paragraph-setting.controller.d.ts +25 -0
- package/lib/types/controllers/doc-section-setting.controller.d.ts +27 -0
- package/lib/types/controllers/doc-table.controller.d.ts +23 -0
- package/lib/types/controllers/format-painter.controller.d.ts +23 -0
- package/lib/types/controllers/mobile/components.controller.d.ts +25 -0
- package/lib/types/controllers/mobile/ui.controller.d.ts +29 -0
- package/lib/types/controllers/render-controllers/back-scroll.render-controller.d.ts +50 -0
- package/lib/types/controllers/render-controllers/doc-canvas-popup-layout-interaction.controller.d.ts +30 -0
- package/lib/types/controllers/render-controllers/doc-checklist.render-controller.d.ts +31 -0
- package/lib/types/controllers/render-controllers/doc-clipboard.controller.d.ts +32 -0
- package/lib/types/controllers/render-controllers/doc-contextmenu.render-controller.d.ts +38 -0
- package/lib/types/controllers/render-controllers/doc-editor-bridge.controller.d.ts +41 -0
- package/lib/types/controllers/render-controllers/doc-field.render-controller.d.ts +31 -0
- package/lib/types/controllers/render-controllers/doc-ime-input.controller.d.ts +44 -0
- package/lib/types/controllers/render-controllers/doc-input.controller.d.ts +36 -0
- package/lib/types/controllers/render-controllers/doc-layout-progress.render-controller.d.ts +42 -0
- package/lib/types/controllers/render-controllers/doc-layout-recovery.render-controller.d.ts +38 -0
- package/lib/types/controllers/render-controllers/doc-mutation-layout.d.ts +35 -0
- package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts +61 -0
- package/lib/types/controllers/render-controllers/doc-paste-options.render-controller.d.ts +27 -0
- package/lib/types/controllers/render-controllers/doc-resize.render-controller.d.ts +30 -0
- package/lib/types/controllers/render-controllers/doc-selection-render.controller.d.ts +50 -0
- package/lib/types/controllers/render-controllers/doc-selection-render.util.d.ts +21 -0
- package/lib/types/controllers/render-controllers/doc.render-controller.d.ts +133 -0
- package/lib/types/controllers/render-controllers/format-painter.render-controller.d.ts +23 -0
- package/lib/types/controllers/render-controllers/mobile/back-scroll.render-controller.d.ts +30 -0
- package/lib/types/controllers/render-controllers/mobile/doc-pinch-zoom.d.ts +51 -0
- package/lib/types/controllers/render-controllers/mobile/doc-selection-render.controller.d.ts +73 -0
- package/lib/types/controllers/render-controllers/mobile/doc.render-controller.d.ts +36 -0
- package/lib/types/controllers/render-controllers/mobile/zoom.render-controller.d.ts +30 -0
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +49 -0
- package/lib/types/controllers/ui.controller.d.ts +38 -0
- package/lib/types/embed-docs-custom-block-bleed.d.ts +32 -0
- package/lib/types/embed-docs-custom-block-refresh.d.ts +28 -0
- package/lib/types/embed-docs-custom-block-scroll.d.ts +19 -0
- package/lib/types/embed-host-anchor.d.ts +48 -0
- package/lib/types/facade/f-document.d.ts +39 -0
- package/lib/types/facade/index.d.ts +17 -0
- package/lib/types/index.d.ts +142 -0
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/ca-ES.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +280 -0
- package/lib/types/locale/es-ES.d.ts +18 -0
- package/lib/types/locale/fa-IR.d.ts +18 -0
- package/lib/types/locale/fr-FR.d.ts +18 -0
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/ja-JP.d.ts +18 -0
- package/lib/types/locale/ko-KR.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/ru-RU.d.ts +18 -0
- package/lib/types/locale/sk-SK.d.ts +18 -0
- package/lib/types/locale/types.d.ts +18 -0
- package/lib/types/locale/vi-VN.d.ts +18 -0
- package/lib/types/locale/zh-CN.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/locale/zh-TW.d.ts +18 -0
- package/lib/types/menu/context-menu.d.ts +39 -0
- package/lib/types/menu/display.menu.d.ts +21 -0
- package/lib/types/menu/header-footer-ribbon.d.ts +17 -0
- package/lib/types/menu/menu.d.ts +77 -0
- package/lib/types/menu/mobile-schema.d.ts +17 -0
- package/lib/types/menu/paragraph-menu.d.ts +90 -0
- package/lib/types/menu/permission.menu.d.ts +19 -0
- package/lib/types/menu/schema.d.ts +18 -0
- package/lib/types/mobile-plugin.d.ts +36 -0
- package/lib/types/plugin.d.ts +37 -0
- package/lib/types/services/clipboard/clipboard.service.d.ts +136 -0
- package/lib/types/services/clipboard/copy-content-cache.d.ts +24 -0
- package/lib/types/services/clipboard/doc-paste-mutation-adapter.service.d.ts +57 -0
- package/lib/types/services/clipboard/html-to-udm/converter.d.ts +51 -0
- package/lib/types/services/clipboard/html-to-udm/parse-node-style.d.ts +17 -0
- package/lib/types/services/clipboard/html-to-udm/parse-to-dom.d.ts +16 -0
- package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-lark.d.ts +18 -0
- package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-univer.d.ts +18 -0
- package/lib/types/services/clipboard/html-to-udm/paste-plugins/plugin-word.d.ts +18 -0
- package/lib/types/services/clipboard/html-to-udm/paste-plugins/type.d.ts +31 -0
- package/lib/types/services/clipboard/html-to-udm/utils.d.ts +17 -0
- package/lib/types/services/clipboard/internal-fragment.d.ts +34 -0
- package/lib/types/services/clipboard/paste-options.d.ts +33 -0
- package/lib/types/services/clipboard/rtf-to-plain-text.d.ts +16 -0
- package/lib/types/services/clipboard/udm-to-html/convertor.d.ts +25 -0
- package/lib/types/services/clipboard/udm-to-html/doc-html-export.service.d.ts +23 -0
- package/lib/types/services/doc-auto-format.service.d.ts +54 -0
- package/lib/types/services/doc-contextual-ribbon.service.d.ts +29 -0
- package/lib/types/services/doc-embed-integration.service.d.ts +65 -0
- package/lib/types/services/doc-event-manager.service.d.ts +204 -0
- package/lib/types/services/doc-heading-collapse.service.d.ts +38 -0
- package/lib/types/services/doc-ime-input-manager.service.d.ts +63 -0
- package/lib/types/services/doc-ime-state-change-interceptor.service.d.ts +23 -0
- package/lib/types/services/doc-layout-coordinator.service.d.ts +79 -0
- package/lib/types/services/doc-layout-interaction.service.d.ts +29 -0
- package/lib/types/services/doc-layout-progress.service.d.ts +30 -0
- package/lib/types/services/doc-menu-style.service.d.ts +37 -0
- package/lib/types/services/doc-mobile-element-menu.service.d.ts +44 -0
- package/lib/types/services/doc-page-layout.service.d.ts +28 -0
- package/lib/types/services/doc-paragraph-menu.service.d.ts +129 -0
- package/lib/types/services/doc-popup-manager.service.d.ts +79 -0
- package/lib/types/services/doc-print-interceptor.service.d.ts +55 -0
- package/lib/types/services/doc-render-background.d.ts +29 -0
- package/lib/types/services/doc-view-scale.d.ts +54 -0
- package/lib/types/services/doc-zoom.d.ts +23 -0
- package/lib/types/services/docs-render.service.d.ts +30 -0
- package/lib/types/services/editor/editor-manager.service.d.ts +88 -0
- package/lib/types/services/editor/editor-runtime-config.d.ts +26 -0
- package/lib/types/services/editor/editor.d.ts +139 -0
- package/lib/types/services/float-menu.service.d.ts +62 -0
- package/lib/types/services/index.d.ts +22 -0
- package/lib/types/services/mobile/doc-selection-render.service.d.ts +60 -0
- package/lib/types/services/mobile/doc-view-scale.d.ts +19 -0
- package/lib/types/services/mobile/float-menu.service.d.ts +20 -0
- package/lib/types/services/mobile/mobile-text-selection-visuals.d.ts +32 -0
- package/lib/types/services/selection/convert-rect-range.d.ts +42 -0
- package/lib/types/services/selection/convert-text-range.d.ts +86 -0
- package/lib/types/services/selection/doc-selection-render.service.d.ts +203 -0
- package/lib/types/services/selection/range-interface.d.ts +34 -0
- package/lib/types/services/selection/rect-range.d.ts +63 -0
- package/lib/types/services/selection/selection-utils.d.ts +41 -0
- package/lib/types/services/selection/text-range.d.ts +88 -0
- package/lib/types/services/selection/word-boundary.d.ts +23 -0
- package/lib/types/shortcuts/core-editing.shortcut.d.ts +25 -0
- package/lib/types/shortcuts/cursor.shortcut.d.ts +41 -0
- package/lib/types/shortcuts/format.shortcut.d.ts +19 -0
- package/lib/types/shortcuts/heading.shortcut.d.ts +22 -0
- package/lib/types/shortcuts/toolbar.shortcut.d.ts +28 -0
- package/lib/types/shortcuts/utils.d.ts +19 -0
- package/lib/types/types/const/padding.d.ts +16 -0
- package/lib/types/utils/date-time-field.d.ts +22 -0
- package/lib/types/utils/horizontal-line.d.ts +17 -0
- package/lib/types/utils/section-header-footer.d.ts +34 -0
- package/lib/types/views/DocLayoutProgress.d.ts +16 -0
- package/lib/types/views/DocLayoutRecovery.d.ts +17 -0
- package/lib/types/views/DocPasteOptions.d.ts +17 -0
- package/lib/types/views/DocSideMenu.d.ts +16 -0
- package/lib/types/views/Icon.d.ts +46 -0
- package/lib/types/views/PageSettings.d.ts +43 -0
- package/lib/types/views/ParagraphMenu.d.ts +79 -0
- package/lib/types/views/RichTextEditor.d.ts +62 -0
- package/lib/types/views/SideMenu.d.ts +43 -0
- package/lib/types/views/const.d.ts +16 -0
- package/lib/types/views/count-bar/CountBar.d.ts +21 -0
- package/lib/types/views/count-bar/ZoomSlider.d.ts +16 -0
- package/lib/types/views/count-bar/index.d.ts +16 -0
- package/lib/types/views/doc-footer/DocFooter.d.ts +16 -0
- package/lib/types/views/doc-footer/index.d.ts +16 -0
- package/lib/types/views/doc-side-menu-layout.d.ts +17 -0
- package/lib/types/views/doc-statistics/DocPageStatus.d.ts +30 -0
- package/lib/types/views/doc-statistics/DocStatistics.d.ts +16 -0
- package/lib/types/views/doc-statistics/use-doc-statistics.d.ts +30 -0
- package/lib/types/views/editor/utils.d.ts +22 -0
- package/lib/types/views/float-toolbar/FloatToolbar.d.ts +40 -0
- package/lib/types/views/float-toolbar/FloatToolbar.stories.d.ts +22 -0
- package/lib/types/views/header-footer/content-cover.d.ts +30 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterFields.d.ts +19 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterOptions.d.ts +23 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterPanel.d.ts +17 -0
- package/lib/types/views/header-footer/panel/DocHeaderFooterRibbonControl.d.ts +20 -0
- package/lib/types/views/header-footer/panel/component-name.d.ts +18 -0
- package/lib/types/views/header-footer/panel/use-header-footer-options.d.ts +25 -0
- package/lib/types/views/header-footer/text-bubble.d.ts +35 -0
- package/lib/types/views/heading-collapse-shape.d.ts +38 -0
- package/lib/types/views/list-type-picker/Picker.d.ts +27 -0
- package/lib/types/views/list-type-picker/index.d.ts +18 -0
- package/lib/types/views/mobile/MobileDocCanvasViewport.d.ts +20 -0
- package/lib/types/views/mobile/MobileDocPasteOptions.d.ts +21 -0
- package/lib/types/views/mobile/MobileDocSettings.d.ts +20 -0
- package/lib/types/views/mobile-doc-toolbar/MobileDocToolbar.d.ts +30 -0
- package/lib/types/views/mobile-element-menu/MobileDocElementMenu.d.ts +25 -0
- package/lib/types/views/mobile-rich-text-editor/MobileRichTextEditor.d.ts +33 -0
- package/lib/types/views/mobile-rich-text-toolbar/MobileRichTextToolbar.d.ts +20 -0
- package/lib/types/views/paragraph-menu/component-keys.d.ts +17 -0
- package/lib/types/views/paragraph-menu/paragraph-menu-position.d.ts +21 -0
- package/lib/types/views/paragraph-menu/theme-color.d.ts +17 -0
- package/lib/types/views/paragraph-setting/Setting.d.ts +45 -0
- package/lib/types/views/paragraph-setting/hook/utils.d.ts +48 -0
- package/lib/types/views/paragraph-setting/index.d.ts +17 -0
- package/lib/types/views/paragraph-setting/line-spacing.d.ts +39 -0
- package/lib/types/views/permission/DocObjectPermissionEntry.d.ts +24 -0
- package/lib/types/views/rich-text-editor/hooks/editor-undo-redo-keyboard.d.ts +36 -0
- package/lib/types/views/rich-text-editor/hooks/index.d.ts +23 -0
- package/lib/types/views/rich-text-editor/hooks/use-editor-click-outside.d.ts +17 -0
- package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +36 -0
- package/lib/types/views/rich-text-editor/hooks/use-is-focusing.d.ts +16 -0
- package/lib/types/views/rich-text-editor/hooks/use-keyboard-event.d.ts +26 -0
- package/lib/types/views/rich-text-editor/hooks/use-left-and-right-arrow.d.ts +18 -0
- package/lib/types/views/rich-text-editor/hooks/use-on-change.d.ts +18 -0
- package/lib/types/views/rich-text-editor/hooks/use-resize.d.ts +23 -0
- package/lib/types/views/section-setting/Setting.d.ts +27 -0
- package/lib/types/views/section-setting/component-name.d.ts +16 -0
- package/lib/types/views/section-setting/index.d.ts +17 -0
- package/lib/types/views/section-setting/use-section-setting.d.ts +75 -0
- package/lib/types/views/side-menu/SideMenu.stories.d.ts +31 -0
- package/lib/types/views/table/create/TableCreate.d.ts +24 -0
- package/lib/types/views/table/create/component-name.d.ts +16 -0
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +54 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +99 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IPastePlugin } from './type';
|
|
17
|
+
declare const WordPastePlugin: IPastePlugin;
|
|
18
|
+
export default WordPastePlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentData, ITextStyle } from '@cool-office/core';
|
|
17
|
+
export interface IStyleRule {
|
|
18
|
+
filter: string | string[] | ((node: HTMLElement) => boolean);
|
|
19
|
+
getStyle(node: HTMLElement): ITextStyle;
|
|
20
|
+
}
|
|
21
|
+
export interface IAfterProcessRule {
|
|
22
|
+
filter: string | string[] | ((node: HTMLElement) => boolean);
|
|
23
|
+
handler(doc: Partial<IDocumentData>, node: HTMLElement): void;
|
|
24
|
+
}
|
|
25
|
+
export interface IPastePlugin {
|
|
26
|
+
name: string;
|
|
27
|
+
checkPasteType(html: string): boolean;
|
|
28
|
+
preprocessHtml?(html: string): string;
|
|
29
|
+
stylesRules: IStyleRule[];
|
|
30
|
+
afterProcessRules: IAfterProcessRule[];
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IParagraphStyle, Nullable } from '@cool-office/core';
|
|
17
|
+
export declare function getParagraphStyle(el: HTMLElement): Nullable<IParagraphStyle>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentBody, IDocumentData, IDocumentNote } from '@cool-office/core';
|
|
17
|
+
export declare const DOC_INTERNAL_FRAGMENT_MIME = "application/x-doc-fragment+json";
|
|
18
|
+
export declare const DOC_INTERNAL_FRAGMENT_COMMENT_PREFIX = "univer-doc-fragment:";
|
|
19
|
+
export interface IDocInternalClipboardFragment {
|
|
20
|
+
version: 1;
|
|
21
|
+
kind: 'univer-doc-fragment';
|
|
22
|
+
doc: Partial<IDocumentData>;
|
|
23
|
+
}
|
|
24
|
+
export declare function createInternalClipboardFragment(doc: Partial<IDocumentData>): string;
|
|
25
|
+
export declare function parseInternalClipboardFragment(value?: string): Partial<IDocumentData> | null;
|
|
26
|
+
export declare function createInternalClipboardDocData(doc: IDocumentData): Partial<IDocumentData>;
|
|
27
|
+
export declare function createInternalClipboardDocDataList(docs: IDocumentData[]): Partial<IDocumentData> | null;
|
|
28
|
+
/** Removes reference characters through TextX so every following clipboard offset stays valid. */
|
|
29
|
+
export declare function omitClipboardNotes(body: IDocumentBody): IDocumentBody;
|
|
30
|
+
/** Each pasted reference owns a new rich segment, including its drawing and table identities. */
|
|
31
|
+
export declare function cloneClipboardNotes(body: IDocumentBody, notes: IDocumentData['notes']): Record<string, IDocumentNote>;
|
|
32
|
+
export declare function embedInternalClipboardFragment(html: string, fragmentJson: string): string;
|
|
33
|
+
export declare function extractInternalClipboardFragmentFromHtml(html?: string): Partial<IDocumentData> | null;
|
|
34
|
+
export declare function wrapClipboardHtml(fragmentHtml: string): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentData, IParagraphStyle, ITextStyle } from '@cool-office/core';
|
|
17
|
+
export type DocPasteMode = 'source' | 'destination' | 'text';
|
|
18
|
+
export interface IDocPasteStyle {
|
|
19
|
+
textStyle: ITextStyle;
|
|
20
|
+
paragraphStyle?: IParagraphStyle;
|
|
21
|
+
}
|
|
22
|
+
export declare const DOC_PASTE_OPTIONS: readonly [{
|
|
23
|
+
readonly value: "source";
|
|
24
|
+
readonly label: "docs-ui.pasteOptions.source";
|
|
25
|
+
}, {
|
|
26
|
+
readonly value: "destination";
|
|
27
|
+
readonly label: "docs-ui.pasteOptions.destination";
|
|
28
|
+
}, {
|
|
29
|
+
readonly value: "text";
|
|
30
|
+
readonly label: "docs-ui.pasteOptions.text";
|
|
31
|
+
}];
|
|
32
|
+
export declare function getClipboardPlainText(doc: Partial<IDocumentData>): string;
|
|
33
|
+
export declare function applyDocPasteMode(source: Partial<IDocumentData>, mode: DocPasteMode, style: IDocPasteStyle, text?: string): Partial<IDocumentData>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function convertClipboardRtfToPlainText(rtf: string): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentData, ITextRun } from '@cool-office/core';
|
|
17
|
+
import type { DocHtmlExportService } from './doc-html-export.service';
|
|
18
|
+
export declare function covertTextRunToHtml(dataStream: string, textRun: ITextRun): string;
|
|
19
|
+
export declare function getBodySliceHtml(doc: IDocumentData, startIndex: number, endIndex: number): string;
|
|
20
|
+
export declare function convertBodyToHtml(doc: IDocumentData): string;
|
|
21
|
+
export declare class UDMToHtmlService {
|
|
22
|
+
private readonly _docHtmlExportService?;
|
|
23
|
+
constructor(_docHtmlExportService?: Pick<DocHtmlExportService, "transformDocumentForHtmlExport"> | undefined);
|
|
24
|
+
convert(docList: IDocumentData[]): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDisposable, IDocumentData } from '@cool-office/core';
|
|
17
|
+
import { Disposable } from '@cool-office/core';
|
|
18
|
+
export type DocHtmlExportTransformer = (documentData: IDocumentData) => IDocumentData;
|
|
19
|
+
export declare class DocHtmlExportService extends Disposable {
|
|
20
|
+
private readonly _transformers;
|
|
21
|
+
registerTransformer(transformer: DocHtmlExportTransformer): IDisposable;
|
|
22
|
+
transformDocumentForHtmlExport(documentData: IDocumentData): IDocumentData;
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { DocumentDataModel, ICommandInfo, ICustomRange, IDisposable, IParagraphRange, Nullable } from '@cool-office/core';
|
|
17
|
+
import type { ITextRangeWithStyle } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable, IUniverInstanceService } from '@cool-office/core';
|
|
19
|
+
import { DocSelectionManagerService } from '@cool-office/docs';
|
|
20
|
+
export interface IAutoFormatContext {
|
|
21
|
+
unit: DocumentDataModel;
|
|
22
|
+
selection: ITextRangeWithStyle;
|
|
23
|
+
/**
|
|
24
|
+
* is selection at doc body
|
|
25
|
+
*/
|
|
26
|
+
isBody: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* selection relative paragraphs
|
|
29
|
+
*/
|
|
30
|
+
paragraphs: IParagraphRange[];
|
|
31
|
+
/**
|
|
32
|
+
* selection relative custom ranges
|
|
33
|
+
*/
|
|
34
|
+
customRanges: ICustomRange[];
|
|
35
|
+
commandId: string;
|
|
36
|
+
commandParams: Nullable<object>;
|
|
37
|
+
}
|
|
38
|
+
export interface IAutoFormat {
|
|
39
|
+
id: string;
|
|
40
|
+
match: (context: IAutoFormatContext) => boolean;
|
|
41
|
+
getMutations: (context: IAutoFormatContext) => ICommandInfo[];
|
|
42
|
+
priority?: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* service for auto-formatting, handle shortcut like `Space` or `Tab`.
|
|
46
|
+
*/
|
|
47
|
+
export declare class DocAutoFormatService extends Disposable {
|
|
48
|
+
private readonly _univerInstanceService;
|
|
49
|
+
private readonly _textSelectionManagerService;
|
|
50
|
+
private _matches;
|
|
51
|
+
constructor(_univerInstanceService: IUniverInstanceService, _textSelectionManagerService: DocSelectionManagerService);
|
|
52
|
+
registerAutoFormat(match: IAutoFormat): IDisposable;
|
|
53
|
+
onAutoFormat(id: string, params: Nullable<object>): ICommandInfo[];
|
|
54
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Disposable } from '@cool-office/core';
|
|
17
|
+
import { IRibbonService } from '@cool-office/ui';
|
|
18
|
+
/** Coordinates the document's containing table and selected content control, not global ribbon priority. */
|
|
19
|
+
export declare class DocContextualRibbonService extends Disposable {
|
|
20
|
+
private readonly _ribbonService;
|
|
21
|
+
private _tableTab;
|
|
22
|
+
private _contentControlTab;
|
|
23
|
+
private _activeTab;
|
|
24
|
+
constructor(_ribbonService: IRibbonService);
|
|
25
|
+
setTableTab(tab: string, visible: boolean): void;
|
|
26
|
+
setContentControlTab(tab: string, visible: boolean): void;
|
|
27
|
+
private _setTab;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDisposable } from '@cool-office/core';
|
|
17
|
+
import type { Observable } from 'rxjs';
|
|
18
|
+
import { Subject } from 'rxjs';
|
|
19
|
+
export declare const DOC_EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
20
|
+
export declare const EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
21
|
+
export interface IDocEmbedInteractionBoundaryService {
|
|
22
|
+
contains(embedId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
|
|
23
|
+
hasRecentInteraction(ownerDocument?: Document): boolean;
|
|
24
|
+
hasRecentInteractionFor?(embedId: string | undefined, ownerDocument?: Document): boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface IDocEmbedRuntimeFocusCoordinator {
|
|
27
|
+
readonly runtimeSessionChanged$: Observable<void>;
|
|
28
|
+
isChildUnitRuntimeEvent(unitId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
|
|
29
|
+
isChildUnitInActiveSession(unitId: string | undefined): boolean;
|
|
30
|
+
shouldSuppressHostInteraction(unitId: string | undefined, target?: EventTarget | null, event?: Event): boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare class EmbedInteractionBoundaryService implements IDocEmbedInteractionBoundaryService {
|
|
33
|
+
private readonly _roots;
|
|
34
|
+
registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
|
|
35
|
+
contains(embedId: string | undefined, target: EventTarget | null | undefined): boolean;
|
|
36
|
+
hasRecentInteraction(): boolean;
|
|
37
|
+
hasRecentInteractionFor(): boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare const IDocEmbedInteractionBoundaryService: typeof EmbedInteractionBoundaryService;
|
|
40
|
+
export declare class EmbedRuntimeFocusCoordinator implements IDocEmbedRuntimeFocusCoordinator {
|
|
41
|
+
private readonly _leases;
|
|
42
|
+
private readonly _elements;
|
|
43
|
+
readonly runtimeSessionChanged$: Subject<void>;
|
|
44
|
+
acquireLease(options: {
|
|
45
|
+
embedId?: string;
|
|
46
|
+
role: string;
|
|
47
|
+
owner?: string;
|
|
48
|
+
childUnitId?: string;
|
|
49
|
+
hostUnitId?: string;
|
|
50
|
+
}): IDisposable;
|
|
51
|
+
registerElement(options: {
|
|
52
|
+
embedId: string;
|
|
53
|
+
role: string;
|
|
54
|
+
element: HTMLElement;
|
|
55
|
+
}): IDisposable;
|
|
56
|
+
registerRuntimeScope(_options: {
|
|
57
|
+
embedId: string;
|
|
58
|
+
hostUnitId?: string;
|
|
59
|
+
childUnitId?: string;
|
|
60
|
+
}): IDisposable;
|
|
61
|
+
isChildUnitRuntimeEvent(_unitId: string | undefined, target: EventTarget | null | undefined): boolean;
|
|
62
|
+
isChildUnitInActiveSession(unitId: string | undefined): boolean;
|
|
63
|
+
shouldSuppressHostInteraction(unitId: string | undefined, target?: EventTarget | null): boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare const IDocEmbedRuntimeFocusCoordinator: typeof EmbedRuntimeFocusCoordinator;
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { DocumentDataModel, ICustomRange, IParagraph, Nullable } from '@cool-office/core';
|
|
17
|
+
import type { Documents, DocumentSkeleton, IBoundRectNoAngle, IDocsTableRenderViewport, IDocumentSkeletonGlyph, IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable } from '@cool-office/core';
|
|
19
|
+
import { DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
export interface ICustomRangeBound {
|
|
21
|
+
customRange: ICustomRange;
|
|
22
|
+
rects: IBoundRectNoAngle[];
|
|
23
|
+
segmentId?: string;
|
|
24
|
+
segmentPageIndex: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IBulletBound {
|
|
27
|
+
rect: IBoundRectNoAngle;
|
|
28
|
+
segmentId?: string;
|
|
29
|
+
segmentPageIndex: number;
|
|
30
|
+
paragraph: IParagraph;
|
|
31
|
+
}
|
|
32
|
+
export declare const calcDocGlyphPosition: (glyph: IDocumentSkeletonGlyph, documents: Documents, skeleton: DocumentSkeleton, pageIndex?: number) => IBoundRectNoAngle | undefined;
|
|
33
|
+
export declare function getListMarkerFallbackHit(paragraphBound: Pick<IMutiPageParagraphBound, 'firstLine' | 'pageIndex' | 'rect' | 'segmentId'>, paragraph: Pick<IParagraph, 'bullet' | 'startIndex'> | undefined, point: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
}): IBulletBound | null;
|
|
37
|
+
export declare function getListParagraphContextMenuHit(paragraphBound: Pick<IMutiPageParagraphBound, 'firstLine' | 'pageIndex' | 'rect' | 'segmentId'>, paragraph: Pick<IParagraph, 'bullet' | 'startIndex'> | undefined, point: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
}): IBulletBound | null;
|
|
41
|
+
export declare function isChecklistListType(listType?: string): boolean;
|
|
42
|
+
export declare function getListMarkerFallbackBound(paragraphBound: Pick<IMutiPageParagraphBound, 'firstLine' | 'pageIndex' | 'rect' | 'segmentId'>, paragraph: Pick<IParagraph, 'bullet' | 'startIndex'> | undefined): IBulletBound | null;
|
|
43
|
+
interface ICustomRangeActive {
|
|
44
|
+
range: ICustomRange;
|
|
45
|
+
segmentId?: string;
|
|
46
|
+
segmentPageIndex: number;
|
|
47
|
+
rects: IBoundRectNoAngle[];
|
|
48
|
+
}
|
|
49
|
+
interface ICustomRangeClickEvent extends ICustomRangeActive {
|
|
50
|
+
ctrlKey: boolean;
|
|
51
|
+
metaKey: boolean;
|
|
52
|
+
}
|
|
53
|
+
interface IBulletActive {
|
|
54
|
+
paragraph: IParagraph;
|
|
55
|
+
segmentId?: string;
|
|
56
|
+
segmentPageIndex: number;
|
|
57
|
+
rect: IBoundRectNoAngle;
|
|
58
|
+
}
|
|
59
|
+
export interface IMutiPageParagraphBound {
|
|
60
|
+
rect: IBoundRectNoAngle;
|
|
61
|
+
paragraphStart: number;
|
|
62
|
+
paragraphEnd: number;
|
|
63
|
+
startIndex: number;
|
|
64
|
+
rects: IBoundRectNoAngle[];
|
|
65
|
+
pageIndex: number;
|
|
66
|
+
segmentId?: string;
|
|
67
|
+
firstLine: IBoundRectNoAngle;
|
|
68
|
+
}
|
|
69
|
+
export interface ITableParagraphBound {
|
|
70
|
+
rect: IBoundRectNoAngle;
|
|
71
|
+
paragraphStart: number;
|
|
72
|
+
paragraphEnd: number;
|
|
73
|
+
startIndex: number;
|
|
74
|
+
pageIndex: number;
|
|
75
|
+
segmentId?: string;
|
|
76
|
+
rowIndex: number;
|
|
77
|
+
colIndex: number;
|
|
78
|
+
firstLine: IBoundRectNoAngle;
|
|
79
|
+
tableId: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ITableBound {
|
|
82
|
+
rect: IBoundRectNoAngle;
|
|
83
|
+
pageIndex: number;
|
|
84
|
+
tableId: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ITableCellBound {
|
|
87
|
+
rect: IBoundRectNoAngle;
|
|
88
|
+
pageIndex: number;
|
|
89
|
+
rowIndex: number;
|
|
90
|
+
colIndex: number;
|
|
91
|
+
tableId: string;
|
|
92
|
+
}
|
|
93
|
+
export declare function getTableBlockMenuHoverRect(tableRect: IBoundRectNoAngle): IBoundRectNoAngle;
|
|
94
|
+
export declare function getTableHorizontalViewportGeometry(tableLeft: number, tableWidth: number, viewport: Nullable<IDocsTableRenderViewport>): {
|
|
95
|
+
scrollLeft: number;
|
|
96
|
+
visibleLeft: number;
|
|
97
|
+
visibleRight: number;
|
|
98
|
+
};
|
|
99
|
+
export declare class DocEventManagerService extends Disposable implements IRenderModule {
|
|
100
|
+
private _context;
|
|
101
|
+
private readonly _docSkeletonManagerService;
|
|
102
|
+
private readonly _hoverCustomRanges$;
|
|
103
|
+
readonly hoverCustomRanges$: import("rxjs").Observable<ICustomRangeActive[]>;
|
|
104
|
+
private readonly _clickCustomRanges$;
|
|
105
|
+
readonly clickCustomRanges$: import("rxjs").Observable<ICustomRangeClickEvent>;
|
|
106
|
+
private readonly _pointerDownCustomRanges$;
|
|
107
|
+
readonly pointerDownCustomRanges$: import("rxjs").Observable<ICustomRangeActive[]>;
|
|
108
|
+
private readonly _hoverBullet$;
|
|
109
|
+
readonly hoverBullet$: import("rxjs").Observable<Nullable<IBulletActive>>;
|
|
110
|
+
private readonly _clickBullet$;
|
|
111
|
+
readonly clickBullets$: import("rxjs").Observable<IBulletActive>;
|
|
112
|
+
private readonly _contextMenuBullet$;
|
|
113
|
+
readonly contextMenuBullets$: import("rxjs").Observable<IBulletActive & {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
}>;
|
|
117
|
+
private readonly _hoverParagraph$;
|
|
118
|
+
readonly hoverParagraph$: import("rxjs").Observable<Nullable<IMutiPageParagraphBound>>;
|
|
119
|
+
readonly hoverParagraphRealTime$: import("rxjs").Observable<Nullable<IMutiPageParagraphBound>>;
|
|
120
|
+
get hoverParagraph(): Nullable<IMutiPageParagraphBound>;
|
|
121
|
+
private readonly _hoverParagraphLeft$;
|
|
122
|
+
readonly hoverParagraphLeft$: import("rxjs").Observable<Nullable<IMutiPageParagraphBound>>;
|
|
123
|
+
readonly hoverParagraphLeftRealTime$: import("rxjs").Observable<Nullable<IMutiPageParagraphBound>>;
|
|
124
|
+
get hoverParagraphLeft(): Nullable<IMutiPageParagraphBound>;
|
|
125
|
+
private readonly _hoverTableCell$;
|
|
126
|
+
readonly hoverTableCell$: import("rxjs").Observable<Nullable<ITableCellBound>>;
|
|
127
|
+
readonly hoverTableCellRealTime$: import("rxjs").Observable<Nullable<ITableCellBound>>;
|
|
128
|
+
private readonly _hoverTable$;
|
|
129
|
+
readonly hoverTable$: import("rxjs").Observable<Nullable<ITableBound>>;
|
|
130
|
+
readonly hoverTableRealTime$: import("rxjs").Observable<Nullable<ITableBound>>;
|
|
131
|
+
private _customRangeDirty;
|
|
132
|
+
private _customRangeCount;
|
|
133
|
+
private _customRangeSkeletonSignature;
|
|
134
|
+
private _bulletDirty;
|
|
135
|
+
private _paragraphDirty;
|
|
136
|
+
private _tableBoundsDirty;
|
|
137
|
+
/**
|
|
138
|
+
* cache the bounding of custom ranges,
|
|
139
|
+
* it will be updated when the doc-skeleton is recalculated
|
|
140
|
+
*/
|
|
141
|
+
private _customRangeBounds;
|
|
142
|
+
/**
|
|
143
|
+
* cache the bounding of bullets,
|
|
144
|
+
* it will be updated when the doc-skeleton is recalculated
|
|
145
|
+
*/
|
|
146
|
+
private _bulletBounds;
|
|
147
|
+
/**
|
|
148
|
+
* cache the bounding of paragraphs,
|
|
149
|
+
* it will be updated when the doc-skeleton is recalculated
|
|
150
|
+
*/
|
|
151
|
+
private _paragraphBounds;
|
|
152
|
+
private _paragraphLeftBounds;
|
|
153
|
+
private _tableParagraphBounds;
|
|
154
|
+
private _tableParagraphBoundsByIndex;
|
|
155
|
+
private _segmentParagraphBounds;
|
|
156
|
+
private _tableViewportSignature;
|
|
157
|
+
private _tableCellBounds;
|
|
158
|
+
private _tableCellGeometries;
|
|
159
|
+
private _tableCellPages;
|
|
160
|
+
private _tableBounds;
|
|
161
|
+
private get _skeleton();
|
|
162
|
+
private get _documents();
|
|
163
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService);
|
|
164
|
+
dispose(): void;
|
|
165
|
+
private _initPointer;
|
|
166
|
+
private _initResetDirty;
|
|
167
|
+
private _initEvents;
|
|
168
|
+
isPointerOnBullet(offsetX: number, offsetY: number): boolean;
|
|
169
|
+
isPointerOnInteractiveRange(offsetX: number, offsetY: number): boolean;
|
|
170
|
+
isPointerOnNonChecklistBullet(offsetX: number, offsetY: number): boolean;
|
|
171
|
+
getBulletBounds(): IBulletBound[];
|
|
172
|
+
getCustomRangeBounds(): ICustomRangeBound[];
|
|
173
|
+
getListContextMenuBulletByOffset(offsetX: number, offsetY: number): Nullable<IBulletBound>;
|
|
174
|
+
private _buildCustomRangeBoundsBySegment;
|
|
175
|
+
private _buildCustomRangeBounds;
|
|
176
|
+
private _calcActiveRanges;
|
|
177
|
+
private _buildBulletBoundsBySegment;
|
|
178
|
+
private _buildBulletBounds;
|
|
179
|
+
private _calcActiveBullet;
|
|
180
|
+
private _calcActiveListParagraph;
|
|
181
|
+
private _getParagraphByStartIndex;
|
|
182
|
+
private _buildParagraphBoundsBySegment;
|
|
183
|
+
private _buildParagraphBounds;
|
|
184
|
+
private _buildTableBounds;
|
|
185
|
+
private _buildTableCellsForPage;
|
|
186
|
+
private _buildTableCellsForDocumentRange;
|
|
187
|
+
private _getTableParagraphBoundsForCell;
|
|
188
|
+
contextMenuParagraph: {
|
|
189
|
+
unitId: string;
|
|
190
|
+
segmentId: string;
|
|
191
|
+
paragraphId: string;
|
|
192
|
+
} | null;
|
|
193
|
+
getParagraphByOffset(offsetX: number, offsetY: number): Nullable<IMutiPageParagraphBound>;
|
|
194
|
+
private _calcActiveParagraph;
|
|
195
|
+
private _calcActiveParagraphLeft;
|
|
196
|
+
get paragraphBounds(): Map<number, IMutiPageParagraphBound>;
|
|
197
|
+
get tableBounds(): Map<string, ITableBound>;
|
|
198
|
+
findTableCellBound(tableId: string, rowIndex: number, colIndex: number, pageIndex?: number): ITableCellBound | undefined;
|
|
199
|
+
findParagraphBoundByIndex(index: number): IMutiPageParagraphBound | ITableParagraphBound | undefined;
|
|
200
|
+
findParagraphBoundsInRange(startIndex: number, endIndex: number): IMutiPageParagraphBound[];
|
|
201
|
+
private _getTableViewportSignature;
|
|
202
|
+
}
|
|
203
|
+
export declare function getPreferredParagraphBoundsInRange(bodyBounds: IMutiPageParagraphBound[], tableBounds: IMutiPageParagraphBound[], startIndex: number, endIndex: number): IMutiPageParagraphBound[];
|
|
204
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { DocumentDataModel } from '@cool-office/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable, ICommandService, LocaleService, ThemeService } from '@cool-office/core';
|
|
19
|
+
import { DocSelectionManagerService, DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import { ILayoutService } from '@cool-office/ui';
|
|
21
|
+
import { DocEventManagerService } from './doc-event-manager.service';
|
|
22
|
+
export declare class DocHeadingCollapseService extends Disposable implements IRenderModule {
|
|
23
|
+
private readonly _context;
|
|
24
|
+
private readonly _skeletonManager;
|
|
25
|
+
private readonly _eventManager;
|
|
26
|
+
private readonly _selections;
|
|
27
|
+
private readonly _commandService;
|
|
28
|
+
private readonly _layoutService;
|
|
29
|
+
private readonly _buttons;
|
|
30
|
+
private _colors;
|
|
31
|
+
private _expandLabel;
|
|
32
|
+
private _collapseLabel;
|
|
33
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _skeletonManager: DocSkeletonManagerService, _eventManager: DocEventManagerService, _selections: DocSelectionManagerService, _commandService: ICommandService, _layoutService: ILayoutService, themeService: ThemeService, localeService: LocaleService);
|
|
34
|
+
private _getColors;
|
|
35
|
+
private _normalizeSelection;
|
|
36
|
+
private _update;
|
|
37
|
+
dispose(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { DocumentDataModel, Nullable } from '@cool-office/core';
|
|
17
|
+
import type { IRichTextEditingMutationParams } from '@cool-office/docs';
|
|
18
|
+
import type { IRenderContext, IRenderModule, ITextRangeWithStyle } from '@cool-office/engine-render';
|
|
19
|
+
import { RxDisposable } from '@cool-office/core';
|
|
20
|
+
interface ICacheParams {
|
|
21
|
+
undoCache: IRichTextEditingMutationParams[];
|
|
22
|
+
redoCache: IRichTextEditingMutationParams[];
|
|
23
|
+
}
|
|
24
|
+
export declare class DocIMEInputManagerService extends RxDisposable implements IRenderModule {
|
|
25
|
+
private readonly _context;
|
|
26
|
+
private _previousActiveRange;
|
|
27
|
+
private _previousDocRanges;
|
|
28
|
+
private _compositionRange;
|
|
29
|
+
private _previousSelectionOptions;
|
|
30
|
+
private _undoMutationParamsCache;
|
|
31
|
+
private _redoMutationParamsCache;
|
|
32
|
+
constructor(_context: IRenderContext<DocumentDataModel>);
|
|
33
|
+
clearUndoRedoMutationParamsCache(): void;
|
|
34
|
+
getUndoRedoMutationParamsCache(): {
|
|
35
|
+
undoCache: IRichTextEditingMutationParams[];
|
|
36
|
+
redoCache: IRichTextEditingMutationParams[];
|
|
37
|
+
};
|
|
38
|
+
setUndoRedoMutationParamsCache({ undoCache, redoCache }: ICacheParams): void;
|
|
39
|
+
getActiveRange(): Nullable<ITextRangeWithStyle>;
|
|
40
|
+
setActiveRange(range: Nullable<ITextRangeWithStyle>): void;
|
|
41
|
+
getCompositionRange(): Nullable<ITextRangeWithStyle>;
|
|
42
|
+
setCompositionRange(range: Nullable<ITextRangeWithStyle>): void;
|
|
43
|
+
getPreviousDocRanges(): ITextRangeWithStyle[];
|
|
44
|
+
setPreviousDocRanges(ranges: ITextRangeWithStyle[]): void;
|
|
45
|
+
getPreviousSelectionOptions(): Nullable<{
|
|
46
|
+
[key: string]: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
setPreviousSelectionOptions(options: Nullable<{
|
|
49
|
+
[key: string]: boolean;
|
|
50
|
+
}>): void;
|
|
51
|
+
pushUndoRedoMutationParams(undoParams: IRichTextEditingMutationParams, redoParams: IRichTextEditingMutationParams): void;
|
|
52
|
+
fetchComposedUndoRedoMutationParams(): {
|
|
53
|
+
redoMutationParams: IRichTextEditingMutationParams;
|
|
54
|
+
undoMutationParams: IRichTextEditingMutationParams;
|
|
55
|
+
previousActiveRange: ITextRangeWithStyle;
|
|
56
|
+
previousDocRanges: ITextRangeWithStyle[];
|
|
57
|
+
previousSelectionOptions: Nullable<{
|
|
58
|
+
[key: string]: boolean;
|
|
59
|
+
}>;
|
|
60
|
+
} | null;
|
|
61
|
+
dispose(): void;
|
|
62
|
+
}
|
|
63
|
+
export {};
|