@a3s-lab/office 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +470 -0
- package/THIRD_PARTY_NOTICES.md +33 -0
- package/dist/0~1403.js +245 -0
- package/dist/0~152.js +94 -0
- package/dist/0~3539.js +1856 -0
- package/dist/0~3557.js +179 -0
- package/dist/0~3635.js +302 -0
- package/dist/0~4595.js +1162 -0
- package/dist/0~5050.js +308 -0
- package/dist/0~6552.js +787 -0
- package/dist/0~7048.js +2110 -0
- package/dist/0~7614.js +1037 -0
- package/dist/0~8155.js +299 -0
- package/dist/0~9445.js +283 -0
- package/dist/0~9512.js +743 -0
- package/dist/0~document-editor.js +10967 -0
- package/dist/0~markdown-editor.js +2260 -0
- package/dist/0~pdf-viewer.js +2156 -0
- package/dist/0~presentation-editor.js +8359 -0
- package/dist/0~rslib-runtime.js +27 -0
- package/dist/0~spreadsheet-editor.js +10388 -0
- package/dist/0~use-office-draft.js +46 -0
- package/dist/0~work-document-extensions.js +2470 -0
- package/dist/0~work-document-links.js +14 -0
- package/dist/0~work-document-model-codec.js +42 -0
- package/dist/0~work-document-page-color.js +11 -0
- package/dist/0~work-document-paragraph-formatting.js +425 -0
- package/dist/0~work-docx-bibliography.js +347 -0
- package/dist/0~work-docx-export.js +1151 -0
- package/dist/0~work-docx-import.js +3116 -0
- package/dist/0~work-docx-page-color.js +42 -0
- package/dist/0~work-office-diagnostics.js +1377 -0
- package/dist/0~work-pptx-export.js +1009 -0
- package/dist/0~work-pptx-import.js +1138 -0
- package/dist/0~work-presentation-charts.js +442 -0
- package/dist/0~work-presentation-transition.js +38 -0
- package/dist/0~work-presentation-visual-scale.js +38 -0
- package/dist/0~work-spreadsheet-formula-support.js +9 -0
- package/dist/1134.js +445 -0
- package/dist/4104.js +5786 -0
- package/dist/432.js +211 -0
- package/dist/4704.js +1364 -0
- package/dist/6489.js +182 -0
- package/dist/8715.js +3959 -0
- package/dist/8728.js +723 -0
- package/dist/9356.js +10 -0
- package/dist/core.d.ts +15 -0
- package/dist/core.js +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/internal/design-system/primitives/button/button.d.ts +9 -0
- package/dist/internal/design-system/primitives/button/icon-button.d.ts +7 -0
- package/dist/internal/design-system/primitives/dialog/dialog.d.ts +12 -0
- package/dist/internal/design-system/primitives/feedback/collection-state.d.ts +9 -0
- package/dist/internal/design-system/primitives/feedback/inline-notice.d.ts +10 -0
- package/dist/internal/design-system/primitives/feedback/state-view.d.ts +13 -0
- package/dist/internal/design-system/primitives/form/field.d.ts +19 -0
- package/dist/internal/design-system/primitives/index.d.ts +14 -0
- package/dist/internal/design-system/primitives/layout/split-handle.d.ts +17 -0
- package/dist/internal/design-system/primitives/navigation/segmented-control.d.ts +19 -0
- package/dist/internal/design-system/primitives/navigation/tab-navigation.d.ts +13 -0
- package/dist/internal/design-system/primitives/navigation/tabs.d.ts +21 -0
- package/dist/internal/design-system/primitives/overlay/dialog-focus-scope.d.ts +17 -0
- package/dist/internal/design-system/primitives/overlay/popover.d.ts +34 -0
- package/dist/internal/design-system/primitives/overlay/portal-root.d.ts +1 -0
- package/dist/internal/design-system/primitives/status/status-badge.d.ts +6 -0
- package/dist/internal/features/work/components/work-document-pages.d.ts +4 -0
- package/dist/internal/features/work/components/work-editor-agent-menus.d.ts +12 -0
- package/dist/internal/features/work/components/work-editor-loading-state.d.ts +3 -0
- package/dist/internal/features/work/editors/document-changes-panel.d.ts +9 -0
- package/dist/internal/features/work/editors/document-citation-source-form.d.ts +33 -0
- package/dist/internal/features/work/editors/document-citations-panel.d.ts +8 -0
- package/dist/internal/features/work/editors/document-columns-panel.d.ts +5 -0
- package/dist/internal/features/work/editors/document-comment-composer.d.ts +13 -0
- package/dist/internal/features/work/editors/document-comments-panel.d.ts +17 -0
- package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -0
- package/dist/internal/features/work/editors/document-editor-pagination.d.ts +3 -0
- package/dist/internal/features/work/editors/document-editor-support.d.ts +34 -0
- package/dist/internal/features/work/editors/document-editor.d.ts +20 -0
- package/dist/internal/features/work/editors/document-find-highlight.d.ts +8 -0
- package/dist/internal/features/work/editors/document-find-replace-panel.d.ts +10 -0
- package/dist/internal/features/work/editors/document-formatting-options.d.ts +113 -0
- package/dist/internal/features/work/editors/document-home-ribbon.d.ts +9 -0
- package/dist/internal/features/work/editors/document-layout-panel.d.ts +10 -0
- package/dist/internal/features/work/editors/document-list-gallery.d.ts +4 -0
- package/dist/internal/features/work/editors/document-navigation-panel.d.ts +9 -0
- package/dist/internal/features/work/editors/document-page-chrome-editor.d.ts +39 -0
- package/dist/internal/features/work/editors/document-page-chrome-panel.d.ts +5 -0
- package/dist/internal/features/work/editors/document-page-chrome-ribbon.d.ts +10 -0
- package/dist/internal/features/work/editors/document-page-navigation.d.ts +14 -0
- package/dist/internal/features/work/editors/document-page-stack.d.ts +8 -0
- package/dist/internal/features/work/editors/document-pagination-popover.d.ts +4 -0
- package/dist/internal/features/work/editors/document-paragraph-spacing-popover.d.ts +4 -0
- package/dist/internal/features/work/editors/document-picture-ribbon.d.ts +4 -0
- package/dist/internal/features/work/editors/document-ruler-tab-stops.d.ts +12 -0
- package/dist/internal/features/work/editors/document-ruler.d.ts +15 -0
- package/dist/internal/features/work/editors/document-selection-context-menu.d.ts +22 -0
- package/dist/internal/features/work/editors/document-selection-toolbar.d.ts +8 -0
- package/dist/internal/features/work/editors/document-status-bar.d.ts +19 -0
- package/dist/internal/features/work/editors/document-style-gallery.d.ts +4 -0
- package/dist/internal/features/work/editors/document-table-insert-popover.d.ts +4 -0
- package/dist/internal/features/work/editors/document-table-ribbon.d.ts +7 -0
- package/dist/internal/features/work/editors/document-task-pane.d.ts +11 -0
- package/dist/internal/features/work/editors/document-toolbar.d.ts +100 -0
- package/dist/internal/features/work/editors/document-vertical-ruler.d.ts +6 -0
- package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +2 -0
- package/dist/internal/features/work/editors/markdown-editor.d.ts +16 -0
- package/dist/internal/features/work/editors/markdown-insert-dialog.d.ts +19 -0
- package/dist/internal/features/work/editors/markdown-selection-context-menu.d.ts +14 -0
- package/dist/internal/features/work/editors/markdown-source-commands.d.ts +41 -0
- package/dist/internal/features/work/editors/markdown-status.d.ts +7 -0
- package/dist/internal/features/work/editors/markdown-toolbar.d.ts +22 -0
- package/dist/internal/features/work/editors/markdown-workspace.d.ts +26 -0
- package/dist/internal/features/work/editors/office-checkbox.d.ts +9 -0
- package/dist/internal/features/work/editors/office-color-picker.d.ts +11 -0
- package/dist/internal/features/work/editors/office-controls.d.ts +7 -0
- package/dist/internal/features/work/editors/office-dialog.d.ts +35 -0
- package/dist/internal/features/work/editors/office-editor-extension.d.ts +86 -0
- package/dist/internal/features/work/editors/office-file-data.d.ts +1 -0
- package/dist/internal/features/work/editors/office-font-families.d.ts +187 -0
- package/dist/internal/features/work/editors/office-menu-keyboard.d.ts +2 -0
- package/dist/internal/features/work/editors/office-number-field.d.ts +21 -0
- package/dist/internal/features/work/editors/office-number-normalization.d.ts +9 -0
- package/dist/internal/features/work/editors/office-select.d.ts +19 -0
- package/dist/internal/features/work/editors/office-shortcuts.d.ts +1 -0
- package/dist/internal/features/work/editors/office-slider.d.ts +10 -0
- package/dist/internal/features/work/editors/office-table-dimensions.d.ts +4 -0
- package/dist/internal/features/work/editors/office-table-insert-popover.d.ts +7 -0
- package/dist/internal/features/work/editors/office-task-pane.d.ts +7 -0
- package/dist/internal/features/work/editors/office-text-field.d.ts +20 -0
- package/dist/internal/features/work/editors/office-tiptap-extensions.d.ts +2 -0
- package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +23 -0
- package/dist/internal/features/work/editors/pdf-editor-extensions.d.ts +36 -0
- package/dist/internal/features/work/editors/pdf-thumbnail-rail.d.ts +26 -0
- package/dist/internal/features/work/editors/pdf-toolbar.d.ts +23 -0
- package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +48 -0
- package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -0
- package/dist/internal/features/work/editors/presentation-arrangement-controller.d.ts +19 -0
- package/dist/internal/features/work/editors/presentation-chart-analysis-canvas.d.ts +21 -0
- package/dist/internal/features/work/editors/presentation-chart-axis-canvas.d.ts +33 -0
- package/dist/internal/features/work/editors/presentation-chart-axis-editor.d.ts +5 -0
- package/dist/internal/features/work/editors/presentation-chart-canvas.d.ts +5 -0
- package/dist/internal/features/work/editors/presentation-chart-cartesian-canvas.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-chart-data-label-editor.d.ts +6 -0
- package/dist/internal/features/work/editors/presentation-chart-data-labels.d.ts +26 -0
- package/dist/internal/features/work/editors/presentation-chart-layout-editor.d.ts +5 -0
- package/dist/internal/features/work/editors/presentation-chart-legend-canvas.d.ts +15 -0
- package/dist/internal/features/work/editors/presentation-chart-panel.d.ts +7 -0
- package/dist/internal/features/work/editors/presentation-chart-series-analysis-editor.d.ts +6 -0
- package/dist/internal/features/work/editors/presentation-chart-series-canvas.d.ts +15 -0
- package/dist/internal/features/work/editors/presentation-command-controller.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-command-types.d.ts +206 -0
- package/dist/internal/features/work/editors/presentation-comments-panel.d.ts +9 -0
- package/dist/internal/features/work/editors/presentation-context-menu.d.ts +11 -0
- package/dist/internal/features/work/editors/presentation-design-panel.d.ts +13 -0
- package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +12 -0
- package/dist/internal/features/work/editors/presentation-editor-operations.d.ts +10 -0
- package/dist/internal/features/work/editors/presentation-editor-types.d.ts +22 -0
- package/dist/internal/features/work/editors/presentation-editor.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-keyboard-extension.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-player.d.ts +7 -0
- package/dist/internal/features/work/editors/presentation-presenter-view.d.ts +15 -0
- package/dist/internal/features/work/editors/presentation-selection.d.ts +21 -0
- package/dist/internal/features/work/editors/presentation-slide-canvas.d.ts +26 -0
- package/dist/internal/features/work/editors/presentation-slide-thumbnail.d.ts +18 -0
- package/dist/internal/features/work/editors/presentation-status-bar.d.ts +10 -0
- package/dist/internal/features/work/editors/presentation-text-editor.d.ts +22 -0
- package/dist/internal/features/work/editors/presentation-text-formatting.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-thumbnail-rail.d.ts +20 -0
- package/dist/internal/features/work/editors/presentation-toolbar.d.ts +19 -0
- package/dist/internal/features/work/editors/presentation-transition-panel.d.ts +9 -0
- package/dist/internal/features/work/editors/presentation-workspace.d.ts +38 -0
- package/dist/internal/features/work/editors/spreadsheet-calculation-model.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-calculation-projection.d.ts +32 -0
- package/dist/internal/features/work/editors/spreadsheet-chart-axis-editor.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-chart-draft.d.ts +17 -0
- package/dist/internal/features/work/editors/spreadsheet-chart-layout-editor.d.ts +13 -0
- package/dist/internal/features/work/editors/spreadsheet-chart-panel.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-chart-series-style-editor.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +121 -0
- package/dist/internal/features/work/editors/spreadsheet-conditional-comparison-fields.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-conditional-format-model.d.ts +72 -0
- package/dist/internal/features/work/editors/spreadsheet-conditional-format-panel.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-conditional-threshold-fields.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +36 -0
- package/dist/internal/features/work/editors/spreadsheet-data-label-editor.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +46 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-support.d.ts +31 -0
- package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +16 -0
- package/dist/internal/features/work/editors/spreadsheet-error-bar-editor.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-find-bar.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-find.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-formula-panel.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-header-footer-fields.d.ts +5 -0
- package/dist/internal/features/work/editors/spreadsheet-keyboard-navigation.d.ts +18 -0
- package/dist/internal/features/work/editors/spreadsheet-number-format.d.ts +11 -0
- package/dist/internal/features/work/editors/spreadsheet-pivot-panel.d.ts +10 -0
- package/dist/internal/features/work/editors/spreadsheet-print-settings-panel.d.ts +6 -0
- package/dist/internal/features/work/editors/spreadsheet-protection-panel.d.ts +7 -0
- package/dist/internal/features/work/editors/spreadsheet-sheet-bar.d.ts +17 -0
- package/dist/internal/features/work/editors/spreadsheet-sheet-model.d.ts +13 -0
- package/dist/internal/features/work/editors/spreadsheet-trendline-editor.d.ts +8 -0
- package/dist/internal/features/work/editors/spreadsheet-workbook-panel.d.ts +16 -0
- package/dist/internal/features/work/editors/use-document-comments.d.ts +26 -0
- package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +19 -0
- package/dist/internal/features/work/editors/use-document-layout-fonts.d.ts +2 -0
- package/dist/internal/features/work/editors/use-document-page-chrome.d.ts +33 -0
- package/dist/internal/features/work/editors/use-document-pagination.d.ts +46 -0
- package/dist/internal/features/work/editors/use-markdown-source-history.d.ts +16 -0
- package/dist/internal/features/work/editors/use-office-draft.d.ts +10 -0
- package/dist/internal/features/work/editors/use-office-editor-keyboard-shortcuts.d.ts +9 -0
- package/dist/internal/features/work/editors/use-office-editor-runtime.d.ts +6 -0
- package/dist/internal/features/work/editors/use-office-editor-wheel-zoom.d.ts +19 -0
- package/dist/internal/features/work/editors/use-office-history.d.ts +10 -0
- package/dist/internal/features/work/editors/use-presentation-clipboard.d.ts +22 -0
- package/dist/internal/features/work/editors/use-presentation-design-commands.d.ts +33 -0
- package/dist/internal/features/work/editors/use-presentation-element-commands.d.ts +29 -0
- package/dist/internal/features/work/editors/use-presentation-geometry.d.ts +17 -0
- package/dist/internal/features/work/editors/use-presentation-history.d.ts +12 -0
- package/dist/internal/features/work/editors/use-presentation-review-commands.d.ts +22 -0
- package/dist/internal/features/work/editors/use-presentation-selection.d.ts +11 -0
- package/dist/internal/features/work/editors/use-presentation-slide-commands.d.ts +18 -0
- package/dist/internal/features/work/editors/use-presentation-thumbnail-visibility.d.ts +4 -0
- package/dist/internal/features/work/editors/use-presentation-thumbnail-window.d.ts +17 -0
- package/dist/internal/features/work/editors/use-presentation-transform.d.ts +53 -0
- package/dist/internal/features/work/editors/use-spreadsheet-calculation.d.ts +17 -0
- package/dist/internal/features/work/editors/use-spreadsheet-workbook-sync.d.ts +10 -0
- package/dist/internal/features/work/editors/work-office-chrome.d.ts +61 -0
- package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +18 -0
- package/dist/internal/features/work/work-agent-proposal-apply.d.ts +8 -0
- package/dist/internal/features/work/work-agent-proposal.d.ts +55 -0
- package/dist/internal/features/work/work-agent-request.d.ts +6 -0
- package/dist/internal/features/work/work-chart-series-analysis-context.d.ts +3 -0
- package/dist/internal/features/work/work-document-caption-nodes.d.ts +13 -0
- package/dist/internal/features/work/work-document-captions.d.ts +14 -0
- package/dist/internal/features/work/work-document-changes.d.ts +35 -0
- package/dist/internal/features/work/work-document-character-formatting.d.ts +13 -0
- package/dist/internal/features/work/work-document-citation-nodes.d.ts +25 -0
- package/dist/internal/features/work/work-document-citations.d.ts +21 -0
- package/dist/internal/features/work/work-document-columns.d.ts +15 -0
- package/dist/internal/features/work/work-document-comments.d.ts +48 -0
- package/dist/internal/features/work/work-document-extensions.d.ts +11 -0
- package/dist/internal/features/work/work-document-field-node.d.ts +12 -0
- package/dist/internal/features/work/work-document-fields.d.ts +15 -0
- package/dist/internal/features/work/work-document-file-io.d.ts +4 -0
- package/dist/internal/features/work/work-document-fonts.d.ts +16 -0
- package/dist/internal/features/work/work-document-image-layout.d.ts +29 -0
- package/dist/internal/features/work/work-document-incremental-layout.d.ts +17 -0
- package/dist/internal/features/work/work-document-layout.d.ts +5 -0
- package/dist/internal/features/work/work-document-line-measurement.d.ts +24 -0
- package/dist/internal/features/work/work-document-links.d.ts +2 -0
- package/dist/internal/features/work/work-document-lists.d.ts +25 -0
- package/dist/internal/features/work/work-document-model-codec.d.ts +3 -0
- package/dist/internal/features/work/work-document-model.d.ts +12 -0
- package/dist/internal/features/work/work-document-note-nodes.d.ts +11 -0
- package/dist/internal/features/work/work-document-notes.d.ts +18 -0
- package/dist/internal/features/work/work-document-outline.d.ts +14 -0
- package/dist/internal/features/work/work-document-page-break.d.ts +2 -0
- package/dist/internal/features/work/work-document-page-chrome-commands.d.ts +15 -0
- package/dist/internal/features/work/work-document-page-chrome.d.ts +19 -0
- package/dist/internal/features/work/work-document-page-color.d.ts +3 -0
- package/dist/internal/features/work/work-document-pages.d.ts +19 -0
- package/dist/internal/features/work/work-document-pagination-decorations.d.ts +3 -0
- package/dist/internal/features/work/work-document-pagination-dom.d.ts +35 -0
- package/dist/internal/features/work/work-document-pagination-measurement.d.ts +9 -0
- package/dist/internal/features/work/work-document-pagination-types.d.ts +88 -0
- package/dist/internal/features/work/work-document-pagination.d.ts +17 -0
- package/dist/internal/features/work/work-document-paragraph-formatting.d.ts +61 -0
- package/dist/internal/features/work/work-document-search.d.ts +11 -0
- package/dist/internal/features/work/work-document-section-editor.d.ts +20 -0
- package/dist/internal/features/work/work-document-section-node.d.ts +13 -0
- package/dist/internal/features/work/work-document-section.d.ts +34 -0
- package/dist/internal/features/work/work-document-selection-menu.d.ts +54 -0
- package/dist/internal/features/work/work-document-tab-node.d.ts +6 -0
- package/dist/internal/features/work/work-document-tab-stops.d.ts +29 -0
- package/dist/internal/features/work/work-document-table-cell-formatting.d.ts +46 -0
- package/dist/internal/features/work/work-document-table-commands.d.ts +17 -0
- package/dist/internal/features/work/work-document-table-pagination.d.ts +5 -0
- package/dist/internal/features/work/work-document-table-row.d.ts +37 -0
- package/dist/internal/features/work/work-document-table-sizing.d.ts +27 -0
- package/dist/internal/features/work/work-document-text-layout.d.ts +14 -0
- package/dist/internal/features/work/work-docx-bibliography.d.ts +12 -0
- package/dist/internal/features/work/work-docx-caption-diagnostics.d.ts +6 -0
- package/dist/internal/features/work/work-docx-caption-export.d.ts +4 -0
- package/dist/internal/features/work/work-docx-caption-fields.d.ts +5 -0
- package/dist/internal/features/work/work-docx-caption-import.d.ts +20 -0
- package/dist/internal/features/work/work-docx-change-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-citation-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-citation-export.d.ts +3 -0
- package/dist/internal/features/work/work-docx-citation-import.d.ts +23 -0
- package/dist/internal/features/work/work-docx-column-export.d.ts +14 -0
- package/dist/internal/features/work/work-docx-column-import.d.ts +2 -0
- package/dist/internal/features/work/work-docx-comment-import.d.ts +14 -0
- package/dist/internal/features/work/work-docx-export-formatting.d.ts +30 -0
- package/dist/internal/features/work/work-docx-export-image.d.ts +2 -0
- package/dist/internal/features/work/work-docx-export.d.ts +2 -0
- package/dist/internal/features/work/work-docx-field-export.d.ts +2 -0
- package/dist/internal/features/work/work-docx-field-import.d.ts +16 -0
- package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
- package/dist/internal/features/work/work-docx-image-layout-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-import.d.ts +50 -0
- package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-note-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-chrome-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-chrome-import.d.ts +11 -0
- package/dist/internal/features/work/work-docx-page-color.d.ts +2 -0
- package/dist/internal/features/work/work-docx-paragraph-alignment-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-paragraph-direction-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-paragraph-indent-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-paragraph-spacing-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-paragraph-styles.d.ts +18 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +19 -0
- package/dist/internal/features/work/work-docx-tab-stop-import.d.ts +13 -0
- package/dist/internal/features/work/work-docx-table-cell-export.d.ts +4 -0
- package/dist/internal/features/work/work-docx-table-cell-import.d.ts +16 -0
- package/dist/internal/features/work/work-docx-table-row-import.d.ts +13 -0
- package/dist/internal/features/work/work-docx-table-sizing-export.d.ts +8 -0
- package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-theme.d.ts +9 -0
- package/dist/internal/features/work/work-file-data.d.ts +1 -0
- package/dist/internal/features/work/work-file-download.d.ts +3 -0
- package/dist/internal/features/work/work-file-io.d.ts +8 -0
- package/dist/internal/features/work/work-markdown-extensions.d.ts +19 -0
- package/dist/internal/features/work/work-markdown-file-io.d.ts +3 -0
- package/dist/internal/features/work/work-markdown-selection-menu.d.ts +57 -0
- package/dist/internal/features/work/work-office-diagnostics.d.ts +9 -0
- package/dist/internal/features/work/work-ooxml-package.d.ts +28 -0
- package/dist/internal/features/work/work-pdf-export.d.ts +23 -0
- package/dist/internal/features/work/work-pptx-chart-axes.d.ts +3 -0
- package/dist/internal/features/work/work-pptx-chart-axis-diagnostics.d.ts +5 -0
- package/dist/internal/features/work/work-pptx-chart-data-labels.d.ts +12 -0
- package/dist/internal/features/work/work-pptx-chart-import.d.ts +11 -0
- package/dist/internal/features/work/work-pptx-chart-layout-style.d.ts +15 -0
- package/dist/internal/features/work/work-pptx-chart-series-analysis.d.ts +13 -0
- package/dist/internal/features/work/work-pptx-chart-xy.d.ts +3 -0
- package/dist/internal/features/work/work-pptx-comments.d.ts +17 -0
- package/dist/internal/features/work/work-pptx-export.d.ts +4 -0
- package/dist/internal/features/work/work-pptx-groups.d.ts +19 -0
- package/dist/internal/features/work/work-pptx-import.d.ts +6 -0
- package/dist/internal/features/work/work-pptx-layout-export.d.ts +13 -0
- package/dist/internal/features/work/work-pptx-layout-import.d.ts +30 -0
- package/dist/internal/features/work/work-pptx-style.d.ts +13 -0
- package/dist/internal/features/work/work-pptx-transition.d.ts +13 -0
- package/dist/internal/features/work/work-presentation-agent-context.d.ts +6 -0
- package/dist/internal/features/work/work-presentation-chart-axes.d.ts +14 -0
- package/dist/internal/features/work/work-presentation-charts.d.ts +37 -0
- package/dist/internal/features/work/work-presentation-clipboard.d.ts +26 -0
- package/dist/internal/features/work/work-presentation-file-io.d.ts +15 -0
- package/dist/internal/features/work/work-presentation-groups.d.ts +17 -0
- package/dist/internal/features/work/work-presentation-layouts.d.ts +13 -0
- package/dist/internal/features/work/work-presentation-transition.d.ts +4 -0
- package/dist/internal/features/work/work-presentation-visual-scale.d.ts +2 -0
- package/dist/internal/features/work/work-repository.d.ts +4 -0
- package/dist/internal/features/work/work-spreadsheet-agent-context.d.ts +15 -0
- package/dist/internal/features/work/work-spreadsheet-chart-axis.d.ts +42 -0
- package/dist/internal/features/work/work-spreadsheet-chart-layout.d.ts +29 -0
- package/dist/internal/features/work/work-spreadsheet-chart-legend-svg.d.ts +18 -0
- package/dist/internal/features/work/work-spreadsheet-chart-series-layout.d.ts +24 -0
- package/dist/internal/features/work/work-spreadsheet-chart-series-style.d.ts +29 -0
- package/dist/internal/features/work/work-spreadsheet-chart-svg-utils.d.ts +7 -0
- package/dist/internal/features/work/work-spreadsheet-chart-svg.d.ts +3 -0
- package/dist/internal/features/work/work-spreadsheet-chart-types.d.ts +147 -0
- package/dist/internal/features/work/work-spreadsheet-chart-validation.d.ts +2 -0
- package/dist/internal/features/work/work-spreadsheet-charts.d.ts +17 -0
- package/dist/internal/features/work/work-spreadsheet-combination-chart-svg.d.ts +9 -0
- package/dist/internal/features/work/work-spreadsheet-comments.d.ts +7 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-canvas.d.ts +5 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-colors.d.ts +9 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-comparisons.d.ts +4 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-data-bar.d.ts +8 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-format.d.ts +10 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-icons.d.ts +107 -0
- package/dist/internal/features/work/work-spreadsheet-conditional-values.d.ts +19 -0
- package/dist/internal/features/work/work-spreadsheet-data-label-svg.d.ts +27 -0
- package/dist/internal/features/work/work-spreadsheet-error-bar-svg.d.ts +5 -0
- package/dist/internal/features/work/work-spreadsheet-error-bars.d.ts +8 -0
- package/dist/internal/features/work/work-spreadsheet-formula-analysis.d.ts +30 -0
- package/dist/internal/features/work/work-spreadsheet-formula-support.d.ts +1 -0
- package/dist/internal/features/work/work-spreadsheet-formulas.d.ts +19 -0
- package/dist/internal/features/work/work-spreadsheet-header-footer.d.ts +14 -0
- package/dist/internal/features/work/work-spreadsheet-line-chart-svg.d.ts +10 -0
- package/dist/internal/features/work/work-spreadsheet-page-breaks.d.ts +4 -0
- package/dist/internal/features/work/work-spreadsheet-page-setup.d.ts +26 -0
- package/dist/internal/features/work/work-spreadsheet-pivot-engine.d.ts +21 -0
- package/dist/internal/features/work/work-spreadsheet-pivot-values.d.ts +7 -0
- package/dist/internal/features/work/work-spreadsheet-pivots.d.ts +27 -0
- package/dist/internal/features/work/work-spreadsheet-protection.d.ts +55 -0
- package/dist/internal/features/work/work-spreadsheet-ranges.d.ts +25 -0
- package/dist/internal/features/work/work-spreadsheet-trendline-svg.d.ts +9 -0
- package/dist/internal/features/work/work-spreadsheet-trendlines.d.ts +11 -0
- package/dist/internal/features/work/work-spreadsheet-xy-chart-axes-svg.d.ts +10 -0
- package/dist/internal/features/work/work-templates.d.ts +4 -0
- package/dist/internal/features/work/work-types.d.ts +513 -0
- package/dist/internal/features/work/work-xlsx-chart-axes.d.ts +4 -0
- package/dist/internal/features/work/work-xlsx-chart-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-xlsx-chart-layout.d.ts +16 -0
- package/dist/internal/features/work/work-xlsx-chart-series-style.d.ts +6 -0
- package/dist/internal/features/work/work-xlsx-chart-values.d.ts +10 -0
- package/dist/internal/features/work/work-xlsx-charts.d.ts +32 -0
- package/dist/internal/features/work/work-xlsx-conditional-format-diagnostics.d.ts +6 -0
- package/dist/internal/features/work/work-xlsx-conditional-format-write.d.ts +11 -0
- package/dist/internal/features/work/work-xlsx-conditional-format.d.ts +29 -0
- package/dist/internal/features/work/work-xlsx-defined-names.d.ts +4 -0
- package/dist/internal/features/work/work-xlsx-drawing-geometry.d.ts +27 -0
- package/dist/internal/features/work/work-xlsx-formula-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-xlsx-formulas.d.ts +40 -0
- package/dist/internal/features/work/work-xlsx-header-footer.d.ts +12 -0
- package/dist/internal/features/work/work-xlsx-images.d.ts +17 -0
- package/dist/internal/features/work/work-xlsx-interop.d.ts +39 -0
- package/dist/internal/features/work/work-xlsx-page-breaks.d.ts +7 -0
- package/dist/internal/features/work/work-xlsx-page-setup-diagnostics.d.ts +2 -0
- package/dist/internal/features/work/work-xlsx-page-setup.d.ts +5 -0
- package/dist/internal/features/work/work-xlsx-pivot-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-xlsx-pivot-xml.d.ts +9 -0
- package/dist/internal/features/work/work-xlsx-pivots.d.ts +32 -0
- package/dist/internal/features/work/work-xlsx-protection.d.ts +24 -0
- package/dist/internal/features/workspace/components/workspace-context-menu.d.ts +29 -0
- package/dist/internal/features/workspace/components/workspace-text-control-selection.d.ts +7 -0
- package/dist/internal/kernel/office-kernel-client-types.d.ts +40 -0
- package/dist/internal/kernel/office-kernel-client.d.ts +4 -0
- package/dist/internal/kernel/office-kernel-fallback.d.ts +2 -0
- package/dist/internal/kernel/office-kernel-presentation-fallback.d.ts +2 -0
- package/dist/internal/kernel/office-kernel-protocol.d.ts +229 -0
- package/dist/internal/kernel/office-kernel-spreadsheet-fallback-formula.d.ts +3 -0
- package/dist/internal/kernel/office-kernel-spreadsheet-fallback-validation.d.ts +5 -0
- package/dist/internal/kernel/office-kernel-spreadsheet-fallback-value.d.ts +6 -0
- package/dist/internal/kernel/office-kernel-spreadsheet-fallback.d.ts +2 -0
- package/dist/internal/kernel/office-kernel-spreadsheet-protocol.d.ts +112 -0
- package/dist/internal/kernel/office-kernel-spreadsheet-session-fallback.d.ts +8 -0
- package/dist/internal/kernel/office-kernel-text-fallback.d.ts +10 -0
- package/dist/internal/kernel/office-kernel-version.d.ts +1 -0
- package/dist/internal/kernel/office-kernel.worker.d.ts +1 -0
- package/dist/internal/keyboard-shortcuts.d.ts +2 -0
- package/dist/internal/state/app-state.d.ts +8 -0
- package/dist/noto-naskh-arabic-regular.ttf +0 -0
- package/dist/noto-naskh-arabic.LICENSE.txt +94 -0
- package/dist/noto-sans-hans-regular.otf +0 -0
- package/dist/noto-sans-hans.LICENSE.txt +94 -0
- package/dist/noto-sans-hebrew-regular.ttf +0 -0
- package/dist/noto-sans-hebrew.LICENSE.txt +94 -0
- package/dist/noto-sans-regular.ttf +0 -0
- package/dist/noto-sans.LICENSE.txt +94 -0
- package/dist/office-kernel.wasm +0 -0
- package/dist/office-kernel.worker.js +14605 -0
- package/dist/office-surface.d.ts +10 -0
- package/dist/pdfium.LICENSE.txt +196 -0
- package/dist/pdfium.wasm +0 -0
- package/dist/pptxgen.LICENSE.txt +21 -0
- package/dist/pptxgen.bundle.js +11244 -0
- package/dist/react.d.ts +51 -0
- package/dist/react.js +1 -0
- package/dist/styles.css +17435 -0
- package/dist/styles.js +0 -0
- package/dist/vue.d.ts +282 -0
- package/dist/vue.js +231 -0
- package/dist/web-component.d.ts +98 -0
- package/dist/web-component.js +335 -0
- package/docs/browser-editor-architecture.md +947 -0
- package/package.json +165 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkSpreadsheetContent } from '../work-types';
|
|
2
|
+
interface SpreadsheetProtectionPanelProps {
|
|
3
|
+
content: WorkSpreadsheetContent;
|
|
4
|
+
onChange: (content: WorkSpreadsheetContent) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function SpreadsheetProtectionPanel({ content, onChange, }: SpreadsheetProtectionPanelProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { WorkSpreadsheetSheet } from '../work-types';
|
|
2
|
+
import { type SpreadsheetSheetMoveDirection } from './spreadsheet-sheet-model';
|
|
3
|
+
export interface SpreadsheetSheetBarProps {
|
|
4
|
+
activeSheetId: string;
|
|
5
|
+
editable: boolean;
|
|
6
|
+
sheets: readonly WorkSpreadsheetSheet[];
|
|
7
|
+
onActivate(sheetId: string): void;
|
|
8
|
+
onCreate(): void;
|
|
9
|
+
onDelete(sheetId: string): void;
|
|
10
|
+
onDuplicate(sheetId: string): void;
|
|
11
|
+
onHide(sheetId: string): void;
|
|
12
|
+
onMove(sheetId: string, direction: SpreadsheetSheetMoveDirection): void;
|
|
13
|
+
onRename(sheetId: string, name: string): void;
|
|
14
|
+
onSetColor(sheetId: string, color: string | null): void;
|
|
15
|
+
onShow(sheetId: string): void;
|
|
16
|
+
}
|
|
17
|
+
export declare function SpreadsheetSheetBar({ activeSheetId, editable, sheets, onActivate, onCreate, onDelete, onDuplicate, onHide, onMove, onRename, onSetColor, onShow, }: SpreadsheetSheetBarProps): import("react").JSX.Element[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WorkSpreadsheetContent, WorkSpreadsheetSheet } from '../work-types';
|
|
2
|
+
export type SpreadsheetSheetMoveDirection = -1 | 1;
|
|
3
|
+
export declare function addSpreadsheetSheet(content: WorkSpreadsheetContent): WorkSpreadsheetContent;
|
|
4
|
+
export declare function activateSpreadsheetSheet(content: WorkSpreadsheetContent, sheetId: string): WorkSpreadsheetContent | null;
|
|
5
|
+
export declare function deleteSpreadsheetSheet(content: WorkSpreadsheetContent, sheetId: string): WorkSpreadsheetContent | null;
|
|
6
|
+
export declare function duplicateSpreadsheetSheet(content: WorkSpreadsheetContent, sheetId: string): WorkSpreadsheetContent | null;
|
|
7
|
+
export declare function renameSpreadsheetSheet(content: WorkSpreadsheetContent, sheetId: string, name: string): WorkSpreadsheetContent | null;
|
|
8
|
+
export declare function spreadsheetSheetNameValidationMessage(sheets: readonly WorkSpreadsheetSheet[], sheetId: string, name: string): string | null;
|
|
9
|
+
export declare function setSpreadsheetSheetColor(content: WorkSpreadsheetContent, sheetId: string, color: string | null): WorkSpreadsheetContent | null;
|
|
10
|
+
export declare function hideSpreadsheetSheet(content: WorkSpreadsheetContent, sheetId: string, hidden: boolean): WorkSpreadsheetContent | null;
|
|
11
|
+
export declare function moveSpreadsheetSheet(content: WorkSpreadsheetContent, sheetId: string, direction: SpreadsheetSheetMoveDirection): WorkSpreadsheetContent | null;
|
|
12
|
+
export declare function adjacentSpreadsheetSheetId(content: WorkSpreadsheetContent, activeSheetId: string, direction: SpreadsheetSheetMoveDirection): string | null;
|
|
13
|
+
export declare function isSpreadsheetSheetHidden(sheet: WorkSpreadsheetSheet): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { WorkSpreadsheetTrendline } from '../work-types';
|
|
2
|
+
interface SpreadsheetTrendlineEditorProps {
|
|
3
|
+
seriesNumber: number;
|
|
4
|
+
trendlines: WorkSpreadsheetTrendline[];
|
|
5
|
+
onChange: (trendlines: WorkSpreadsheetTrendline[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function SpreadsheetTrendlineEditor({ seriesNumber, trendlines, onChange, }: SpreadsheetTrendlineEditorProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Selection } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkSpreadsheetContent } from '../work-types';
|
|
3
|
+
import type { SpreadsheetEditorCanCommands, SpreadsheetEditorCommands } from './spreadsheet-command-controller';
|
|
4
|
+
export type SpreadsheetWorkbookPanelView = 'names' | 'print-area' | 'conditional-formatting' | 'protection' | 'charts' | 'formulas' | 'pivots';
|
|
5
|
+
interface SpreadsheetWorkbookPanelProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
content: WorkSpreadsheetContent;
|
|
8
|
+
view: SpreadsheetWorkbookPanelView;
|
|
9
|
+
activeSheetId: string;
|
|
10
|
+
selection?: Selection;
|
|
11
|
+
can: Pick<SpreadsheetEditorCanCommands, 'recalculateFormula'>;
|
|
12
|
+
commands: Pick<SpreadsheetEditorCommands, 'recalculateFormula' | 'setSpreadsheetContent'>;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function SpreadsheetWorkbookPanel({ id, content, view, activeSheetId, selection, can, commands, onClose, }: SpreadsheetWorkbookPanelProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type WorkDocumentCommentView } from '../work-document-comments';
|
|
3
|
+
import type { WorkDocumentContent } from '../work-types';
|
|
4
|
+
import type { DocumentCommentDraft } from './document-comment-composer';
|
|
5
|
+
export interface DocumentCommentsController {
|
|
6
|
+
canInsert: boolean;
|
|
7
|
+
close: () => void;
|
|
8
|
+
closeDraft: (restoreEditorFocus?: boolean) => void;
|
|
9
|
+
comments: WorkDocumentCommentView[];
|
|
10
|
+
deleteComment: (id: string) => void;
|
|
11
|
+
draft: DocumentCommentDraft | null;
|
|
12
|
+
open: boolean;
|
|
13
|
+
reply: (id: string, text: string) => void;
|
|
14
|
+
setOpen: (open: boolean) => void;
|
|
15
|
+
startDraft: () => void;
|
|
16
|
+
submitDraft: (text: string) => string | null;
|
|
17
|
+
toggleOpen: () => void;
|
|
18
|
+
toggleResolved: (id: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function useDocumentComments({ contentRef, editor, onBeforeDraft, }: {
|
|
21
|
+
contentRef: {
|
|
22
|
+
current: WorkDocumentContent;
|
|
23
|
+
};
|
|
24
|
+
editor: Editor | null;
|
|
25
|
+
onBeforeDraft?: () => void;
|
|
26
|
+
}): DocumentCommentsController;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type MutableRefObject, type ReactNode } from 'react';
|
|
3
|
+
import type { WorkDocumentCaptionKind } from '../work-document-captions';
|
|
4
|
+
import type { WorkDocumentFieldKind } from '../work-document-fields';
|
|
5
|
+
import type { WorkDocumentNoteKind } from '../work-document-notes';
|
|
6
|
+
import type { WorkDocumentContent } from '../work-types';
|
|
7
|
+
export interface DocumentInsertCommands {
|
|
8
|
+
dialog: ReactNode;
|
|
9
|
+
insertCaption: (kind: WorkDocumentCaptionKind) => void;
|
|
10
|
+
insertCrossReference: () => void;
|
|
11
|
+
insertField: (kind: WorkDocumentFieldKind) => void;
|
|
12
|
+
insertImage: (file: File) => Promise<void>;
|
|
13
|
+
insertNote: (kind: WorkDocumentNoteKind) => boolean;
|
|
14
|
+
refreshFields: () => boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function useDocumentInsertCommands({ contentRef, editor, }: {
|
|
17
|
+
contentRef: MutableRefObject<WorkDocumentContent>;
|
|
18
|
+
editor: Editor | null;
|
|
19
|
+
}): DocumentInsertCommands;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import { type RefObject } from 'react';
|
|
3
|
+
import type { WorkDocumentPageChromeContent, WorkDocumentPageChromeVariant, WorkDocumentSectionLayout } from '../work-types';
|
|
4
|
+
import type { DocumentPageChromeEditingPart } from './document-page-chrome-ribbon';
|
|
5
|
+
import type { DocumentPaginationPageDescriptor } from './use-document-pagination';
|
|
6
|
+
export interface DocumentPageChromeEditingState {
|
|
7
|
+
part: DocumentPageChromeEditingPart;
|
|
8
|
+
sectionId: string;
|
|
9
|
+
variant: WorkDocumentPageChromeVariant;
|
|
10
|
+
}
|
|
11
|
+
export declare function useDocumentPageChrome({ editor, enabled, firstPage, footerRef, headerRef, lastPage, layout, onBeforeEdit, visiblePage, }: {
|
|
12
|
+
editor: Editor | null;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
firstPage: DocumentPaginationPageDescriptor;
|
|
15
|
+
footerRef: RefObject<HTMLElement | null>;
|
|
16
|
+
headerRef: RefObject<HTMLElement | null>;
|
|
17
|
+
lastPage: DocumentPaginationPageDescriptor;
|
|
18
|
+
layout: WorkDocumentSectionLayout;
|
|
19
|
+
onBeforeEdit: () => boolean | undefined | Promise<boolean | undefined>;
|
|
20
|
+
visiblePage: DocumentPaginationPageDescriptor;
|
|
21
|
+
}): {
|
|
22
|
+
chromeEditor: Editor | null;
|
|
23
|
+
close: () => void;
|
|
24
|
+
edit: (part: DocumentPageChromeEditingPart) => Promise<void>;
|
|
25
|
+
editing: DocumentPageChromeEditingState | null;
|
|
26
|
+
footerChrome: WorkDocumentPageChromeContent;
|
|
27
|
+
headerChrome: WorkDocumentPageChromeContent;
|
|
28
|
+
reset: () => void;
|
|
29
|
+
setChromeEditor: import("react").Dispatch<import("react").SetStateAction<Editor | null>>;
|
|
30
|
+
togglePageNumber: () => void;
|
|
31
|
+
update: (patch: Partial<WorkDocumentPageChromeContent>) => void;
|
|
32
|
+
visibleChrome: WorkDocumentPageChromeContent;
|
|
33
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/core';
|
|
2
|
+
import type { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
3
|
+
import type { OfficeKernelLayoutResult, OfficeKernelPageMetrics } from '../../../kernel/office-kernel-protocol';
|
|
4
|
+
import { type WorkDocumentLayoutFont } from '../work-document-fonts';
|
|
5
|
+
import { type MeasuredDocumentLayoutBlock } from '../work-document-pagination';
|
|
6
|
+
import { type ResolvedDocumentPageChrome } from '../work-document-page-chrome';
|
|
7
|
+
import type { WorkDocumentSectionLayout } from '../work-types';
|
|
8
|
+
export interface DocumentPaginationResult {
|
|
9
|
+
layout: OfficeKernelLayoutResult;
|
|
10
|
+
blocks: MeasuredDocumentLayoutBlock[];
|
|
11
|
+
pageByBlockId: ReadonlyMap<string, number>;
|
|
12
|
+
pages: DocumentPaginationPageDescriptor[];
|
|
13
|
+
}
|
|
14
|
+
export interface DocumentPaginationPageDescriptor {
|
|
15
|
+
pageIndex: number;
|
|
16
|
+
physicalPage: number;
|
|
17
|
+
pageNumber: number;
|
|
18
|
+
previewText: string;
|
|
19
|
+
selectionPosition: number;
|
|
20
|
+
sectionPage: number;
|
|
21
|
+
sectionId: string;
|
|
22
|
+
sectionIndex: number;
|
|
23
|
+
layout: WorkDocumentSectionLayout;
|
|
24
|
+
pageChrome: ResolvedDocumentPageChrome;
|
|
25
|
+
}
|
|
26
|
+
export interface UseDocumentPaginationOptions {
|
|
27
|
+
editor: Editor | null;
|
|
28
|
+
documentRevision: number;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
layoutKey: string;
|
|
31
|
+
page: OfficeKernelPageMetrics;
|
|
32
|
+
selectionVersion: number;
|
|
33
|
+
wasmUrl?: string;
|
|
34
|
+
layoutFonts: readonly WorkDocumentLayoutFont[];
|
|
35
|
+
loadedLayoutFontIds: ReadonlySet<string>;
|
|
36
|
+
}
|
|
37
|
+
export interface UseDocumentPaginationValue {
|
|
38
|
+
currentPage: number | null;
|
|
39
|
+
currentPageDescriptor: DocumentPaginationPageDescriptor | null;
|
|
40
|
+
pageCount: number | null;
|
|
41
|
+
pages: readonly DocumentPaginationPageDescriptor[];
|
|
42
|
+
paginating: boolean;
|
|
43
|
+
}
|
|
44
|
+
export declare function useDocumentPagination({ editor, documentRevision, enabled, layoutKey, page, selectionVersion, wasmUrl, layoutFonts, loadedLayoutFontIds, }: UseDocumentPaginationOptions): UseDocumentPaginationValue;
|
|
45
|
+
export declare function documentPaginationPageDescriptors(layout: OfficeKernelLayoutResult, blocks: readonly MeasuredDocumentLayoutBlock[], documentNode?: ProseMirrorNode): DocumentPaginationPageDescriptor[];
|
|
46
|
+
export declare function pageForPosition(pagination: DocumentPaginationResult, position: number): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MarkdownSourceEdit, MarkdownSourceSelection } from './markdown-source-commands';
|
|
2
|
+
interface MarkdownSourceHistorySnapshot extends MarkdownSourceEdit {
|
|
3
|
+
}
|
|
4
|
+
export declare function useMarkdownSourceHistory(initialMarkdown: string): {
|
|
5
|
+
canUndo: boolean;
|
|
6
|
+
canRedo: boolean;
|
|
7
|
+
record: (edit: MarkdownSourceEdit, options?: {
|
|
8
|
+
typing?: boolean;
|
|
9
|
+
inputType?: string;
|
|
10
|
+
}) => boolean;
|
|
11
|
+
redo: () => MarkdownSourceHistorySnapshot | null;
|
|
12
|
+
reset: (markdown: string, selection: MarkdownSourceSelection) => void;
|
|
13
|
+
undo: () => MarkdownSourceHistorySnapshot | null;
|
|
14
|
+
updateSelection: (selection: MarkdownSourceSelection) => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
|
+
export declare function useOfficeDraft<Value>(createInitial: () => Value): {
|
|
3
|
+
cancelDraft: () => void;
|
|
4
|
+
dirty: boolean;
|
|
5
|
+
draft: Value;
|
|
6
|
+
draftRef: import("react").RefObject<Value>;
|
|
7
|
+
replaceDraft: (next: Value) => void;
|
|
8
|
+
setDraft: Dispatch<SetStateAction<Value>>;
|
|
9
|
+
syncDraft: (next: Value, force?: boolean) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { OfficeEditorRuntime } from './office-editor-extension';
|
|
3
|
+
export interface OfficeEditorKeyboardShortcutOptions {
|
|
4
|
+
capture?: boolean;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
onHandled?: (event: KeyboardEvent) => void;
|
|
7
|
+
scopeRef?: RefObject<HTMLElement | null>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useOfficeEditorKeyboardShortcuts<Context, Commands>(editor: OfficeEditorRuntime<Context, Commands>, options?: OfficeEditorKeyboardShortcutOptions): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type OfficeEditorExtension, type OfficeEditorRuntime } from './office-editor-extension';
|
|
2
|
+
/**
|
|
3
|
+
* Keeps one extension runtime mounted while React supplies the latest
|
|
4
|
+
* controlled editor context. Callers should memoize the extension list.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useOfficeEditorRuntime<Context, Commands>(context: Context, extensions: readonly OfficeEditorExtension<Context, Commands>[]): OfficeEditorRuntime<Context, Commands>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export interface OfficeEditorWheelZoomOptions {
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
scopeRef: RefObject<HTMLElement | null>;
|
|
5
|
+
onZoomIn: () => void;
|
|
6
|
+
onZoomOut: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface OfficeZoomStepOptions {
|
|
9
|
+
minimum?: number;
|
|
10
|
+
maximum?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function stepOfficeZoom(zoom: number, direction: 'in' | 'out', { minimum, maximum, step }?: OfficeZoomStepOptions): number;
|
|
14
|
+
/**
|
|
15
|
+
* Routes Ctrl/Cmd + wheel to an editor's own zoom model instead of the host
|
|
16
|
+
* browser. A native non-passive capture listener is required because React's
|
|
17
|
+
* delegated wheel listener cannot reliably cancel browser zoom.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useOfficeEditorWheelZoom({ enabled, scopeRef, onZoomIn, onZoomOut, }: OfficeEditorWheelZoomOptions): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useOfficeHistory<Content>({ content, onChange, sameValue, }: {
|
|
2
|
+
content: Content;
|
|
3
|
+
onChange: (content: Content) => void;
|
|
4
|
+
sameValue?: (left: Content, right: Content) => boolean;
|
|
5
|
+
}): {
|
|
6
|
+
canUndo: boolean;
|
|
7
|
+
canRedo: boolean;
|
|
8
|
+
undo: () => boolean;
|
|
9
|
+
redo: () => boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { WorkPresentationContent, WorkSlide, WorkSlideElement } from '../work-types';
|
|
2
|
+
import type { PresentationDesignMode } from './presentation-editor-types';
|
|
3
|
+
export declare function usePresentationClipboard({ content, mode, targetId, selectedSlide, selectedElements, onChange, onSelectSlide, onSelectElements, }: {
|
|
4
|
+
content: WorkPresentationContent;
|
|
5
|
+
mode: PresentationDesignMode;
|
|
6
|
+
targetId: string | undefined;
|
|
7
|
+
selectedSlide: WorkSlide | undefined;
|
|
8
|
+
selectedElements: readonly WorkSlideElement[];
|
|
9
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
10
|
+
onSelectSlide: (id: string) => void;
|
|
11
|
+
onSelectElements: (ids: readonly string[]) => void;
|
|
12
|
+
}): {
|
|
13
|
+
copySelection: () => boolean;
|
|
14
|
+
cutSelection: () => boolean;
|
|
15
|
+
deleteSelection: () => boolean;
|
|
16
|
+
duplicateSelection: () => boolean;
|
|
17
|
+
nudgeSelection: (key: string, distance: number) => boolean;
|
|
18
|
+
pasteSelection: () => boolean;
|
|
19
|
+
toggleBold: () => boolean;
|
|
20
|
+
toggleItalic: () => boolean;
|
|
21
|
+
toggleUnderline: () => boolean;
|
|
22
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WorkPresentationContent, WorkPresentationLayout, WorkPresentationMaster, WorkSlide, WorkSlideElement } from '../work-types';
|
|
2
|
+
import type { PresentationDesignMode } from './presentation-editor-types';
|
|
3
|
+
export interface PresentationDesignCommands {
|
|
4
|
+
addPlaceholder: (type: 'body' | 'title') => void;
|
|
5
|
+
applyLayout: (layoutId: string) => void;
|
|
6
|
+
close: () => void;
|
|
7
|
+
createLayout: (copyCurrent: boolean) => void;
|
|
8
|
+
deleteLayout: () => void;
|
|
9
|
+
edit: (mode: PresentationDesignMode) => void;
|
|
10
|
+
renameLayout: (name: string) => void;
|
|
11
|
+
renameMaster: (name: string) => void;
|
|
12
|
+
setActiveBackground: (background: string) => void;
|
|
13
|
+
setLayoutBackground: (background: string | undefined) => void;
|
|
14
|
+
setMasterBackground: (background: string) => void;
|
|
15
|
+
toggleDesignPanel: () => void;
|
|
16
|
+
toggleLayoutBackground: (enabled: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function usePresentationDesignCommands({ activeElements, activeTargetId, designContent, designMode, designOpen, onChange, onClearSelection, onCloseComments, onEditElement, onSetDesignMode, onSetDesignOpen, selectedLayout, selectedMaster, selectedSlide, }: {
|
|
19
|
+
activeElements: readonly WorkSlideElement[];
|
|
20
|
+
activeTargetId: string | undefined;
|
|
21
|
+
designContent: WorkPresentationContent;
|
|
22
|
+
designMode: PresentationDesignMode;
|
|
23
|
+
designOpen: boolean;
|
|
24
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
25
|
+
onClearSelection: () => void;
|
|
26
|
+
onCloseComments: () => void;
|
|
27
|
+
onEditElement: (id: string) => void;
|
|
28
|
+
onSetDesignMode: (mode: PresentationDesignMode) => void;
|
|
29
|
+
onSetDesignOpen: (open: boolean) => void;
|
|
30
|
+
selectedLayout: WorkPresentationLayout | undefined;
|
|
31
|
+
selectedMaster: WorkPresentationMaster | undefined;
|
|
32
|
+
selectedSlide: WorkSlide;
|
|
33
|
+
}): PresentationDesignCommands;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type MutableRefObject } from 'react';
|
|
2
|
+
import type { WorkPresentationContent, WorkSlide, WorkSlideElement } from '../work-types';
|
|
3
|
+
import type { PresentationDesignMode } from './presentation-editor-types';
|
|
4
|
+
import type { OfficeTableDimensions } from './office-table-dimensions';
|
|
5
|
+
import type { PresentationTextValue } from './presentation-text-editor';
|
|
6
|
+
export interface PresentationElementCommands {
|
|
7
|
+
addChart: () => void;
|
|
8
|
+
addElement: (type: 'shape' | 'text') => void;
|
|
9
|
+
addImage: (file: File) => Promise<void>;
|
|
10
|
+
addTable: (dimensions: OfficeTableDimensions) => void;
|
|
11
|
+
groupSelection: () => boolean;
|
|
12
|
+
instantiatePlaceholder: (definition: WorkSlideElement) => void;
|
|
13
|
+
ungroupSelection: () => boolean;
|
|
14
|
+
updateElement: (patch: Partial<WorkSlideElement>) => void;
|
|
15
|
+
updateTextElement: (elementId: string, value: PresentationTextValue) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function usePresentationElementCommands({ activeElements, activeTargetId, content, contentRef, designMode, onChange, onEditElement, onSelectElements, selectedElementIds, selectedElements, selectedSlide, }: {
|
|
18
|
+
activeElements: readonly WorkSlideElement[];
|
|
19
|
+
activeTargetId: string | undefined;
|
|
20
|
+
content: WorkPresentationContent;
|
|
21
|
+
contentRef: MutableRefObject<WorkPresentationContent>;
|
|
22
|
+
designMode: PresentationDesignMode;
|
|
23
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
24
|
+
onEditElement: (id: string) => void;
|
|
25
|
+
onSelectElements: (ids: readonly string[]) => void;
|
|
26
|
+
selectedElementIds: readonly string[];
|
|
27
|
+
selectedElements: readonly WorkSlideElement[];
|
|
28
|
+
selectedSlide: WorkSlide;
|
|
29
|
+
}): PresentationElementCommands;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { OfficeKernelEngine, OfficeKernelPresentationAlignment, OfficeKernelPresentationGeometryElement, OfficeKernelPresentationSnapGuide, OfficeKernelPresentationTransformMode } from '../../../kernel/office-kernel-protocol';
|
|
2
|
+
import type { WorkSlideElement } from '../work-types';
|
|
3
|
+
export interface PresentationSnapResolution {
|
|
4
|
+
element: OfficeKernelPresentationGeometryElement;
|
|
5
|
+
guides: OfficeKernelPresentationSnapGuide[];
|
|
6
|
+
}
|
|
7
|
+
export interface PresentationGeometryController {
|
|
8
|
+
alignElement: (element: WorkSlideElement, alignment: OfficeKernelPresentationAlignment) => Promise<OfficeKernelPresentationGeometryElement | null>;
|
|
9
|
+
cancel: () => void;
|
|
10
|
+
engine: OfficeKernelEngine | null;
|
|
11
|
+
pending: boolean;
|
|
12
|
+
snapElement: (element: WorkSlideElement, elements: readonly WorkSlideElement[], mode: OfficeKernelPresentationTransformMode, threshold: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}) => Promise<PresentationSnapResolution | null>;
|
|
16
|
+
}
|
|
17
|
+
export declare function usePresentationGeometry(wasmUrl?: string, enabled?: boolean): PresentationGeometryController;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { WorkPresentationContent } from '../work-types';
|
|
2
|
+
export declare function usePresentationHistory({ content, onChange, selectedSlideId, onSelectSlide, }: {
|
|
3
|
+
content: WorkPresentationContent;
|
|
4
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
5
|
+
selectedSlideId: string;
|
|
6
|
+
onSelectSlide: (slideId: string) => void;
|
|
7
|
+
}): {
|
|
8
|
+
canUndo: boolean;
|
|
9
|
+
canRedo: boolean;
|
|
10
|
+
undo: () => boolean;
|
|
11
|
+
redo: () => boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { WorkPresentationContent, WorkSlide, WorkSlideElement } from '../work-types';
|
|
3
|
+
export interface PresentationReviewCommands {
|
|
4
|
+
addComment: () => void;
|
|
5
|
+
closeComments: () => void;
|
|
6
|
+
deleteComment: (slideId: string, commentId: string) => void;
|
|
7
|
+
dialog: ReactNode;
|
|
8
|
+
locateComment: (slideId: string, commentId: string) => void;
|
|
9
|
+
openComment: (commentId: string) => void;
|
|
10
|
+
updateComment: (slideId: string, commentId: string, text: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function usePresentationReviewCommands({ content, onChange, onClearSelection, onCloseComments, onOpenComments, onSelectComment, onSelectSlide, selectedElement, selectedSlide, }: {
|
|
13
|
+
content: WorkPresentationContent;
|
|
14
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
15
|
+
onClearSelection: () => void;
|
|
16
|
+
onCloseComments: () => void;
|
|
17
|
+
onOpenComments: () => void;
|
|
18
|
+
onSelectComment: (id: string | null) => void;
|
|
19
|
+
onSelectSlide: (id: string) => void;
|
|
20
|
+
selectedElement: WorkSlideElement | null;
|
|
21
|
+
selectedSlide: WorkSlide;
|
|
22
|
+
}): PresentationReviewCommands;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WorkSlideElement } from '../work-types';
|
|
2
|
+
export interface PresentationSelectionController {
|
|
3
|
+
clear: () => void;
|
|
4
|
+
edit: (elementId: string) => void;
|
|
5
|
+
editingElementId: string | null;
|
|
6
|
+
exitEditing: () => void;
|
|
7
|
+
replace: (elementIds: readonly string[]) => void;
|
|
8
|
+
select: (elementId: string | null, additive?: boolean) => void;
|
|
9
|
+
selectedElementIds: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function usePresentationSelection(elements: readonly WorkSlideElement[]): PresentationSelectionController;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WorkPresentationContent, WorkSlide, WorkSlideTransition } from '../work-types';
|
|
2
|
+
export interface PresentationSlideCommands {
|
|
3
|
+
addSlide: () => void;
|
|
4
|
+
applyTransitionToAll: (transition: WorkSlideTransition | undefined) => boolean;
|
|
5
|
+
canApplyTransitionToAll: (transition: WorkSlideTransition | undefined) => boolean;
|
|
6
|
+
deleteSlide: () => boolean;
|
|
7
|
+
deleteSlideById: (slideId: string) => boolean;
|
|
8
|
+
duplicateSlide: () => void;
|
|
9
|
+
setTransition: (transition: WorkSlideTransition | undefined) => boolean;
|
|
10
|
+
updateNotes: (notes: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function usePresentationSlideCommands({ content, onChange, onClearSelection, onSelectSlide, selectedSlide, }: {
|
|
13
|
+
content: WorkPresentationContent;
|
|
14
|
+
onChange: (content: WorkPresentationContent) => void;
|
|
15
|
+
onClearSelection: () => void;
|
|
16
|
+
onSelectSlide: (id: string) => void;
|
|
17
|
+
selectedSlide: WorkSlide;
|
|
18
|
+
}): PresentationSlideCommands;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export interface PresentationThumbnailWindow {
|
|
3
|
+
bottomSpacerHeight: number;
|
|
4
|
+
end: number;
|
|
5
|
+
requestFocus: (index: number) => void;
|
|
6
|
+
requestFocusById: (slideId: string) => void;
|
|
7
|
+
start: number;
|
|
8
|
+
topSpacerHeight: number;
|
|
9
|
+
windowed: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function usePresentationThumbnailWindow({ slideIds, selectedSlideId, viewMode, viewportRef, zoom, }: {
|
|
12
|
+
slideIds: readonly string[];
|
|
13
|
+
selectedSlideId: string;
|
|
14
|
+
viewMode: 'normal' | 'sorter';
|
|
15
|
+
viewportRef: RefObject<HTMLElement | null>;
|
|
16
|
+
zoom: number;
|
|
17
|
+
}): PresentationThumbnailWindow;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type PointerEvent as ReactPointerEvent, type RefObject } from 'react';
|
|
2
|
+
import type { OfficeKernelPresentationSnapGuide } from '../../../kernel/office-kernel-protocol';
|
|
3
|
+
import type { WorkSlideElement } from '../work-types';
|
|
4
|
+
import type { PresentationGeometryController } from './use-presentation-geometry';
|
|
5
|
+
export interface PresentationTransformDrag {
|
|
6
|
+
element: WorkSlideElement;
|
|
7
|
+
elements?: readonly WorkSlideElement[];
|
|
8
|
+
frame?: WorkSlideElement;
|
|
9
|
+
mode: 'move' | 'resize';
|
|
10
|
+
pointerId: number;
|
|
11
|
+
startX: number;
|
|
12
|
+
startY: number;
|
|
13
|
+
}
|
|
14
|
+
export interface PresentationTransformPoint {
|
|
15
|
+
clientX: number;
|
|
16
|
+
clientY: number;
|
|
17
|
+
}
|
|
18
|
+
export interface PresentationTransformBounds {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
export interface PresentationTransformPatch {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
borderWidth?: number;
|
|
28
|
+
fontSize?: number;
|
|
29
|
+
textRuns?: WorkSlideElement['textRuns'];
|
|
30
|
+
}
|
|
31
|
+
export interface PresentationTransformCommit {
|
|
32
|
+
elementId: string;
|
|
33
|
+
patch: PresentationTransformPatch;
|
|
34
|
+
}
|
|
35
|
+
export interface PresentationTransformController {
|
|
36
|
+
cancelDrag: () => void;
|
|
37
|
+
displayElements: WorkSlideElement[];
|
|
38
|
+
dragging: boolean;
|
|
39
|
+
guides: OfficeKernelPresentationSnapGuide[];
|
|
40
|
+
beginDrag: (event: ReactPointerEvent, element: WorkSlideElement, mode: 'move' | 'resize') => void;
|
|
41
|
+
continueDrag: (event: ReactPointerEvent) => void;
|
|
42
|
+
endDrag: (event: ReactPointerEvent) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare function usePresentationTransform({ canvasRef, elements, geometry, onCommit, onSelect, selectedElementIds, snapTargets, }: {
|
|
45
|
+
canvasRef: RefObject<HTMLElement | null>;
|
|
46
|
+
elements: WorkSlideElement[];
|
|
47
|
+
geometry: PresentationGeometryController;
|
|
48
|
+
onCommit: (changes: readonly PresentationTransformCommit[]) => void;
|
|
49
|
+
onSelect: (elementId: string) => void;
|
|
50
|
+
selectedElementIds: readonly string[];
|
|
51
|
+
snapTargets: WorkSlideElement[];
|
|
52
|
+
}): PresentationTransformController;
|
|
53
|
+
export declare function presentationTransformCandidate(drag: PresentationTransformDrag, point: PresentationTransformPoint, bounds: PresentationTransformBounds): WorkSlideElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Op } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkbookInstance } from '@fortune-sheet/react';
|
|
3
|
+
import { type RefObject } from 'react';
|
|
4
|
+
import type { WorkSpreadsheetContent } from '../work-types';
|
|
5
|
+
import type { SpreadsheetCalculationCommandPort } from './spreadsheet-command-controller';
|
|
6
|
+
interface UseSpreadsheetCalculationOptions {
|
|
7
|
+
content: WorkSpreadsheetContent;
|
|
8
|
+
kernelWasmUrl?: string;
|
|
9
|
+
workbookRef: RefObject<WorkbookInstance | null>;
|
|
10
|
+
}
|
|
11
|
+
export interface SpreadsheetCalculationController extends SpreadsheetCalculationCommandPort {
|
|
12
|
+
hasPendingResultPatches: () => boolean;
|
|
13
|
+
notifyWorkbookOperations: (operations: readonly Op[]) => void;
|
|
14
|
+
synchronizeWorkbook: (content: WorkSpreadsheetContent, operations: readonly Op[]) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function useSpreadsheetCalculation({ content, kernelWasmUrl, workbookRef, }: UseSpreadsheetCalculationOptions): SpreadsheetCalculationController;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Op } from '@fortune-sheet/core';
|
|
2
|
+
import type { WorkSpreadsheetContent } from '../work-types';
|
|
3
|
+
export interface SpreadsheetWorkbookSyncController {
|
|
4
|
+
acceptContent: (content: WorkSpreadsheetContent) => void;
|
|
5
|
+
ignoreChangeDuringExternalSync: (matchesExternalContent: boolean) => boolean;
|
|
6
|
+
mountRevision: number;
|
|
7
|
+
recordOperations: (operations: readonly Op[]) => void;
|
|
8
|
+
takeOperations: () => Op[];
|
|
9
|
+
}
|
|
10
|
+
export declare function useSpreadsheetWorkbookSync(content: WorkSpreadsheetContent): SpreadsheetWorkbookSyncController;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface WorkOfficeRibbonTab<T extends string> {
|
|
3
|
+
id: T;
|
|
4
|
+
label: string;
|
|
5
|
+
compactLabel?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface WorkOfficeFileAction {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
shortcut?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
separatorBefore?: boolean;
|
|
14
|
+
onSelect: () => void | Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare function WorkOfficeRibbon<T extends string>({ ariaLabel, tabs, defaultTab, activeTab, onTabChange, panels, fileActions, className, toolbarClassName, }: {
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
tabs: readonly WorkOfficeRibbonTab<T>[];
|
|
19
|
+
defaultTab: T;
|
|
20
|
+
activeTab?: T;
|
|
21
|
+
onTabChange?: (tab: T) => void;
|
|
22
|
+
panels: Record<T, ReactNode>;
|
|
23
|
+
fileActions?: readonly WorkOfficeFileAction[];
|
|
24
|
+
className?: string;
|
|
25
|
+
toolbarClassName?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export declare function WorkOfficePreviewBar({ ariaLabel, label, detail, fileActions, className, }: {
|
|
28
|
+
ariaLabel: string;
|
|
29
|
+
label: string;
|
|
30
|
+
detail?: string;
|
|
31
|
+
fileActions?: readonly WorkOfficeFileAction[];
|
|
32
|
+
className?: string;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
34
|
+
export declare function WorkOfficeRibbonGroup({ label, children, }: {
|
|
35
|
+
label: string;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
export declare function WorkOfficeRibbonButton({ label, visibleLabel, badge, active, displayLabel, className, title, children, ...props }: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'aria-label' | 'children'> & {
|
|
39
|
+
label: string;
|
|
40
|
+
visibleLabel?: string;
|
|
41
|
+
badge?: ReactNode;
|
|
42
|
+
active?: boolean;
|
|
43
|
+
displayLabel?: boolean;
|
|
44
|
+
children: ReactNode;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
export declare function WorkOfficeStatusBar({ children, controls, className, }: {
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
controls?: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
|
+
export declare function WorkOfficeZoomControls({ zoom, minimum, maximum, step, decreaseLabel, increaseLabel, outputLabel, sliderLabel, onChange, }: {
|
|
52
|
+
zoom: number;
|
|
53
|
+
minimum?: number;
|
|
54
|
+
maximum?: number;
|
|
55
|
+
step?: number;
|
|
56
|
+
decreaseLabel: string;
|
|
57
|
+
increaseLabel: string;
|
|
58
|
+
outputLabel: string;
|
|
59
|
+
sliderLabel: string;
|
|
60
|
+
onChange: (zoom: number) => void;
|
|
61
|
+
}): import("react").JSX.Element;
|