@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,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 { Nullable } from '@cool-office/core';
|
|
17
|
+
import type { IDocStateChangeInfo, IDocStateChangeInterceptorService } from '@cool-office/docs';
|
|
18
|
+
import { IRenderManagerService } from '@cool-office/engine-render';
|
|
19
|
+
export declare class DocIMEStateChangeInterceptorService implements IDocStateChangeInterceptorService {
|
|
20
|
+
private readonly _renderManagerService;
|
|
21
|
+
constructor(_renderManagerService: IRenderManagerService);
|
|
22
|
+
transformChangeStateInfo(changeStateInfo: IDocStateChangeInfo): Nullable<IDocStateChangeInfo>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { DocLayoutExecutorService, IDocLayoutPageResult, IDocLayoutStartOptions, IDocLayoutStepResult } from '@cool-office/docs';
|
|
17
|
+
import type { DocumentLayoutReason, DocumentSkeleton, IDocumentLayoutProgress, IDocumentLayoutProtectedRange } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable } from '@cool-office/core';
|
|
19
|
+
export interface IDocLayoutCoordinatorCallbacks {
|
|
20
|
+
onProgress: (progress: IDocumentLayoutProgress, publication?: IDocLayoutStepResult['publication']) => void;
|
|
21
|
+
onComplete?: (progress: IDocumentLayoutProgress) => void;
|
|
22
|
+
onForegroundReady?: (progress: IDocumentLayoutProgress) => void;
|
|
23
|
+
}
|
|
24
|
+
export type DocumentLayoutSchedulingSkeleton = Pick<DocumentSkeleton, 'startIncrementalLayout' | 'stepIncrementalLayout' | 'cancelIncrementalLayout'> & Partial<Pick<DocumentSkeleton, 'publishIncrementalLayoutBacklog'>>;
|
|
25
|
+
type DocumentLayoutSchedulingOptions = NonNullable<Parameters<DocumentSkeleton['startIncrementalLayout']>[0]> & {
|
|
26
|
+
deferForeground?: boolean;
|
|
27
|
+
reason: DocumentLayoutReason;
|
|
28
|
+
foregroundWindowSize?: number;
|
|
29
|
+
foregroundBudgetMs?: number;
|
|
30
|
+
foregroundEndOffset?: number;
|
|
31
|
+
};
|
|
32
|
+
type DocLayoutSchedulingExecutor = Pick<DocLayoutExecutorService, 'startLayout' | 'stepLayout' | 'publishBacklog' | 'getLayoutPage' | 'cancelLayout' | 'disposeLayoutMount'>;
|
|
33
|
+
type ExternalLayoutPresentation = Pick<DocumentSkeleton, 'beginExternalLayout' | 'cancelExternalLayout'>;
|
|
34
|
+
export type DocLayoutVisualFrameScheduler = (callback: () => void) => () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Cooperative presentation scheduler for interactive document layout.
|
|
37
|
+
*
|
|
38
|
+
* The coordinator owns only timing and cancellation. The selected executor owns
|
|
39
|
+
* layout state; both executors publish the same generation/step contract.
|
|
40
|
+
*/
|
|
41
|
+
export declare class DocLayoutCoordinatorService extends Disposable {
|
|
42
|
+
private readonly _scheduleVisualFrame;
|
|
43
|
+
private readonly _mountId;
|
|
44
|
+
private _mountEpoch;
|
|
45
|
+
private _viewportEpoch;
|
|
46
|
+
private _workerMount;
|
|
47
|
+
private _scheduledLayout;
|
|
48
|
+
private _animationFrameId;
|
|
49
|
+
private _idleCallbackId;
|
|
50
|
+
private _fallbackTimerId;
|
|
51
|
+
private _pendingWorkerPresentation;
|
|
52
|
+
private _workerPresentationPaused;
|
|
53
|
+
constructor(_scheduleVisualFrame?: DocLayoutVisualFrameScheduler);
|
|
54
|
+
schedule(skeleton: DocumentLayoutSchedulingSkeleton, options: DocumentLayoutSchedulingOptions, callbacks: IDocLayoutCoordinatorCallbacks): number;
|
|
55
|
+
scheduleWorker(unitId: string, skeleton: ExternalLayoutPresentation, executorService: DocLayoutSchedulingExecutor, options: IDocLayoutStartOptions, protectedRange: IDocumentLayoutProtectedRange | undefined, callbacks: IDocLayoutCoordinatorCallbacks, onError: (error: unknown) => void, preserveCompletedLayout?: boolean): void;
|
|
56
|
+
getWorkerPage(pageIndex: number): Promise<IDocLayoutPageResult | null>;
|
|
57
|
+
deferBackgroundWork(): void;
|
|
58
|
+
setWorkerPresentationPaused(paused: boolean): void;
|
|
59
|
+
hasScheduledLayout(): boolean;
|
|
60
|
+
cancel(): void;
|
|
61
|
+
dispose(): void;
|
|
62
|
+
private _scheduleForeground;
|
|
63
|
+
private _scheduleBackground;
|
|
64
|
+
private _runSlice;
|
|
65
|
+
private _runMainThreadSlice;
|
|
66
|
+
private _publishMainThreadBacklog;
|
|
67
|
+
private _finishForegroundWindow;
|
|
68
|
+
private _completeForegroundWindow;
|
|
69
|
+
private _runWorkerSlice;
|
|
70
|
+
private _startWorkerLayout;
|
|
71
|
+
private _publishWorkerBacklog;
|
|
72
|
+
private _assertWorkerResultRevisions;
|
|
73
|
+
private _publishWorkerResult;
|
|
74
|
+
private _getWorkerIdentity;
|
|
75
|
+
private _getWorkerGeneration;
|
|
76
|
+
private _assertWorkerResultIdentity;
|
|
77
|
+
private _cancelCallbacks;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
@@ -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 type { IDisposable } from '@cool-office/core';
|
|
17
|
+
import { Disposable } from '@cool-office/core';
|
|
18
|
+
/**
|
|
19
|
+
* Coordinates render-scoped interactions that require the current document
|
|
20
|
+
* skeleton to stay stable until the interaction ends.
|
|
21
|
+
*/
|
|
22
|
+
export declare class DocLayoutInteractionService extends Disposable {
|
|
23
|
+
private readonly _active$;
|
|
24
|
+
private _interactionCount;
|
|
25
|
+
readonly active$: import("rxjs").Observable<boolean>;
|
|
26
|
+
get isActive(): boolean;
|
|
27
|
+
beginInteraction(): IDisposable;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
@@ -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 { Observable } from 'rxjs';
|
|
17
|
+
import { IUniverInstanceService, RxDisposable } from '@cool-office/core';
|
|
18
|
+
export interface IDocLayoutProgressState {
|
|
19
|
+
progress: number;
|
|
20
|
+
unitId: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class DocLayoutProgressService extends RxDisposable {
|
|
23
|
+
private readonly _univerInstanceService;
|
|
24
|
+
private readonly _progressByUnit$;
|
|
25
|
+
readonly currentProgress$: Observable<IDocLayoutProgressState | null>;
|
|
26
|
+
constructor(_univerInstanceService: IUniverInstanceService);
|
|
27
|
+
setProgress(unitId: string, progress: number): void;
|
|
28
|
+
clearProgress(unitId: string): void;
|
|
29
|
+
dispose(): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { ICommand, ITextStyle, Nullable } from '@cool-office/core';
|
|
17
|
+
import { Disposable, IUniverInstanceService, ThemeService } from '@cool-office/core';
|
|
18
|
+
import { DocSelectionManagerService } from '@cool-office/docs';
|
|
19
|
+
import { IRenderManagerService } from '@cool-office/engine-render';
|
|
20
|
+
export declare class DocMenuStyleService extends Disposable {
|
|
21
|
+
private readonly _textSelectionManagerService;
|
|
22
|
+
private readonly _univerInstanceService;
|
|
23
|
+
private readonly _renderManagerService;
|
|
24
|
+
private readonly _themeService;
|
|
25
|
+
private _cacheStyle;
|
|
26
|
+
constructor(_textSelectionManagerService: DocSelectionManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
|
|
27
|
+
private _init;
|
|
28
|
+
private _listenDocRangeChange;
|
|
29
|
+
getStyleCache(): Nullable<ITextStyle>;
|
|
30
|
+
getDefaultStyle(): ITextStyle;
|
|
31
|
+
setStyleCache(style: ITextStyle): void;
|
|
32
|
+
private _clearStyleCache;
|
|
33
|
+
}
|
|
34
|
+
export interface ISetDocInputStyleCommandParams {
|
|
35
|
+
style: ITextStyle;
|
|
36
|
+
}
|
|
37
|
+
export declare const SetDocInputStyleCommand: ICommand<ISetDocInputStyleCommandParams>;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { IBoundRectNoAngle, IMouseEvent, IPointerEvent } from '@cool-office/engine-render';
|
|
17
|
+
import type { IMobileDocElementMenuProps } from '../views/mobile-element-menu/MobileDocElementMenu';
|
|
18
|
+
import { Disposable, IUniverInstanceService } from '@cool-office/core';
|
|
19
|
+
import { DocCanvasPopManagerService } from './doc-popup-manager.service';
|
|
20
|
+
export interface IDocMobileElementTarget extends IMobileDocElementMenuProps {
|
|
21
|
+
unitId: string;
|
|
22
|
+
rect: IBoundRectNoAngle;
|
|
23
|
+
onTap?: (offset: {
|
|
24
|
+
offsetX: number;
|
|
25
|
+
offsetY: number;
|
|
26
|
+
}) => void;
|
|
27
|
+
onDrag?: (event: IPointerEvent | IMouseEvent) => void;
|
|
28
|
+
}
|
|
29
|
+
/** Element hit testing stays in its plugin; the document owns tap-versus-scroll recognition. */
|
|
30
|
+
export declare class DocMobileElementMenuService extends Disposable {
|
|
31
|
+
private readonly _popupService;
|
|
32
|
+
private _pending;
|
|
33
|
+
private _editingBounds;
|
|
34
|
+
private _popup;
|
|
35
|
+
private _unitId;
|
|
36
|
+
constructor(_popupService: DocCanvasPopManagerService, instanceService: IUniverInstanceService);
|
|
37
|
+
capture(target: IDocMobileElementTarget): boolean;
|
|
38
|
+
takeTarget(unitId: string): IDocMobileElementTarget | null;
|
|
39
|
+
setEditingBounds(unitId: string, rect: IBoundRectNoAngle): void;
|
|
40
|
+
getEditingBounds(unitId: string): IBoundRectNoAngle | null;
|
|
41
|
+
show(target: IDocMobileElementTarget): void;
|
|
42
|
+
close(): void;
|
|
43
|
+
dispose(): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 } from '@cool-office/core';
|
|
19
|
+
import { DocViewScaleService } from './doc-view-scale';
|
|
20
|
+
export declare class DocPageLayoutService extends Disposable implements IRenderModule {
|
|
21
|
+
private _context;
|
|
22
|
+
private readonly _docViewScaleService;
|
|
23
|
+
private _bottomReserve;
|
|
24
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docViewScaleService: DocViewScaleService);
|
|
25
|
+
setBottomReserve(height: number): void;
|
|
26
|
+
resolveSceneHeight(contentHeight: number): number;
|
|
27
|
+
calculatePagePosition(): this | undefined;
|
|
28
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
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, ICustomBlock, ICustomTable, IDocumentBlockRange } from '@cool-office/core';
|
|
17
|
+
import type { IBoundRectNoAngle, IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable, DocumentBlockType, IContextService, IPermissionService } from '@cool-office/core';
|
|
19
|
+
import { DocSelectionManagerService, DocSkeletonManagerService } from '@cool-office/docs';
|
|
20
|
+
import type { IMutiPageParagraphBound, ITableBound } from './doc-event-manager.service';
|
|
21
|
+
import { DocEventManagerService } from './doc-event-manager.service';
|
|
22
|
+
import { DocLayoutInteractionService } from './doc-layout-interaction.service';
|
|
23
|
+
import { DocCanvasPopManagerService } from './doc-popup-manager.service';
|
|
24
|
+
import { DocFloatMenuService } from './float-menu.service';
|
|
25
|
+
import { DocSelectionRenderService } from './selection/doc-selection-render.service';
|
|
26
|
+
export interface IDocBlockMenuTarget {
|
|
27
|
+
kind: Exclude<DocumentBlockType, DocumentBlockType.COLUMN_GROUP>;
|
|
28
|
+
key: string;
|
|
29
|
+
paragraph?: IMutiPageParagraphBound;
|
|
30
|
+
blockRange?: IDocumentBlockRange;
|
|
31
|
+
table?: ICustomTable;
|
|
32
|
+
customBlock?: ICustomBlock;
|
|
33
|
+
icon?: string;
|
|
34
|
+
cellRange?: {
|
|
35
|
+
startOffset: number;
|
|
36
|
+
endOffset: number;
|
|
37
|
+
};
|
|
38
|
+
menuRange: {
|
|
39
|
+
startOffset: number;
|
|
40
|
+
endOffset: number;
|
|
41
|
+
collapsed: boolean;
|
|
42
|
+
};
|
|
43
|
+
moveRange: {
|
|
44
|
+
startOffset: number;
|
|
45
|
+
endOffset: number;
|
|
46
|
+
};
|
|
47
|
+
emptyMode: boolean;
|
|
48
|
+
draggable: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface IDocBlockDropTarget {
|
|
51
|
+
targetOffset: number;
|
|
52
|
+
rect: {
|
|
53
|
+
left: number;
|
|
54
|
+
right: number;
|
|
55
|
+
top: number;
|
|
56
|
+
bottom: number;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface IDocSlashMenuRequest {
|
|
60
|
+
anchorRect: IBoundRectNoAngle;
|
|
61
|
+
nonce: number;
|
|
62
|
+
target: IDocBlockMenuTarget;
|
|
63
|
+
}
|
|
64
|
+
export declare class DocParagraphMenuService extends Disposable implements IRenderModule {
|
|
65
|
+
private _context;
|
|
66
|
+
private _docSelectionManagerService;
|
|
67
|
+
private _docEventManagerService;
|
|
68
|
+
private _docPopupManagerService;
|
|
69
|
+
private _docSkeletonManagerService;
|
|
70
|
+
private _floatMenuService;
|
|
71
|
+
private _docSelectionRenderService;
|
|
72
|
+
private readonly _permissionService;
|
|
73
|
+
private _docLayoutInteractionService;
|
|
74
|
+
private readonly _contextService;
|
|
75
|
+
private _paragraphMenu;
|
|
76
|
+
private _paragraphMenuHideTimer;
|
|
77
|
+
private readonly _activeTarget$;
|
|
78
|
+
readonly activeTarget$: import("rxjs").Observable<IDocBlockMenuTarget | null>;
|
|
79
|
+
private _focusedTableMenu;
|
|
80
|
+
private readonly _focusedTableTarget$;
|
|
81
|
+
readonly focusedTableTarget$: import("rxjs").Observable<IDocBlockMenuTarget | null>;
|
|
82
|
+
private readonly _focusedTableMenuDismiss$;
|
|
83
|
+
readonly focusedTableMenuDismiss$: import("rxjs").Observable<void>;
|
|
84
|
+
private readonly _slashMenuRequest$;
|
|
85
|
+
readonly slashMenuRequest$: import("rxjs").Observable<IDocSlashMenuRequest | null>;
|
|
86
|
+
private _isBlockMenuDragging;
|
|
87
|
+
private _isSlashMenuActive;
|
|
88
|
+
private _slashMenuRequestNonce;
|
|
89
|
+
private _menuInteraction;
|
|
90
|
+
private _dragInteraction;
|
|
91
|
+
get activeParagraph(): IMutiPageParagraphBound | undefined;
|
|
92
|
+
get activeTarget(): IDocBlockMenuTarget | null;
|
|
93
|
+
get focusedTableTarget(): IDocBlockMenuTarget | null;
|
|
94
|
+
setBlockMenuDragging(isDragging: boolean): void;
|
|
95
|
+
get isBlockMenuDragging(): boolean;
|
|
96
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docEventManagerService: DocEventManagerService, _docPopupManagerService: DocCanvasPopManagerService, _docSkeletonManagerService: DocSkeletonManagerService, _floatMenuService: DocFloatMenuService, _docSelectionRenderService: DocSelectionRenderService, _permissionService: IPermissionService, _docLayoutInteractionService: DocLayoutInteractionService, _contextService: IContextService);
|
|
97
|
+
private _getExpandedSelectionState;
|
|
98
|
+
private _hasExpandedSelectionRanges;
|
|
99
|
+
private _hasExpandedTextSelection;
|
|
100
|
+
private _hasExpandedSelection;
|
|
101
|
+
setParagraphMenuActive(active: boolean, focusedTable?: boolean): void;
|
|
102
|
+
private _init;
|
|
103
|
+
private _handleSlashMenuKeydown;
|
|
104
|
+
private _handleSlashMenuInputBefore;
|
|
105
|
+
private _openSlashMenu;
|
|
106
|
+
private _shouldOpenSlashMenu;
|
|
107
|
+
private _shouldOpenSlashMenuFromInput;
|
|
108
|
+
private _getCollapsedTextRange;
|
|
109
|
+
private _getSlashMenuParagraph;
|
|
110
|
+
private _getSlashMenuAnchorRect;
|
|
111
|
+
showParagraphMenu(paragraph: IMutiPageParagraphBound): void;
|
|
112
|
+
showTableMenu(tableBound: ITableBound, focused?: boolean): void;
|
|
113
|
+
private _showHoverMenu;
|
|
114
|
+
private _showFocusedTableMenu;
|
|
115
|
+
private _shouldKeepCurrentCellMenuForTable;
|
|
116
|
+
getDropTargetFromClientPoint(clientX: number, clientY: number, sourceRange: {
|
|
117
|
+
startOffset: number;
|
|
118
|
+
endOffset: number;
|
|
119
|
+
}): IDocBlockDropTarget | null;
|
|
120
|
+
private _cancelParagraphMenuHide;
|
|
121
|
+
private _scheduleParagraphMenuHide;
|
|
122
|
+
hideParagraphMenu(force?: boolean): void;
|
|
123
|
+
hideFocusedTableMenu(): void;
|
|
124
|
+
private _canEditDocument;
|
|
125
|
+
dispose(): void;
|
|
126
|
+
private _buildParagraphMenuTarget;
|
|
127
|
+
private _getBodyBlockTargets;
|
|
128
|
+
private _getCellBlockTargets;
|
|
129
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { INeedCheckDisposable, ITextRangeParam } from '@cool-office/core';
|
|
17
|
+
import type { BaseObject, IBoundRectNoAngle, IRender, Scene } from '@cool-office/engine-render';
|
|
18
|
+
import type { IPopup } from '@cool-office/ui';
|
|
19
|
+
import type { Observable } from 'rxjs';
|
|
20
|
+
import { Disposable, ICommandService, IUniverInstanceService } from '@cool-office/core';
|
|
21
|
+
import { IRenderManagerService } from '@cool-office/engine-render';
|
|
22
|
+
import { ICanvasPopupService } from '@cool-office/ui';
|
|
23
|
+
export declare function transformBound2OffsetBound(originBound: IBoundRectNoAngle, scene: Scene): IBoundRectNoAngle;
|
|
24
|
+
export declare function transformPosition2Offset(x: number, y: number, scene: Scene): {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function transformOffset2Bound(offsetX: number, offsetY: number, scene: Scene): {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
};
|
|
32
|
+
export interface IDocCanvasPopup extends Omit<IPopup, 'anchorRect$' | 'children' | 'unitId' | 'subUnitId' | 'canvasElement'> {
|
|
33
|
+
/** Notify when a business-owned rect changes independently of scene transforms. */
|
|
34
|
+
positionChanges$?: Observable<unknown>;
|
|
35
|
+
/** Defaults to true. Passive hover affordances can track layout without holding it. */
|
|
36
|
+
requiresStableLayout?: boolean;
|
|
37
|
+
mask?: boolean;
|
|
38
|
+
extraProps?: Record<string, unknown>;
|
|
39
|
+
multipleDirection?: IPopup['direction'];
|
|
40
|
+
/** Anchor at the focus end while retaining the entire selection for outside-click exclusion. */
|
|
41
|
+
rangeAnchor?: 'selection-end';
|
|
42
|
+
}
|
|
43
|
+
export declare const calcDocRangePositions: (range: ITextRangeParam, currentRender: IRender) => IBoundRectNoAngle[] | undefined;
|
|
44
|
+
export declare class DocCanvasPopManagerService extends Disposable {
|
|
45
|
+
private readonly _globalPopupManagerService;
|
|
46
|
+
private readonly _renderManagerService;
|
|
47
|
+
private readonly _univerInstanceService;
|
|
48
|
+
private readonly _commandService;
|
|
49
|
+
private readonly _popupCountByUnit;
|
|
50
|
+
private readonly _popupUnits$;
|
|
51
|
+
readonly popupUnits$: Observable<ReadonlySet<string>>;
|
|
52
|
+
constructor(_globalPopupManagerService: ICanvasPopupService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _commandService: ICommandService);
|
|
53
|
+
dispose(): void;
|
|
54
|
+
private _beginPopupActivity;
|
|
55
|
+
private _publishPopupUnits;
|
|
56
|
+
getRangeBounds(range: ITextRangeParam, unitId: string): IBoundRectNoAngle[] | undefined;
|
|
57
|
+
private _shouldUpdateForCommand;
|
|
58
|
+
private _createRectPositionObserver;
|
|
59
|
+
private _createObjectPositionObserver;
|
|
60
|
+
private _createRangePositionObserver;
|
|
61
|
+
attachPopupToRect(rect: IBoundRectNoAngle | (() => IBoundRectNoAngle), popup: IDocCanvasPopup, unitId: string): INeedCheckDisposable;
|
|
62
|
+
/**
|
|
63
|
+
* attach a popup to canvas object
|
|
64
|
+
* @param targetObject target canvas object
|
|
65
|
+
* @param popup popup item
|
|
66
|
+
* @returns disposable
|
|
67
|
+
*/
|
|
68
|
+
attachPopupToObject(targetObject: BaseObject, popup: IDocCanvasPopup, unitId: string): INeedCheckDisposable;
|
|
69
|
+
/**
|
|
70
|
+
* attach a popup to doc range
|
|
71
|
+
* @param range doc range
|
|
72
|
+
* @param popup popup item
|
|
73
|
+
* @param unitId unit id
|
|
74
|
+
* @returns disposable
|
|
75
|
+
*/
|
|
76
|
+
attachPopupToRange(range: ITextRangeParam, popup: IDocCanvasPopup, unitId: string): INeedCheckDisposable;
|
|
77
|
+
private _resolveEmbeddedPopupInjector;
|
|
78
|
+
private _resolvePopupManagerService;
|
|
79
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { DisposableCollection } from '@cool-office/core';
|
|
17
|
+
import type { Documents, DocumentSkeleton, Engine, IBoundRectNoAngle, Scene } from '@cool-office/engine-render';
|
|
18
|
+
import { Disposable, InterceptorManager } from '@cool-office/core';
|
|
19
|
+
export interface IDocPrintContext {
|
|
20
|
+
unitId: string;
|
|
21
|
+
pageIndex?: number;
|
|
22
|
+
scene: Scene;
|
|
23
|
+
engine: Engine;
|
|
24
|
+
root: HTMLElement;
|
|
25
|
+
skeleton: DocumentSkeleton;
|
|
26
|
+
}
|
|
27
|
+
export interface IDocPrintDomtContext extends IDocPrintContext {
|
|
28
|
+
offset: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
};
|
|
32
|
+
bound: IBoundRectNoAngle;
|
|
33
|
+
}
|
|
34
|
+
export interface IDocPrintComponentContext extends IDocPrintContext {
|
|
35
|
+
documents: Documents;
|
|
36
|
+
}
|
|
37
|
+
export interface IDocPrintPreparationContext {
|
|
38
|
+
unitId: string;
|
|
39
|
+
dpr: number;
|
|
40
|
+
}
|
|
41
|
+
export declare class DocPrintInterceptorService extends Disposable {
|
|
42
|
+
private _printComponentMap;
|
|
43
|
+
private readonly _printPreparationHandlers;
|
|
44
|
+
readonly interceptor: InterceptorManager<{
|
|
45
|
+
PRINTING_COMPONENT_COLLECT: import("@cool-office/core").IInterceptor<undefined, IDocPrintComponentContext>;
|
|
46
|
+
PRINTING_DOM_COLLECT: import("@cool-office/core").IInterceptor<DisposableCollection, IDocPrintDomtContext>;
|
|
47
|
+
}>;
|
|
48
|
+
constructor();
|
|
49
|
+
registerPrintComponent(componentKey: string, printingComponentKey: string): void;
|
|
50
|
+
getPrintComponent(componentKey: string): string | undefined;
|
|
51
|
+
getPageDrawingIds(skeleton: DocumentSkeleton, pageIndex?: number): ReadonlySet<string> | null;
|
|
52
|
+
registerPrintPreparation(handler: (context: IDocPrintPreparationContext) => Promise<void>): () => boolean;
|
|
53
|
+
preparePrint(context: IDocPrintPreparationContext): Promise<void>;
|
|
54
|
+
dispose(): void;
|
|
55
|
+
}
|
|
@@ -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 type { ICanvasColorService } from '@cool-office/engine-render';
|
|
17
|
+
import { DocumentFlavor } from '@cool-office/core';
|
|
18
|
+
export interface IResolveDocRenderBackgroundOptions {
|
|
19
|
+
documentFlavor?: DocumentFlavor;
|
|
20
|
+
canvasColorService?: ICanvasColorService;
|
|
21
|
+
editorBackgroundColor?: string;
|
|
22
|
+
isEditor?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface IResolvedDocRenderBackground {
|
|
25
|
+
canvasElementBackgroundColor: string;
|
|
26
|
+
docBackgroundFillColor?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function resolveDocRenderBackground(options: IResolveDocRenderBackgroundOptions): IResolvedDocRenderBackground;
|
|
29
|
+
export declare function getDefaultDocCanvasBackgroundColor(documentFlavor?: DocumentFlavor, isEditor?: boolean): "transparent" | "var(--univer-gray-100)" | "var(--univer-gray-0)";
|
|
@@ -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 } from '@cool-office/core';
|
|
17
|
+
import type { IRenderContext, IRenderModule } from '@cool-office/engine-render';
|
|
18
|
+
import type { IDocFitToWidthOptions, IUniverDocsUIConfig } from '../config/config';
|
|
19
|
+
import { Disposable, DocumentFlavor, IConfigService } from '@cool-office/core';
|
|
20
|
+
export interface ICalcDocFitToWidthScaleParams {
|
|
21
|
+
availableWidth: number;
|
|
22
|
+
baseWidth: number;
|
|
23
|
+
options?: IDocFitToWidthOptions;
|
|
24
|
+
}
|
|
25
|
+
export interface IResolveDocFitBaseWidthParams {
|
|
26
|
+
documentFlavor?: DocumentFlavor;
|
|
27
|
+
documentStylePageWidth?: number;
|
|
28
|
+
skeletonPageWidth?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function normalizeDocFitToWidthOptions(options?: IDocFitToWidthOptions): {
|
|
31
|
+
mode: import("..").DocFitMode;
|
|
32
|
+
target: import("..").DocFitTarget;
|
|
33
|
+
paddingX: import("../config/config").DocFitPaddingX;
|
|
34
|
+
minScale: number;
|
|
35
|
+
maxScale?: number;
|
|
36
|
+
align: import("..").DocFitAlign;
|
|
37
|
+
};
|
|
38
|
+
export declare function resolveDocFitPaddingX(availableWidth: number, paddingX: IDocFitToWidthOptions['paddingX']): number;
|
|
39
|
+
export declare function calcDocFitToWidthScale(params: ICalcDocFitToWidthScaleParams): number;
|
|
40
|
+
export declare function resolveDocFitBaseWidth(params: IResolveDocFitBaseWidthParams): number;
|
|
41
|
+
export declare function resolveDocViewScale(userZoomRatio: number, fitToWidthScale: number): number;
|
|
42
|
+
export declare class DocViewScaleService extends Disposable implements IRenderModule {
|
|
43
|
+
protected readonly _context: IRenderContext<DocumentDataModel>;
|
|
44
|
+
private readonly _configService;
|
|
45
|
+
constructor(_context: IRenderContext<DocumentDataModel>, _configService: IConfigService);
|
|
46
|
+
getPluginConfig(): Partial<IUniverDocsUIConfig>;
|
|
47
|
+
getOptions(): IDocFitToWidthOptions;
|
|
48
|
+
getBaseWidth(): number;
|
|
49
|
+
getAvailableWidth(): number;
|
|
50
|
+
getUserZoomRatio(): number;
|
|
51
|
+
getFitToWidthScale(): number;
|
|
52
|
+
getViewScale(userZoomRatio?: number): number;
|
|
53
|
+
private _resolveContainer;
|
|
54
|
+
}
|
|
@@ -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, ICommandService, IUniverInstanceService } from '@cool-office/core';
|
|
17
|
+
import { Observable } from 'rxjs';
|
|
18
|
+
export declare const DEFAULT_MODERN_DOC_ZOOM_RATIO = 1;
|
|
19
|
+
export declare const DOC_ZOOM_SHORTCUTS: number[];
|
|
20
|
+
type DocZoomSource = Pick<DocumentDataModel, 'getSettings' | 'getSnapshot'>;
|
|
21
|
+
export declare function getDocEffectiveZoomRatio(documentModel: DocZoomSource): number;
|
|
22
|
+
export declare function getDocZoomRatio$(commandService: ICommandService, instanceService: IUniverInstanceService): Observable<number>;
|
|
23
|
+
export {};
|