@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,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentBody, IDocumentStyle, IParagraph } from '@cool-office/core';
|
|
17
|
+
import { SpacingRule } from '@cool-office/core';
|
|
18
|
+
export declare function resolveParagraphsForSettingPanel(paragraphs: IParagraph[], body: IDocumentBody, documentStyle: IDocumentStyle): {
|
|
19
|
+
paragraphStyle: import("@cool-office/core").IParagraphStyle;
|
|
20
|
+
startIndex: number;
|
|
21
|
+
paragraphId: string;
|
|
22
|
+
headingCollapsed?: boolean;
|
|
23
|
+
styleId?: string;
|
|
24
|
+
bullet?: import("@cool-office/core").IBullet;
|
|
25
|
+
sourceBullet?: import("@cool-office/core").IBullet | null;
|
|
26
|
+
directBullet?: import("@cool-office/core").IBullet | null;
|
|
27
|
+
}[];
|
|
28
|
+
export declare const useCurrentParagraph: () => import("@cool-office/core").IParagraphRange[] | {
|
|
29
|
+
paragraphStyle: import("@cool-office/core").IParagraphStyle;
|
|
30
|
+
startIndex: number;
|
|
31
|
+
paragraphId: string;
|
|
32
|
+
headingCollapsed?: boolean;
|
|
33
|
+
styleId?: string;
|
|
34
|
+
bullet?: import("@cool-office/core").IBullet;
|
|
35
|
+
sourceBullet?: import("@cool-office/core").IBullet | null;
|
|
36
|
+
directBullet?: import("@cool-office/core").IBullet | null;
|
|
37
|
+
}[];
|
|
38
|
+
export declare const useFirstParagraphHorizontalAlign: (paragraph: IParagraph[], defaultValue: string) => readonly [string, (v: string) => Promise<boolean>];
|
|
39
|
+
export declare const useFirstParagraphIndentStart: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|
|
40
|
+
export declare const useFirstParagraphIndentEnd: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|
|
41
|
+
export declare const useFirstParagraphIndentFirstLine: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|
|
42
|
+
export declare const useFirstParagraphIndentHanging: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|
|
43
|
+
export declare const useFirstParagraphIndentSpaceAbove: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|
|
44
|
+
export declare const useFirstParagraphSpaceBelow: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|
|
45
|
+
export declare const useFirstParagraphLineSpacing: (paragraph: IParagraph[]) => {
|
|
46
|
+
lineSpacing: readonly [number, (v: number) => Promise<void>];
|
|
47
|
+
spacingRule: readonly [SpacingRule, (v: SpacingRule) => Promise<void>];
|
|
48
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IParagraphSettingProps } from './Setting';
|
|
17
|
+
export declare function ParagraphSettingIndex(props: IParagraphSettingProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { IDocumentSkeletonLine } from '@cool-office/engine-render';
|
|
17
|
+
import type { LocaleKey } from '../../locale/types';
|
|
18
|
+
import { SpacingRule } from '@cool-office/core';
|
|
19
|
+
interface ILineSpacingMetrics {
|
|
20
|
+
glyphLineHeight: number;
|
|
21
|
+
renderedLineHeight: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const LINE_SPACING_RULE_OPTIONS: Array<{
|
|
24
|
+
label: LocaleKey;
|
|
25
|
+
value: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function getLineSpacingInputConfig(spacingRule: SpacingRule): {
|
|
28
|
+
readonly min: 1;
|
|
29
|
+
readonly max: 5;
|
|
30
|
+
readonly step: 0.1;
|
|
31
|
+
} | {
|
|
32
|
+
readonly min: 1;
|
|
33
|
+
readonly max: 100;
|
|
34
|
+
};
|
|
35
|
+
export declare function convertStoredLineSpacingToDisplayValue(lineSpacing: number, spacingRule: SpacingRule): number;
|
|
36
|
+
export declare function convertDisplayLineSpacingToStoredValue(lineSpacing: number, spacingRule: SpacingRule): number;
|
|
37
|
+
export declare function getLineSpacingMetrics(lineNode?: IDocumentSkeletonLine): ILineSpacingMetrics | null;
|
|
38
|
+
export declare function convertLineSpacingForRuleChange(currentStoredValue: number, currentRule: SpacingRule, nextRule: SpacingRule, metrics?: ILineSpacingMetrics | null): number;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { UnitObject } from '@cool-office/protocol';
|
|
17
|
+
interface IDocObjectPermissionEntryProps {
|
|
18
|
+
unitId?: string;
|
|
19
|
+
id?: string;
|
|
20
|
+
objectType: UnitObject.DocumentParagraph | UnitObject.DocumentSection;
|
|
21
|
+
segmentId?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function DocObjectPermissionEntry({ unitId, id, objectType, segmentId }: IDocObjectPermissionEntryProps): import("react").JSX.Element | null;
|
|
24
|
+
export {};
|
|
@@ -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 { ICommandService, IContextService, IUniverInstanceService } from '@cool-office/core';
|
|
17
|
+
import type { IKeyboardEventConfig } from './use-keyboard-event';
|
|
18
|
+
export interface IExecuteEditorUndoRedoCommandOptions {
|
|
19
|
+
commandId: string;
|
|
20
|
+
commandService: ICommandService;
|
|
21
|
+
editorUnitId: string;
|
|
22
|
+
univerInstanceService: IUniverInstanceService;
|
|
23
|
+
contextService?: IContextService;
|
|
24
|
+
preserveHostFocus?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ICreateEditorUndoRedoKeyboardConfigOptions {
|
|
27
|
+
commandService: ICommandService;
|
|
28
|
+
univerInstanceService: IUniverInstanceService;
|
|
29
|
+
editorUnitId: string;
|
|
30
|
+
contextService?: IContextService;
|
|
31
|
+
preserveHostFocus?: boolean;
|
|
32
|
+
keyCodes?: IKeyboardEventConfig['keyCodes'];
|
|
33
|
+
handler?: IKeyboardEventConfig['handler'];
|
|
34
|
+
}
|
|
35
|
+
export declare function executeEditorUndoRedoCommand(options: IExecuteEditorUndoRedoCommandOptions): void;
|
|
36
|
+
export declare function createEditorUndoRedoKeyboardConfig(options: ICreateEditorUndoRedoKeyboardConfigOptions): IKeyboardEventConfig;
|
|
@@ -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
|
+
export { createEditorUndoRedoKeyboardConfig, executeEditorUndoRedoCommand, type ICreateEditorUndoRedoKeyboardConfigOptions, type IExecuteEditorUndoRedoCommandOptions } from './editor-undo-redo-keyboard';
|
|
17
|
+
export { useEditor } from './use-editor';
|
|
18
|
+
export { useEditorClickOutside } from './use-editor-click-outside';
|
|
19
|
+
export { useIsFocusing } from './use-is-focusing';
|
|
20
|
+
export { type IKeyboardEventConfig, useKeyboardEvent } from './use-keyboard-event';
|
|
21
|
+
export { useLeftAndRightArrow } from './use-left-and-right-arrow';
|
|
22
|
+
export { useOnChange } from './use-on-change';
|
|
23
|
+
export { useResize } from './use-resize';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { RefObject } from 'react';
|
|
17
|
+
export declare const useEditorClickOutside: (editorId: string, containerRef: RefObject<HTMLElement | null>, onClickOutside?: () => void) => void;
|
|
@@ -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 { IDocumentData, Nullable } from '@cool-office/core';
|
|
17
|
+
import type { RefObject } from 'react';
|
|
18
|
+
import type { Editor, IEditorCanvasStyle } from '../../../services/editor/editor';
|
|
19
|
+
import type { IEditorRuntimeConfig } from '../../../services/editor/editor-runtime-config';
|
|
20
|
+
export interface IUseEditorProps {
|
|
21
|
+
/** Instance-only layout and interaction settings, never persisted in the document. */
|
|
22
|
+
renderConfig?: IEditorRuntimeConfig;
|
|
23
|
+
editorId: string;
|
|
24
|
+
initialValue: Nullable<IDocumentData | string>;
|
|
25
|
+
container: RefObject<HTMLDivElement>;
|
|
26
|
+
preserveHostFocus?: boolean;
|
|
27
|
+
autoFocus?: boolean;
|
|
28
|
+
isSingle?: boolean;
|
|
29
|
+
canvasStyle?: IEditorCanvasStyle;
|
|
30
|
+
cancelDefaultResizeListener?: boolean;
|
|
31
|
+
disableBackScroll?: boolean;
|
|
32
|
+
documentLayoutSize?: Readonly<Pick<DOMRectReadOnly, 'width' | 'height'>>;
|
|
33
|
+
pixelRatio?: number;
|
|
34
|
+
emitSelectionWhileDragging?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function useEditor(opts: IUseEditorProps): Editor | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useIsFocusing(editorId: string): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { KeyCode, MetaKeys, NativeTextEditorShortcutBehavior } from '@cool-office/ui';
|
|
17
|
+
import type { Editor } from '../../../services/editor/editor';
|
|
18
|
+
export interface IKeyboardEventConfig {
|
|
19
|
+
keyCodes: {
|
|
20
|
+
keyCode: KeyCode;
|
|
21
|
+
metaKey?: MetaKeys;
|
|
22
|
+
nativeTextEditorBehavior?: NativeTextEditorShortcutBehavior;
|
|
23
|
+
}[];
|
|
24
|
+
handler: (keyCode: KeyCode, metaKey?: MetaKeys) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function useKeyboardEvent(isNeed: boolean, config?: IKeyboardEventConfig, editor?: Editor): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { Editor } from '../../../services/editor/editor';
|
|
17
|
+
import { KeyCode, MetaKeys } from '@cool-office/ui';
|
|
18
|
+
export declare const useLeftAndRightArrow: (isNeed: boolean, selectingMode: boolean, editor?: Editor, onMoveInEditor?: (keyCode: KeyCode, metaKey?: MetaKeys) => void) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { IDocumentData } from '@cool-office/core';
|
|
17
|
+
import type { Editor } from '../../../services/editor/editor';
|
|
18
|
+
export declare function useOnChange(editor: Editor | undefined, onChange: (data: IDocumentData, str: string) => void): void;
|
|
@@ -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 { Editor } from '../../../services/editor/editor';
|
|
17
|
+
interface IUseResizeReturn {
|
|
18
|
+
resize: () => void;
|
|
19
|
+
checkScrollBar: () => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function resizeEditor(editor: Editor, isSingle: boolean, layoutSize?: Readonly<Pick<DOMRectReadOnly, 'width' | 'height'>>, pixelRatio?: number, documentLayoutSize?: Readonly<Pick<DOMRectReadOnly, 'width' | 'height'>>): void;
|
|
22
|
+
export declare const useResize: (editor?: Editor, isSingle?: boolean, autoScrollbar?: boolean, autoScroll?: boolean, layoutSize?: Readonly<Pick<DOMRectReadOnly, "width" | "height">>, pixelRatio?: number, documentLayoutSize?: Readonly<Pick<DOMRectReadOnly, "width" | "height">>) => IUseResizeReturn;
|
|
23
|
+
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 { ComponentType, ReactNode } from 'react';
|
|
17
|
+
import { InputNumber, Select } from '@cool-office/design';
|
|
18
|
+
export interface ISectionSettingProps {
|
|
19
|
+
RowComponent?: ComponentType<{
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
unit?: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}>;
|
|
24
|
+
InputNumberComponent?: typeof InputNumber;
|
|
25
|
+
SelectComponent?: typeof Select;
|
|
26
|
+
}
|
|
27
|
+
export declare function SectionSetting({ RowComponent, InputNumberComponent, SelectComponent }: ISectionSettingProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DOC_SECTION_SETTING_COMPONENT = "doc_ui_section-setting-panel";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { ISectionSettingProps } from './Setting';
|
|
17
|
+
export declare function SectionSettingIndex(props: ISectionSettingProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
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, IDocumentStyle, ISectionBreak, ITextRangeParam } from '@cool-office/core';
|
|
17
|
+
import type { IDocumentSectionUpdate } from '@cool-office/docs';
|
|
18
|
+
import { ColumnSeparatorType, PageOrientType, SectionType } from '@cool-office/core';
|
|
19
|
+
export interface ISectionSettingValues {
|
|
20
|
+
columnCount: number | undefined;
|
|
21
|
+
columnGap: number | undefined;
|
|
22
|
+
separatorType: ColumnSeparatorType | undefined;
|
|
23
|
+
sectionType: SectionType | undefined;
|
|
24
|
+
pageWidth: number | undefined;
|
|
25
|
+
pageHeight: number | undefined;
|
|
26
|
+
pageOrient: PageOrientType | undefined;
|
|
27
|
+
marginTop: number | undefined;
|
|
28
|
+
marginBottom: number | undefined;
|
|
29
|
+
marginLeft: number | undefined;
|
|
30
|
+
marginRight: number | undefined;
|
|
31
|
+
pageNumberStart: number | undefined;
|
|
32
|
+
}
|
|
33
|
+
export declare function getSectionSettingValues(sections: ISectionBreak[], documentStyle: IDocumentStyle): ISectionSettingValues;
|
|
34
|
+
export declare function createSectionColumnUpdates(sections: ISectionBreak[], documentStyle: IDocumentStyle, change: {
|
|
35
|
+
columnCount: number;
|
|
36
|
+
} | {
|
|
37
|
+
columnGap: number;
|
|
38
|
+
}): IDocumentSectionUpdate[];
|
|
39
|
+
export declare function createSectionOrientationUpdates(sections: ISectionBreak[], documentStyle: IDocumentStyle, pageOrient: PageOrientType): IDocumentSectionUpdate[];
|
|
40
|
+
export declare function getSelectedSections(documentDataModel: DocumentDataModel, ranges: Readonly<ITextRangeParam[]>): ISectionBreak[];
|
|
41
|
+
export declare function useSectionSetting(): {
|
|
42
|
+
selectSection(sectionId: string): void;
|
|
43
|
+
setColumnCount(value: number): Promise<boolean>;
|
|
44
|
+
setColumnGap(value: number): Promise<boolean>;
|
|
45
|
+
setSeparatorType(value: ColumnSeparatorType): Promise<boolean>;
|
|
46
|
+
setSectionType(value: SectionType): Promise<boolean>;
|
|
47
|
+
setPageWidth(value: number): Promise<boolean>;
|
|
48
|
+
setPageHeight(value: number): Promise<boolean>;
|
|
49
|
+
setPageOrient(value: PageOrientType): Promise<boolean>;
|
|
50
|
+
setMarginTop(value: number): Promise<boolean>;
|
|
51
|
+
setMarginBottom(value: number): Promise<boolean>;
|
|
52
|
+
setMarginLeft(value: number): Promise<boolean>;
|
|
53
|
+
setMarginRight(value: number): Promise<boolean>;
|
|
54
|
+
setPageNumberStart(value: number): Promise<boolean>;
|
|
55
|
+
columnCount: number | undefined;
|
|
56
|
+
columnGap: number | undefined;
|
|
57
|
+
separatorType: ColumnSeparatorType | undefined;
|
|
58
|
+
sectionType: SectionType | undefined;
|
|
59
|
+
pageWidth: number | undefined;
|
|
60
|
+
pageHeight: number | undefined;
|
|
61
|
+
pageOrient: PageOrientType | undefined;
|
|
62
|
+
marginTop: number | undefined;
|
|
63
|
+
marginBottom: number | undefined;
|
|
64
|
+
marginLeft: number | undefined;
|
|
65
|
+
marginRight: number | undefined;
|
|
66
|
+
pageNumberStart: number | undefined;
|
|
67
|
+
unitId: string | undefined;
|
|
68
|
+
valid: boolean;
|
|
69
|
+
selectedCount: number;
|
|
70
|
+
sectionOptions: {
|
|
71
|
+
label: string;
|
|
72
|
+
value: string;
|
|
73
|
+
}[];
|
|
74
|
+
selectedSectionId: string | undefined;
|
|
75
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { Meta } from '@storybook/react';
|
|
17
|
+
import { SideMenu } from '../SideMenu';
|
|
18
|
+
declare const meta: Meta<typeof SideMenu>;
|
|
19
|
+
export default meta;
|
|
20
|
+
export declare const SideMenuBasic: {
|
|
21
|
+
render(): import("react").JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
export declare const EmptySideMenu: {
|
|
24
|
+
render(): import("react").JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
export declare const CustomStyledSideMenu: {
|
|
27
|
+
render(): import("react").JSX.Element;
|
|
28
|
+
};
|
|
29
|
+
export declare const MultiLevelSideMenu: {
|
|
30
|
+
render(): import("react").JSX.Element;
|
|
31
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
interface IDocCreateTableConfirmProps {
|
|
17
|
+
handleRowColChange: (rowCount: number, colCount: number) => void;
|
|
18
|
+
tableCreateParams: {
|
|
19
|
+
rowCount: number;
|
|
20
|
+
colCount: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const DocCreateTableConfirm: ({ handleRowColChange, tableCreateParams, }: IDocCreateTableConfirmProps) => import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare const COMPONENT_DOC_CREATE_TABLE_CONFIRM = "COMPONENT_DOC_CREATE_TABLE_CONFIRM";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(require("@cool-office/core"),require("@cool-office/docs"),require("@cool-office/docs-ui"),require("@cool-office/docs/facade"),require("@cool-office/engine-render")):typeof define==`function`&&define.amd?define([`@cool-office/core`,`@cool-office/docs`,`@cool-office/docs-ui`,`@cool-office/docs/facade`,`@cool-office/engine-render`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.CoolOfficeCore,e.CoolOfficeDocs,e.CoolOfficeDocsUi,e.CoolOfficeDocsFacade,e.CoolOfficeEngineRender))})(this,function(e,t,n,r,i){var a=class extends r.FDocument{setSelection(r,a){var o,s,c;let l=this._injector.get(i.IRenderManagerService).getRenderUnitById(this.getId());if(l==null)return;let u=l.with(n.DocSelectionRenderService),d=l.with(t.DocSkeletonManagerService).getSkeleton(),f=d.findBodyPageIndexByCharIndex(r),p=(o=d.getSkeletonData())==null?void 0:o.pages[f],m=((s=this.getDocumentDataModel().getBody())==null?void 0:s.dataStream.length)??0,h=f<0&&r>=0&&r<m,g=u.getSegment(),_=(c=l.getInjector)==null?void 0:c.call(l),v=_!=null&&_.has(n.DocBackScrollRenderController)?l.with(n.DocBackScrollRenderController):null,y={startOffset:r,endOffset:a,collapsed:r===a},b=()=>{u.removeAllRanges(),u.addDocRanges([{startOffset:r,endOffset:a,rangeType:e.DOC_RANGE_TYPE.TEXT}],!0)};if(g===``&&v!=null&&(h||p!=null&&p.isMaterializationPlaceholder||!v.isViewportReady())){var x;let e=(x=this.getDocumentDataModel().getBody())==null?void 0:x.dataStream;v.scrollToRange(y,()=>{var t;u.getSegment()===g&&((t=this.getDocumentDataModel().getBody())==null?void 0:t.dataStream)===e&&b()}),u.removeAllRanges(),u.addDocRanges([],!0,{shouldFocus:!1}),u.blur()}else b(),g===``&&v!=null&&v.scrollToRange(y)}};r.FDocument.extend(a)});
|