@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,36 @@
|
|
|
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 } from '@cool-office/core';
|
|
19
|
+
import { DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import { IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator } from '../../services/doc-embed-integration.service';
|
|
21
|
+
import { DocMenuStyleService } from '../../services/doc-menu-style.service';
|
|
22
|
+
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
23
|
+
export declare class DocInputController extends Disposable implements IRenderModule {
|
|
24
|
+
private readonly _context;
|
|
25
|
+
private readonly _docSelectionRenderService;
|
|
26
|
+
private readonly _docSkeletonManagerService;
|
|
27
|
+
private readonly _commandService;
|
|
28
|
+
private readonly _docMenuStyleService;
|
|
29
|
+
private readonly _embedRuntimeFocusCoordinator?;
|
|
30
|
+
private _onInputSubscription;
|
|
31
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _commandService: ICommandService, _docMenuStyleService: DocMenuStyleService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
|
|
32
|
+
dispose(): void;
|
|
33
|
+
private _init;
|
|
34
|
+
private _initialNormalInput;
|
|
35
|
+
private _isEmbedChildInputActive;
|
|
36
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { IDocumentLayoutProgress, IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { RxDisposable } from '@cool-office/core';
|
|
19
|
+
import { DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import { DocLayoutProgressService } from '../../services/doc-layout-progress.service';
|
|
21
|
+
export declare const DOC_LAYOUT_PROGRESS_DELAY_MS = 2000;
|
|
22
|
+
export declare const DOC_LAYOUT_PROGRESS_CANCEL_GRACE_MS = 1000;
|
|
23
|
+
export declare function resolveDocLayoutProgressPercent(progress: IDocumentLayoutProgress): number;
|
|
24
|
+
export declare class DocLayoutProgressRenderController extends RxDisposable implements IRenderModule {
|
|
25
|
+
private readonly _context;
|
|
26
|
+
private readonly _docSkeletonManagerService;
|
|
27
|
+
private readonly _docLayoutProgressService;
|
|
28
|
+
private _visible;
|
|
29
|
+
private _delayTimer;
|
|
30
|
+
private _cancelTimer;
|
|
31
|
+
private _latestProgress;
|
|
32
|
+
private _layoutStartedAt;
|
|
33
|
+
private _maxProgress;
|
|
34
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSkeletonManagerService: DocSkeletonManagerService, _docLayoutProgressService: DocLayoutProgressService);
|
|
35
|
+
dispose(): void;
|
|
36
|
+
private _handleProgress;
|
|
37
|
+
private _scheduleShow;
|
|
38
|
+
private _show;
|
|
39
|
+
private _scheduleCancelledClear;
|
|
40
|
+
private _clearCancelTimer;
|
|
41
|
+
private _reset;
|
|
42
|
+
}
|
|
@@ -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, IDisposable } from '@cool-office/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { RxDisposable } from '@cool-office/core';
|
|
19
|
+
import { DocLayoutExecutorService } from '@cool-office/docs';
|
|
20
|
+
import { IShortcutService } from '@cool-office/ui';
|
|
21
|
+
import { DocCanvasPopManagerService } from '../../services/doc-popup-manager.service';
|
|
22
|
+
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
23
|
+
export declare function acquireDocLayoutRecoveryInteractionLock(canvas: HTMLElement, shortcutService: Pick<IShortcutService, 'forceDisable'>, blurSelection: () => void): IDisposable;
|
|
24
|
+
export declare class DocLayoutRecoveryRenderController extends RxDisposable implements IRenderModule {
|
|
25
|
+
private readonly _context;
|
|
26
|
+
private readonly _layoutExecutorService;
|
|
27
|
+
private readonly _docPopupManagerService;
|
|
28
|
+
private readonly _docSelectionRenderService;
|
|
29
|
+
private readonly _shortcutService;
|
|
30
|
+
private _popup;
|
|
31
|
+
private _interactionLock;
|
|
32
|
+
private _visible;
|
|
33
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _layoutExecutorService: DocLayoutExecutorService, _docPopupManagerService: DocCanvasPopManagerService, _docSelectionRenderService: DocSelectionRenderService, _shortcutService: IShortcutService);
|
|
34
|
+
dispose(): void;
|
|
35
|
+
private _show;
|
|
36
|
+
private _hide;
|
|
37
|
+
private _restoreInteraction;
|
|
38
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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, JSONXActions } from '@cool-office/core';
|
|
17
|
+
import type { IDocumentLayoutInvalidation } from '@cool-office/engine-render';
|
|
18
|
+
interface IDocumentLayoutRange {
|
|
19
|
+
end: number;
|
|
20
|
+
start: number;
|
|
21
|
+
}
|
|
22
|
+
export interface IDocumentMutationLayoutImpact {
|
|
23
|
+
global: boolean;
|
|
24
|
+
range?: IDocumentLayoutRange;
|
|
25
|
+
unresolvedLocal?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function getBodyTextXActions(actions: JSONXActions, segmentId?: string): unknown[] | undefined;
|
|
28
|
+
export declare function getSingleBodyTextXActions(actions: JSONXActions, segmentId?: string): unknown[] | undefined;
|
|
29
|
+
export declare function getDocumentMutationLayoutImpact(actions: JSONXActions, snapshot: Pick<IDocumentData, 'body' | 'styles'>): IDocumentMutationLayoutImpact;
|
|
30
|
+
export declare function mergeMutationLayoutInvalidation(textInvalidation: IDocumentLayoutInvalidation | undefined, structuralRange: IDocumentLayoutRange | undefined): IDocumentLayoutInvalidation | undefined;
|
|
31
|
+
export declare function resolveMutationLayoutRequest(textInvalidation: IDocumentLayoutInvalidation | undefined, impact: IDocumentMutationLayoutImpact, bodyRangeStarts: number[]): {
|
|
32
|
+
anchor: number | undefined;
|
|
33
|
+
invalidation: IDocumentLayoutInvalidation | undefined;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
package/lib/types/controllers/render-controllers/doc-paragraph-placeholder.render-controller.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
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, IDocumentBody, Nullable } from '@cool-office/core';
|
|
17
|
+
import type { IDocumentSkeletonPage, IRenderContext, IRenderModule, UniverRenderingContext } from '@cool-office/engine-render';
|
|
18
|
+
import type { IUniverDocsUIConfig } from '../../config/config';
|
|
19
|
+
import { Disposable, IConfigService, LocaleService, ThemeService } from '@cool-office/core';
|
|
20
|
+
import { DocSelectionManagerService } from '@cool-office/docs';
|
|
21
|
+
export interface IParagraphPlaceholderLayout {
|
|
22
|
+
clipBottom?: number;
|
|
23
|
+
clipLeft?: number;
|
|
24
|
+
clipRight?: number;
|
|
25
|
+
clipTop?: number;
|
|
26
|
+
fontFamily: string;
|
|
27
|
+
fontSize: number;
|
|
28
|
+
fontWeight: string;
|
|
29
|
+
maxWidth: number;
|
|
30
|
+
text: string;
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
}
|
|
34
|
+
interface IParagraphPlaceholderLocale {
|
|
35
|
+
heading1: string;
|
|
36
|
+
heading2: string;
|
|
37
|
+
heading3: string;
|
|
38
|
+
heading4: string;
|
|
39
|
+
heading5: string;
|
|
40
|
+
listItem: string;
|
|
41
|
+
normalText: string;
|
|
42
|
+
}
|
|
43
|
+
interface IParagraphPlaceholderLayoutOptions {
|
|
44
|
+
docsLeft?: number;
|
|
45
|
+
unitId?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare class DocParagraphPlaceholderRenderController extends Disposable implements IRenderModule {
|
|
48
|
+
private readonly _context;
|
|
49
|
+
private readonly _localeService;
|
|
50
|
+
private readonly _docSelectionManagerService;
|
|
51
|
+
private readonly _configService;
|
|
52
|
+
private readonly _themeService;
|
|
53
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _localeService: LocaleService, _docSelectionManagerService: DocSelectionManagerService, _configService: IConfigService, _themeService: ThemeService);
|
|
54
|
+
private _initParagraphPlaceholderRender;
|
|
55
|
+
private _drawPagePlaceholders;
|
|
56
|
+
private _getLocale;
|
|
57
|
+
}
|
|
58
|
+
export declare function shouldRenderParagraphPlaceholder(documentModel: DocumentDataModel, unitId: string, config?: Nullable<IUniverDocsUIConfig>): boolean;
|
|
59
|
+
export declare function getParagraphPlaceholderLayouts(page: IDocumentSkeletonPage, body: IDocumentBody, locale: IParagraphPlaceholderLocale, pageLeft: number | undefined, pageTop: number | undefined, activeOffset: number, options?: IParagraphPlaceholderLayoutOptions): IParagraphPlaceholderLayout[];
|
|
60
|
+
export declare function drawParagraphPlaceholders(ctx: UniverRenderingContext, placeholders: IParagraphPlaceholderLayout[], color?: string): void;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
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, IContextService } from '@cool-office/core';
|
|
19
|
+
import { IDocClipboardService } from '../../services/clipboard/clipboard.service';
|
|
20
|
+
import { DocCanvasPopManagerService } from '../../services/doc-popup-manager.service';
|
|
21
|
+
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
22
|
+
export declare class DocPasteOptionsRenderController extends Disposable implements IRenderModule {
|
|
23
|
+
private readonly _context;
|
|
24
|
+
private readonly _clipboard;
|
|
25
|
+
private _popup;
|
|
26
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _clipboard: IDocClipboardService, selection: DocSelectionRenderService, popupManager: DocCanvasPopManagerService, contextService: IContextService);
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
17
|
+
import { Disposable } from '@cool-office/core';
|
|
18
|
+
import { DocSelectionManagerService } from '@cool-office/docs';
|
|
19
|
+
import { ISidebarService } from '@cool-office/ui';
|
|
20
|
+
import { DocPageLayoutService } from '../../services/doc-page-layout.service';
|
|
21
|
+
export declare function hasRenderableDocSkeleton(component: unknown): boolean;
|
|
22
|
+
export declare class DocResizeRenderController extends Disposable implements IRenderModule {
|
|
23
|
+
private _context;
|
|
24
|
+
private readonly _docPageLayoutService;
|
|
25
|
+
private readonly _textSelectionManagerService;
|
|
26
|
+
private readonly _sidebarService;
|
|
27
|
+
constructor(_context: IRenderContext, _docPageLayoutService: DocPageLayoutService, _textSelectionManagerService: DocSelectionManagerService, _sidebarService: ISidebarService);
|
|
28
|
+
private _initResize;
|
|
29
|
+
private _refreshLayoutAndSelection;
|
|
30
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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, IUniverInstanceService } from '@cool-office/core';
|
|
19
|
+
import { DocSelectionManagerService, DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import { IDocEmbedInteractionBoundaryService, IDocEmbedRuntimeFocusCoordinator } from '../../services/doc-embed-integration.service';
|
|
21
|
+
import { IEditorService } from '../../services/editor/editor-manager.service';
|
|
22
|
+
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
23
|
+
export declare class DocSelectionRenderController extends Disposable implements IRenderModule {
|
|
24
|
+
private readonly _context;
|
|
25
|
+
private readonly _commandService;
|
|
26
|
+
private readonly _editorService;
|
|
27
|
+
private readonly _instanceSrv;
|
|
28
|
+
private readonly _docSelectionRenderService;
|
|
29
|
+
private readonly _docSkeletonManagerService;
|
|
30
|
+
private readonly _docSelectionManagerService;
|
|
31
|
+
private readonly _embedRuntimeFocusCoordinator?;
|
|
32
|
+
private _loadedMap;
|
|
33
|
+
private _deferredEditorFocusTimer;
|
|
34
|
+
private _initialSelectionReady;
|
|
35
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _editorService: IEditorService, _instanceSrv: IUniverInstanceService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _docSelectionManagerService: DocSelectionManagerService, _embedInteractionBoundaryService?: IDocEmbedInteractionBoundaryService, _embedRuntimeFocusCoordinator?: IDocEmbedRuntimeFocusCoordinator | undefined);
|
|
36
|
+
private _initialize;
|
|
37
|
+
private _init;
|
|
38
|
+
private _refreshListener;
|
|
39
|
+
private _syncSelection;
|
|
40
|
+
private _initialMain;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
private _syncEditArea;
|
|
43
|
+
private _getTransformCoordForDocumentOffset;
|
|
44
|
+
private _isEditorReadOnly;
|
|
45
|
+
private _setEditorFocus;
|
|
46
|
+
private _isEmbedInteractionEvent;
|
|
47
|
+
private _isEmbedChildInteractionActive;
|
|
48
|
+
private _commandExecutedListener;
|
|
49
|
+
private _skeletonListener;
|
|
50
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { IMouseEvent, IPointerEvent } from '@cool-office/engine-render';
|
|
17
|
+
export declare function isEmbedInteractionEvent(evt: IPointerEvent | IMouseEvent): boolean;
|
|
18
|
+
export declare function getEventClientPoint(evt: IPointerEvent | IMouseEvent, target: EventTarget | null): {
|
|
19
|
+
clientX: number;
|
|
20
|
+
clientY: number;
|
|
21
|
+
} | undefined;
|
|
@@ -0,0 +1,133 @@
|
|
|
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, IDocDrawingBase, JSONXActions } from '@cool-office/core';
|
|
17
|
+
import type { DocumentSkeleton, IDocumentLayoutInvalidation, IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { ICommandService, ILogService, IUniverInstanceService, RxDisposable, ThemeService } from '@cool-office/core';
|
|
19
|
+
import { DocLayoutExecutorService, DocSelectionManagerService, DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import { IRenderManagerService } from '@cool-office/engine-render';
|
|
21
|
+
import { DocLayoutInteractionService } from '../../services/doc-layout-interaction.service';
|
|
22
|
+
import { DocPageLayoutService } from '../../services/doc-page-layout.service';
|
|
23
|
+
import { DocViewScaleService } from '../../services/doc-view-scale';
|
|
24
|
+
import { IEditorService } from '../../services/editor/editor-manager.service';
|
|
25
|
+
import { DocSelectionRenderService } from '../../services/selection/doc-selection-render.service';
|
|
26
|
+
export interface IDocLayoutScheduleOptions {
|
|
27
|
+
deferForeground?: boolean;
|
|
28
|
+
reuseMainBaseline?: boolean;
|
|
29
|
+
allowMetadataOnlyStructuralTailReuse?: boolean;
|
|
30
|
+
reason: 'initial' | 'edit';
|
|
31
|
+
anchor?: number;
|
|
32
|
+
priorityAnchor?: number;
|
|
33
|
+
invalidation?: IDocumentLayoutInvalidation;
|
|
34
|
+
modernPageWidth?: number;
|
|
35
|
+
modernHorizontalMargin?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Returns false only when a mutation is proven not to affect text layout.
|
|
39
|
+
*
|
|
40
|
+
* WRAP_NONE drawings are positioned independently from text, so moving, resizing,
|
|
41
|
+
* rotating, or switching them between front/behind text must refresh drawing
|
|
42
|
+
* geometry without starting a document layout generation. Accessibility metadata
|
|
43
|
+
* never participates in layout, regardless of wrapping mode. Every uncertain case
|
|
44
|
+
* remains conservative and reflows.
|
|
45
|
+
*/
|
|
46
|
+
export declare function doesDocMutationRequireLayout(actions: JSONXActions, drawings: Record<string, IDocDrawingBase> | undefined): boolean;
|
|
47
|
+
export declare class DocRenderController extends RxDisposable implements IRenderModule {
|
|
48
|
+
protected readonly _context: IRenderContext<DocumentDataModel>;
|
|
49
|
+
private readonly _commandService;
|
|
50
|
+
private readonly _docSelectionRenderService;
|
|
51
|
+
protected readonly _docSkeletonManagerService: DocSkeletonManagerService;
|
|
52
|
+
private readonly _editorService;
|
|
53
|
+
private readonly _renderManagerService;
|
|
54
|
+
private readonly _univerInstanceService;
|
|
55
|
+
private readonly _docPageLayoutService;
|
|
56
|
+
private readonly _textSelectionManagerService;
|
|
57
|
+
private readonly _docViewScaleService;
|
|
58
|
+
private readonly _themeService;
|
|
59
|
+
private readonly _docLayoutExecutorService;
|
|
60
|
+
private readonly _docLayoutInteractionService;
|
|
61
|
+
private readonly _logService;
|
|
62
|
+
private _changesetRenderScheduled;
|
|
63
|
+
private _pendingChangesetLayoutRequest;
|
|
64
|
+
private readonly _layoutCoordinator;
|
|
65
|
+
private _layoutRequestId;
|
|
66
|
+
private _workerHandoffTimer;
|
|
67
|
+
private _workerPresentationResumeTimer;
|
|
68
|
+
private _pendingWorkerHandoff;
|
|
69
|
+
private _pendingWorkerEditBatch;
|
|
70
|
+
private _latestLayoutRestart;
|
|
71
|
+
private _pendingImeLayoutRestart;
|
|
72
|
+
private _isImeComposing;
|
|
73
|
+
private _recoveryViewportAnchor;
|
|
74
|
+
private _pendingMaterializedPageRange;
|
|
75
|
+
private _isMaterializingPages;
|
|
76
|
+
private _reservedLayoutWidth;
|
|
77
|
+
private _reservedLayoutHeight;
|
|
78
|
+
private _fontInitialization;
|
|
79
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _commandService: ICommandService, _docSelectionRenderService: DocSelectionRenderService, _docSkeletonManagerService: DocSkeletonManagerService, _editorService: IEditorService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _docPageLayoutService: DocPageLayoutService, _textSelectionManagerService: DocSelectionManagerService, _docViewScaleService: DocViewScaleService, _themeService: ThemeService, _docLayoutExecutorService: DocLayoutExecutorService, _docLayoutInteractionService: DocLayoutInteractionService, _logService: ILogService);
|
|
80
|
+
private _scheduleVisualFrame;
|
|
81
|
+
reRender(unitId: string, anchor?: number, invalidation?: IDocumentLayoutInvalidation, priorityAnchor?: number, refreshMainSelection?: boolean, preserveInactiveViewportAnchor?: boolean, deferForeground?: boolean): void;
|
|
82
|
+
dispose(): void;
|
|
83
|
+
refreshCustomBlockPresentation(unitId: string): boolean;
|
|
84
|
+
protected _scheduleLayout(unitId: string, skeleton: DocumentSkeleton, options: IDocLayoutScheduleOptions, refreshMainSelection?: boolean, preserveInactiveViewportAnchor?: boolean): void;
|
|
85
|
+
private _waitForConfiguredFonts;
|
|
86
|
+
private _scheduleInitialInteractionWindow;
|
|
87
|
+
private _prepareReservedLayoutExtent;
|
|
88
|
+
private _scheduleMainInteractionWindow;
|
|
89
|
+
private _refreshSelectionAfterForegroundLayout;
|
|
90
|
+
private _resolveContinuousForegroundEndOffset;
|
|
91
|
+
private _createLayoutCallbacks;
|
|
92
|
+
private _handleLayoutProgress;
|
|
93
|
+
private _applyLayoutPublication;
|
|
94
|
+
private _completeLayoutPresentation;
|
|
95
|
+
private _scheduleWorkerLayout;
|
|
96
|
+
private _handleWorkerLayoutFailure;
|
|
97
|
+
private _accumulateWorkerEditBatch;
|
|
98
|
+
private _initInteractionLayoutProtection;
|
|
99
|
+
private _queueWorkerHandoff;
|
|
100
|
+
private _startWorkerHandoffTimer;
|
|
101
|
+
private _deferWorkerHandoff;
|
|
102
|
+
private _cancelWorkerHandoff;
|
|
103
|
+
private _resolveProtectedRange;
|
|
104
|
+
private _resolveMaterializedPageRange;
|
|
105
|
+
private _queueMaterializedPageRange;
|
|
106
|
+
private _materializePendingPageRanges;
|
|
107
|
+
private _captureViewportAnchor;
|
|
108
|
+
private _restoreRecoveryViewportAnchor;
|
|
109
|
+
private _restoreViewportAnchor;
|
|
110
|
+
private _addNewRender;
|
|
111
|
+
private _initViewportInteraction;
|
|
112
|
+
protected _shouldEnableHorizontalScrollBar(): boolean;
|
|
113
|
+
protected _getHorizontalPageMargin(): number;
|
|
114
|
+
private _addComponent;
|
|
115
|
+
private _initRenderRefresh;
|
|
116
|
+
private _create;
|
|
117
|
+
private _initCommandListener;
|
|
118
|
+
private _scheduleChangesetRender;
|
|
119
|
+
private _initThemeListener;
|
|
120
|
+
private _markDocumentRenderDirty;
|
|
121
|
+
private _refreshPagePositionAndSelection;
|
|
122
|
+
private _getFocusedSelectionInfo;
|
|
123
|
+
private _getActiveEditingRange;
|
|
124
|
+
private _getActiveRange;
|
|
125
|
+
private _captureCompletionViewportAnchor;
|
|
126
|
+
private _refreshPagePosition;
|
|
127
|
+
private _recalculateSizeBySkeleton;
|
|
128
|
+
private _measureDocumentExtent;
|
|
129
|
+
private _reserveDocumentExtent;
|
|
130
|
+
private _syncCanvasBackground;
|
|
131
|
+
private _getEditorBackgroundConfig;
|
|
132
|
+
private _isEditorRenderUnit;
|
|
133
|
+
}
|
|
@@ -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 { DocumentDataModel } from '@cool-office/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable, IUniverInstanceService } from '@cool-office/core';
|
|
19
|
+
import { DocSelectionManagerService } from '@cool-office/docs';
|
|
20
|
+
import { FormatPainterSessionService } from '@cool-office/ui';
|
|
21
|
+
export declare class DocFormatPainterRenderController extends Disposable implements IRenderModule {
|
|
22
|
+
constructor(context: IRenderContext<DocumentDataModel>, session: FormatPainterSessionService, selections: DocSelectionManagerService, instances: IUniverInstanceService);
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 } from '@cool-office/engine-render';
|
|
18
|
+
import type { MobileDocSelectionRenderService } from '../../../services/mobile/doc-selection-render.service';
|
|
19
|
+
import { DocSelectionManagerService, DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import { DocPageLayoutService } from '../../../services/doc-page-layout.service';
|
|
21
|
+
import { IEditorService } from '../../../services/editor/editor-manager.service';
|
|
22
|
+
import { DocBackScrollRenderController } from '../back-scroll.render-controller';
|
|
23
|
+
export declare class MobileDocBackScrollRenderController extends DocBackScrollRenderController {
|
|
24
|
+
private readonly _docSelectionRenderService;
|
|
25
|
+
private readonly _docPageLayoutService;
|
|
26
|
+
private _mobileKeyboardInset;
|
|
27
|
+
constructor(context: IRenderContext<DocumentDataModel>, textSelectionManagerService: DocSelectionManagerService, _docSelectionRenderService: MobileDocSelectionRenderService, editorService: IEditorService, docSkeletonManagerService: DocSkeletonManagerService, _docPageLayoutService: DocPageLayoutService);
|
|
28
|
+
dispose(): void;
|
|
29
|
+
protected _getVerticalScrollDelta(top: number, height: number, boundTop: number, boundBottom: number, _delta: number): number;
|
|
30
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { ICommandService, IContextService } from '@cool-office/core';
|
|
17
|
+
import type { DocSelectionManagerService } from '@cool-office/docs';
|
|
18
|
+
import type { Engine, Scene, Viewport } from '@cool-office/engine-render';
|
|
19
|
+
import type { DocViewScaleService } from '../../../services/doc-view-scale';
|
|
20
|
+
import { Disposable } from '@cool-office/core';
|
|
21
|
+
export declare function resolveMobileDocPinchZoomRatio(initialZoomRatio: number, initialDistance: number, currentDistance: number): number;
|
|
22
|
+
interface IMobileDocPinchZoomGestureOptions {
|
|
23
|
+
canvasElement: HTMLCanvasElement;
|
|
24
|
+
commandService: ICommandService;
|
|
25
|
+
contextService: IContextService;
|
|
26
|
+
docViewScaleService: DocViewScaleService;
|
|
27
|
+
engine: Engine;
|
|
28
|
+
scene: Scene;
|
|
29
|
+
textSelectionManagerService: DocSelectionManagerService;
|
|
30
|
+
unitId: string;
|
|
31
|
+
viewport: Viewport;
|
|
32
|
+
}
|
|
33
|
+
export declare class MobileDocPinchZoomGesture extends Disposable {
|
|
34
|
+
private readonly _options;
|
|
35
|
+
private readonly _zoomIndicator;
|
|
36
|
+
private _gestureOwned;
|
|
37
|
+
private _pinchZooming;
|
|
38
|
+
private _initialDistance;
|
|
39
|
+
private _initialZoomRatio;
|
|
40
|
+
private _anchor;
|
|
41
|
+
constructor(_options: IMobileDocPinchZoomGestureOptions);
|
|
42
|
+
private readonly _handleTouchStart;
|
|
43
|
+
private readonly _handleTouchMove;
|
|
44
|
+
private readonly _handleTouchEnd;
|
|
45
|
+
private readonly _handleTouchCancel;
|
|
46
|
+
private _getTouchPoint;
|
|
47
|
+
private _getPinchCenter;
|
|
48
|
+
private _getTouchDistance;
|
|
49
|
+
private _finishPinch;
|
|
50
|
+
}
|
|
51
|
+
export {};
|