@a3s-lab/office 0.2.2 → 0.4.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/COLLABORATION_ROADMAP.md +426 -0
- package/README.md +649 -10
- package/dist/0~1403.js +1 -1
- package/dist/0~2805.js +1279 -0
- package/dist/{0~use-office-draft.js → 0~345.js} +30 -1
- package/dist/0~3539.js +1 -1
- package/dist/0~3557.js +1 -1
- package/dist/0~3635.js +1 -1
- package/dist/0~4595.js +123 -12
- package/dist/0~4980.js +154 -0
- package/dist/0~5050.js +124 -113
- package/dist/{0~9512.js → 0~6090.js} +540 -3
- package/dist/0~7048.js +92 -66
- package/dist/0~7614.js +2 -1
- package/dist/0~7754.js +5653 -0
- package/dist/0~9445.js +1 -1
- package/dist/0~document-editor.js +4992 -3323
- package/dist/0~markdown-editor.js +250 -44
- package/dist/0~pdf-viewer.js +1016 -24
- package/dist/0~presentation-editor.js +179 -8
- package/dist/0~spreadsheet-editor.js +3371 -578
- package/dist/0~work-docx-export.js +6801 -658
- package/dist/0~work-docx-import.js +1388 -795
- package/dist/0~work-office-diagnostics.js +524 -30
- package/dist/0~work-pptx-export.js +2 -1
- package/dist/0~work-pptx-import.js +1 -2
- package/dist/0~work-presentation-charts.js +1 -1
- package/dist/2591.js +197 -0
- package/dist/3818.js +1090 -0
- package/dist/4104.js +970 -60
- package/dist/432.js +171 -14
- package/dist/4476.js +2008 -0
- package/dist/4560.js +674 -0
- package/dist/4650.js +70 -0
- package/dist/{1134.js → 5184.js} +183 -1
- package/dist/6489.js +18 -18
- package/dist/7060.js +132 -0
- package/dist/8715.js +2 -136
- package/dist/8928.js +16778 -0
- package/dist/9787.js +209 -0
- package/dist/core.d.ts +29 -9
- package/dist/core.js +10 -2
- package/dist/index.js +13 -3
- package/dist/internal/collaboration/office-collaboration-flat-json.d.ts +13 -0
- package/dist/internal/collaboration/office-collaboration-json.d.ts +4 -0
- package/dist/internal/collaboration/office-collaboration-presence.d.ts +86 -0
- package/dist/internal/collaboration/office-collaboration-transport.d.ts +42 -0
- package/dist/internal/collaboration/office-collaboration.d.ts +85 -0
- package/dist/internal/collaboration/office-document-collaboration-bibliography.d.ts +7 -0
- package/dist/internal/collaboration/office-document-collaboration-claims.d.ts +9 -0
- package/dist/internal/collaboration/office-document-collaboration-comments.d.ts +7 -0
- package/dist/internal/collaboration/office-document-collaboration-sidecar-utils.d.ts +27 -0
- package/dist/internal/collaboration/office-document-collaboration-sidecars.d.ts +16 -0
- package/dist/internal/collaboration/office-document-collaboration.d.ts +45 -0
- package/dist/internal/collaboration/office-markdown-collaboration.d.ts +31 -0
- package/dist/internal/collaboration/office-pdf-collaboration-claims.d.ts +4 -0
- package/dist/internal/collaboration/office-pdf-collaboration-conflicts.d.ts +2 -0
- package/dist/internal/collaboration/office-pdf-collaboration-model.d.ts +26 -0
- package/dist/internal/collaboration/office-pdf-collaboration-records.d.ts +21 -0
- package/dist/internal/collaboration/office-pdf-collaboration-types.d.ts +91 -0
- package/dist/internal/collaboration/office-pdf-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-pdf-collaboration.d.ts +35 -0
- package/dist/internal/collaboration/office-presentation-collaboration-model.d.ts +25 -0
- package/dist/internal/collaboration/office-presentation-collaboration-records.d.ts +22 -0
- package/dist/internal/collaboration/office-presentation-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-presentation-collaboration.d.ts +32 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-cells.d.ts +13 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-claims.d.ts +4 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-conflicts.d.ts +2 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-flat-json.d.ts +10 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-model.d.ts +31 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-records.d.ts +17 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration-validation.d.ts +4 -0
- package/dist/internal/collaboration/office-spreadsheet-collaboration.d.ts +32 -0
- package/dist/internal/design-system/primitives/navigation/tabs.d.ts +3 -1
- package/dist/internal/features/work/components/work-document-page-border.d.ts +6 -0
- package/dist/internal/features/work/editors/document-command-catalog.d.ts +536 -0
- package/dist/internal/features/work/editors/document-editor-focus.d.ts +1 -1
- package/dist/internal/features/work/editors/document-editor-support.d.ts +7 -3
- package/dist/internal/features/work/editors/document-editor.d.ts +8 -2
- package/dist/internal/features/work/editors/document-external-content.d.ts +14 -0
- package/dist/internal/features/work/editors/document-format-clipboard.d.ts +6 -0
- package/dist/internal/features/work/editors/document-format-tools.d.ts +4 -0
- package/dist/internal/features/work/editors/document-layout-panel.d.ts +4 -1
- package/dist/internal/features/work/editors/document-page-chrome-wps-shortcuts.d.ts +2 -0
- package/dist/internal/features/work/editors/document-page-layout-ribbon.d.ts +14 -0
- package/dist/internal/features/work/editors/document-page-stack.d.ts +10 -1
- package/dist/internal/features/work/editors/document-page-thumbnail.d.ts +2 -0
- package/dist/internal/features/work/editors/document-pagination-run-coordinator.d.ts +26 -0
- package/dist/internal/features/work/editors/document-picture-properties-dialog-model.d.ts +20 -1
- package/dist/internal/features/work/editors/document-review-navigation.d.ts +9 -0
- package/dist/internal/features/work/editors/document-statistics-dialog.d.ts +7 -0
- package/dist/internal/features/work/editors/document-status-bar.d.ts +2 -1
- package/dist/internal/features/work/editors/document-table-properties-dialog-model.d.ts +4 -1
- package/dist/internal/features/work/editors/document-toolbar.d.ts +19 -42
- package/dist/internal/features/work/editors/document-wps-shortcuts.d.ts +12 -0
- package/dist/internal/features/work/editors/document-zoom.d.ts +17 -0
- package/dist/internal/features/work/editors/markdown-editor-focus.d.ts +1 -1
- package/dist/internal/features/work/editors/markdown-editor.d.ts +5 -1
- package/dist/internal/features/work/editors/markdown-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/office-collaboration-participants.d.ts +3 -0
- package/dist/internal/features/work/editors/office-collaboration-presence-context.d.ts +17 -0
- package/dist/internal/features/work/editors/office-collaboration-presence-ui.d.ts +25 -0
- package/dist/internal/features/work/editors/office-editor-focus-handoff.d.ts +27 -0
- package/dist/internal/features/work/editors/pdf-annotation-controller.d.ts +5 -0
- package/dist/internal/features/work/editors/pdf-collaboration-presence.d.ts +3 -0
- package/dist/internal/features/work/editors/pdf-collaboration-projection.d.ts +10 -0
- package/dist/internal/features/work/editors/pdf-evidence-contract.d.ts +36 -0
- package/dist/internal/features/work/editors/pdf-evidence-overlay.d.ts +37 -0
- package/dist/internal/features/work/editors/pdf-toolbar.d.ts +2 -1
- package/dist/internal/features/work/editors/pdf-viewer-controller.d.ts +7 -1
- package/dist/internal/features/work/editors/pdf-viewer.d.ts +11 -1
- package/dist/internal/features/work/editors/presentation-collaboration-presence.d.ts +5 -0
- package/dist/internal/features/work/editors/presentation-editor-focus.d.ts +3 -2
- package/dist/internal/features/work/editors/presentation-editor-types.d.ts +3 -0
- package/dist/internal/features/work/editors/presentation-editor.d.ts +1 -1
- package/dist/internal/features/work/editors/spreadsheet-auto-filter.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-clear.d.ts +3 -0
- package/dist/internal/features/work/editors/spreadsheet-cell-merge.d.ts +12 -0
- package/dist/internal/features/work/editors/spreadsheet-clipboard-shortcuts.d.ts +3 -7
- package/dist/internal/features/work/editors/spreadsheet-collaboration-presence.d.ts +9 -0
- package/dist/internal/features/work/editors/spreadsheet-command-catalog.d.ts +464 -0
- package/dist/internal/features/work/editors/spreadsheet-command-controller.d.ts +45 -9
- package/dist/internal/features/work/editors/spreadsheet-context-menu.d.ts +2 -0
- package/dist/internal/features/work/editors/spreadsheet-editor-ribbon.d.ts +9 -28
- package/dist/internal/features/work/editors/spreadsheet-editor.d.ts +8 -2
- package/dist/internal/features/work/editors/spreadsheet-format-painter.d.ts +27 -0
- package/dist/internal/features/work/editors/spreadsheet-freeze-panes.d.ts +14 -0
- package/dist/internal/features/work/editors/use-document-insert-commands.d.ts +3 -2
- package/dist/internal/features/work/editors/use-document-pagination.d.ts +6 -1
- package/dist/internal/features/work/editors/use-document-review-conflicts.d.ts +28 -0
- package/dist/internal/features/work/editors/use-spreadsheet-auto-filter.d.ts +21 -0
- package/dist/internal/features/work/editors/use-spreadsheet-collaboration.d.ts +27 -0
- package/dist/internal/features/work/editors/use-spreadsheet-format-painter.d.ts +18 -0
- package/dist/internal/features/work/editors/work-office-chrome.d.ts +22 -3
- package/dist/internal/features/work/editors/work-office-ribbon-overflow.d.ts +2 -0
- package/dist/internal/features/work/work-document-bookmark-references.d.ts +37 -0
- package/dist/internal/features/work/work-document-bookmarks.d.ts +29 -0
- package/dist/internal/features/work/work-document-caption-nodes.d.ts +4 -1
- package/dist/internal/features/work/work-document-comments.d.ts +1 -1
- package/dist/internal/features/work/work-document-equations.d.ts +513 -0
- package/dist/internal/features/work/work-document-extensions.d.ts +1 -0
- package/dist/internal/features/work/work-document-field-identity.d.ts +2 -0
- package/dist/internal/features/work/work-document-field-node.d.ts +2 -2
- package/dist/internal/features/work/work-document-fields.d.ts +7 -0
- package/dist/internal/features/work/work-document-image-identity.d.ts +30 -0
- package/dist/internal/features/work/work-document-image-layout.d.ts +46 -1
- package/dist/internal/features/work/work-document-image-wrap-contour.d.ts +16 -0
- package/dist/internal/features/work/work-document-incremental-layout.d.ts +2 -2
- package/dist/internal/features/work/work-document-model-codec.d.ts +4 -1
- package/dist/internal/features/work/work-document-note-integrity.d.ts +2 -0
- package/dist/internal/features/work/work-document-page-borders.d.ts +25 -0
- package/dist/internal/features/work/work-document-page-capture.d.ts +8 -0
- package/dist/internal/features/work/work-document-page-frames.d.ts +15 -0
- package/dist/internal/features/work/work-document-page-margins.d.ts +56 -0
- package/dist/internal/features/work/work-document-page-size.d.ts +47 -0
- package/dist/internal/features/work/work-document-pagination-measurement.d.ts +1 -2
- package/dist/internal/features/work/work-document-pagination-types.d.ts +7 -2
- package/dist/internal/features/work/work-document-pagination.d.ts +2 -2
- package/dist/internal/features/work/work-document-paragraph-borders.d.ts +32 -0
- package/dist/internal/features/work/work-document-paragraph-identity.d.ts +26 -0
- package/dist/internal/features/work/work-document-paragraph-shading.d.ts +18 -0
- package/dist/internal/features/work/work-document-review-conflicts.d.ts +35 -0
- package/dist/internal/features/work/work-document-section.d.ts +4 -0
- package/dist/internal/features/work/work-document-snapshot.d.ts +19 -0
- package/dist/internal/features/work/work-document-source.d.ts +23 -0
- package/dist/internal/features/work/work-document-table-column-widths.d.ts +7 -0
- package/dist/internal/features/work/work-document-table-property-changes.d.ts +3 -0
- package/dist/internal/features/work/work-document-table-row-identity.d.ts +15 -0
- package/dist/internal/features/work/work-document-table-sizing.d.ts +3 -0
- package/dist/internal/features/work/work-document-text-layout.d.ts +3 -1
- package/dist/internal/features/work/work-document-word-line-metrics.d.ts +2 -0
- package/dist/internal/features/work/work-docx-bookmark-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-bookmark-import.d.ts +24 -0
- package/dist/internal/features/work/work-docx-bookmarks.d.ts +17 -0
- package/dist/internal/features/work/work-docx-comment-durable-id-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-comment-export.d.ts +3 -0
- package/dist/internal/features/work/work-docx-comment-metadata.d.ts +2 -0
- package/dist/internal/features/work/work-docx-drawing-extension-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-equation-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-equation-export.d.ts +14 -0
- package/dist/internal/features/work/work-docx-equation-import.d.ts +30 -0
- package/dist/internal/features/work/work-docx-equation-story.d.ts +9 -0
- package/dist/internal/features/work/work-docx-export-formatting.d.ts +3 -1
- package/dist/internal/features/work/work-docx-export-image.d.ts +5 -1
- package/dist/internal/features/work/work-docx-export.d.ts +1 -1
- package/dist/internal/features/work/work-docx-field-instructions.d.ts +8 -0
- package/dist/internal/features/work/work-docx-font-table-preservation.d.ts +3 -0
- package/dist/internal/features/work/work-docx-ignorable-extension-preservation.d.ts +15 -0
- package/dist/internal/features/work/work-docx-image-crop.d.ts +12 -0
- package/dist/internal/features/work/work-docx-image-identity.d.ts +17 -0
- package/dist/internal/features/work/work-docx-image-layer.d.ts +12 -0
- package/dist/internal/features/work/work-docx-image-layout-import.d.ts +14 -2
- package/dist/internal/features/work/work-docx-image-wrap.d.ts +15 -0
- package/dist/internal/features/work/work-docx-import.d.ts +13 -3
- package/dist/internal/features/work/work-docx-list-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-list-import.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-block-preservation.d.ts +18 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-model.d.ts +47 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-properties.d.ts +17 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-table-model.d.ts +17 -0
- package/dist/internal/features/work/work-docx-note-comment-content-control-xml.d.ts +14 -0
- package/dist/internal/features/work/work-docx-note-comment-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-content.d.ts +40 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-preservation.d.ts +5 -0
- package/dist/internal/features/work/work-docx-note-comment-hyperlink-relationships.d.ts +35 -0
- package/dist/internal/features/work/work-docx-note-comment-identity.d.ts +15 -0
- package/dist/internal/features/work/work-docx-note-comment-run-preservation.d.ts +4 -0
- package/dist/internal/features/work/work-docx-note-comment-run-properties.d.ts +2 -0
- package/dist/internal/features/work/work-docx-note-image-import.d.ts +12 -0
- package/dist/internal/features/work/work-docx-note-image-relationships.d.ts +1 -0
- package/dist/internal/features/work/work-docx-numbering-extension-preservation.d.ts +6 -0
- package/dist/internal/features/work/work-docx-numbering.d.ts +1 -0
- package/dist/internal/features/work/work-docx-page-borders-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-borders-import.d.ts +10 -0
- package/dist/internal/features/work/work-docx-page-margins-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-page-margins-import.d.ts +18 -0
- package/dist/internal/features/work/work-docx-page-size-diagnostics.d.ts +2 -0
- package/dist/internal/features/work/work-docx-page-size-import.d.ts +17 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-export.d.ts +18 -0
- package/dist/internal/features/work/work-docx-paragraph-borders-import.d.ts +24 -0
- package/dist/internal/features/work/work-docx-paragraph-default-collapsed.d.ts +19 -0
- package/dist/internal/features/work/work-docx-paragraph-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-paragraph-identity-import.d.ts +10 -0
- package/dist/internal/features/work/work-docx-paragraph-identity.d.ts +18 -0
- package/dist/internal/features/work/work-docx-paragraph-pagination-import.d.ts +6 -1
- package/dist/internal/features/work/work-docx-paragraph-shading-diagnostics.d.ts +3 -0
- package/dist/internal/features/work/work-docx-paragraph-shading-export.d.ts +5 -0
- package/dist/internal/features/work/work-docx-paragraph-shading-import.d.ts +18 -0
- package/dist/internal/features/work/work-docx-run-formatting-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-settings-preservation.d.ts +10 -0
- package/dist/internal/features/work/work-docx-settings-xml.d.ts +16 -0
- package/dist/internal/features/work/work-docx-style-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-cell-export.d.ts +2 -1
- package/dist/internal/features/work/work-docx-table-cell-import.d.ts +3 -0
- package/dist/internal/features/work/work-docx-table-extension-preservation.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-row-import.d.ts +2 -0
- package/dist/internal/features/work/work-docx-table-sizing-import.d.ts +1 -0
- package/dist/internal/features/work/work-docx-theme-reference.d.ts +23 -0
- package/dist/internal/features/work/work-docx-theme.d.ts +4 -1
- package/dist/internal/features/work/work-docx-twips.d.ts +12 -0
- package/dist/internal/features/work/work-file-contract.d.ts +1 -0
- package/dist/internal/features/work/work-file-io.d.ts +1 -1
- package/dist/internal/features/work/work-markdown-extensions.d.ts +4 -1
- package/dist/internal/features/work/work-ooxml-package-preservation.d.ts +12 -0
- package/dist/internal/features/work/work-ooxml-package-security.d.ts +6 -0
- package/dist/internal/features/work/work-ooxml-relationship-preservation.d.ts +10 -0
- package/dist/internal/features/work/work-ooxml-xml.d.ts +2 -0
- package/dist/internal/features/work/work-pdf-export.d.ts +10 -0
- package/dist/internal/features/work/work-repository.d.ts +2 -0
- package/dist/internal/features/work/work-types.d.ts +15 -2
- package/dist/internal/kernel/office-kernel-client-types.d.ts +1 -0
- package/dist/internal/kernel/office-kernel-protocol.d.ts +7 -0
- package/dist/internal/kernel/office-kernel-version.d.ts +1 -1
- package/dist/office-kernel.wasm +0 -0
- package/dist/office-kernel.worker.js +93 -41
- package/dist/react.d.ts +18 -12
- package/dist/react.js +1 -1
- package/dist/styles.css +1367 -16
- package/dist/vue.d.ts +48 -5
- package/dist/vue.js +42 -3
- package/dist/web-component.d.ts +24 -2
- package/dist/web-component.js +101 -2
- package/docs/latest/en/browser-editor-architecture.md +262 -47
- package/package.json +29 -4
- package/dist/0~152.js +0 -94
- package/dist/0~2582.js +0 -485
- package/dist/0~4750.js +0 -939
- package/dist/0~5861.js +0 -596
- package/dist/0~work-document-extensions.js +0 -3045
- package/dist/0~work-document-model-codec.js +0 -42
- package/dist/0~work-docx-bibliography.js +0 -347
- package/dist/0~work-docx-page-color.js +0 -42
- package/dist/2881.js +0 -1455
- package/dist/8728.js +0 -723
|
@@ -11,11 +11,11 @@ import extension_underline from "@tiptap/extension-underline";
|
|
|
11
11
|
import { EditorContent, useEditor } from "@tiptap/react";
|
|
12
12
|
import starter_kit from "@tiptap/starter-kit";
|
|
13
13
|
import { canUngroupPresentationElements, withPresentationDesign, groupPresentationElements, expandPresentationGroupSelection, ungroupPresentationElements, canGroupPresentationElements, presentationSlideView, applyPresentationLayout, presentationSelectionUnits, remapPresentationGroupPaths } from "./0~1403.js";
|
|
14
|
-
import { createOfficeId as createWorkId } from "./
|
|
14
|
+
import { createOfficeId as createWorkId } from "./5184.js";
|
|
15
15
|
import { OfficeTableInsertPopover, readOfficeFileAsDataUrl } from "./0~9445.js";
|
|
16
16
|
import { normalizePresentationChartLegendPosition, presentationChartDataLabelPositions, presentationChartDataLabelText, normalizePresentationBubbleSizeRepresents, parsePresentationChartCategories, presentationChartXValues, withPresentationChartLayout, presentationChartTypeLabel, presentationChartAxes, withPresentationChartSeriesAnalysis, presentationChartUsesNumericXAxis, presentationChartSupportsSeriesMarkers, presentationChartBubbleSizes, createPresentationChartElement, parsePresentationChartValueDraft, normalizePresentationChartDataLabelPosition, presentationChartSupportsAxisTitles, withPresentationChartDataLabels, withPresentationChartType, createPresentationChartSeries, presentationChartErrorBarCount, normalizePresentationScatterStyle, withPresentationChartSeriesStyle, normalizePresentationBubbleScale, presentationChartDataLabelPositionLabel, presentationChartShowsLegend, presentationChartTrendlineCount, presentationChartHasDataLabels, normalizeDoughnutHoleSize, withPresentationChartAxes } from "./0~work-presentation-charts.js";
|
|
17
17
|
import { spreadsheetChartSeriesLayout, workSpreadsheetChartSupportsGrouping, normalizeWorkSpreadsheetChartSmoothLines, workSpreadsheetChartAxisIsValueAxis, fitSpreadsheetTrendline, spreadsheetChartSeriesLegendColor, normalizeWorkSpreadsheetChartSeriesStyle, spreadsheetChartCategoryVisualIndex, errorBarSourceValues, normalizeWorkSpreadsheetErrorBars, workSpreadsheetChartSupportsTrendlines, normalizeWorkSpreadsheetChartLegendOverlay, normalizeWorkSpreadsheetChartGapWidth, spreadsheetChartCategoryLabelVisible, spreadsheetChartAxisLabelLayout, workSpreadsheetChartSupportsSmoothLines, workSpreadsheetChartGroupingIsStacked, normalizeWorkSpreadsheetChartGrouping, workSpreadsheetChartSupportsBarSpacing, workSpreadsheetChartSupportsErrorBars, spreadsheetChartSeriesLineStyle, workSpreadsheetChartAxisDefaultLabelPosition, workSpreadsheetChartSupportsSeriesAnalysis, workSpreadsheetChartAxisIsCategoryAxis, spreadsheetErrorBarAmounts, spreadsheetChartAxisValueRatio, spreadsheetChartAxisScale, normalizeWorkSpreadsheetChartOverlap, spreadsheetChartBarGeometry, workSpreadsheetChartAxisShowsMajorGridlinesByDefault, spreadsheetChartAxisGridlinesVisible, normalizeWorkSpreadsheetTrendline, roundChartNumber, formatSpreadsheetChartAxisNumber, spreadsheetChartSeriesFillStyle } from "./8715.js";
|
|
18
|
-
import {
|
|
18
|
+
import { officePresenceColorStyle, office_text_field_OfficeTextArea, stepOfficeZoom, useOfficeEditorWheelZoom, useOfficeRemoteParticipants, button_Button, useOfficePublishPresenceLocation, CommittedOfficeTextArea, CommittedOfficeTextField, office_text_field_OfficeTextField, useDialogFocusScope, icon_button_IconButton, office_text_field_OfficeFileInput } from "./0~6090.js";
|
|
19
19
|
import { useOfficeTaskPaneEscape, normalizeOfficeFontFamily, OfficeCheckbox, CommittedOfficeNumberField, useOfficeTaskPaneModal, officeFontFamilyLabel, useOfficeDialog, officeFontFamilies, CollectionState, createOfficeKernelClient, OfficeNumberField, handleOfficeTaskPaneKeyDown } from "./0~7048.js";
|
|
20
20
|
import { WorkspaceContextMenu, isWorkspaceContextMenuKeyboardEvent, WorkOfficeZoomControls, WorkOfficeStatusBar, WorkOfficeRibbon, workspaceContextMenuPosition, OfficeSelect, WorkOfficeRibbonGroup, WorkOfficePreviewBar, WorkOfficeRibbonButton } from "./0~4595.js";
|
|
21
21
|
import { presentationAgentProposalTargets, SpreadsheetChartSeriesStyleEditor, applyPresentationAgentProposalChanges, normalizeOptionalOfficeNumber, SpreadsheetErrorBarEditor, useOfficeHistory, presentationNotesProposalTarget, presentationAgentSelection, SpreadsheetTrendlineEditor, presentationAgentMenuItems } from "./0~3539.js";
|
|
@@ -25,6 +25,8 @@ import { slideTransitionDurationMilliseconds, createWorkSlideTransition, workSli
|
|
|
25
25
|
import { normalizeDocumentHref, DOCUMENT_LINK_VALIDATION_MESSAGE } from "./0~work-document-links.js";
|
|
26
26
|
import { showToast } from "./6489.js";
|
|
27
27
|
import { scaledPresentationVisuals } from "./0~work-presentation-visual-scale.js";
|
|
28
|
+
import { readOfficePresentationCollaboration as readWorkOfficePresentationCollaboration, createOfficePresentationCollaborationBinding as createWorkOfficePresentationCollaborationBinding } from "./4560.js";
|
|
29
|
+
import { useOfficeEditorInitialFocus, useOfficeCollaborationLocationNavigator } from "./432.js";
|
|
28
30
|
var presentation_editor_namespaceObject = {};
|
|
29
31
|
__webpack_require__.r(presentation_editor_namespaceObject);
|
|
30
32
|
__webpack_require__.d(presentation_editor_namespaceObject, {
|
|
@@ -2391,9 +2393,9 @@ function PlaceholderButtons({ onAdd }) {
|
|
|
2391
2393
|
});
|
|
2392
2394
|
}
|
|
2393
2395
|
const PRESENTATION_WORKSPACE_FOCUS_RETRY_FRAMES = 6;
|
|
2394
|
-
function restorePresentationWorkspaceFocus(root, getState) {
|
|
2396
|
+
function restorePresentationWorkspaceFocus(root, getState, focusOrigin = document.activeElement) {
|
|
2395
2397
|
if (!root) return;
|
|
2396
|
-
const commandTrigger =
|
|
2398
|
+
const commandTrigger = focusOrigin;
|
|
2397
2399
|
let lastRestoredTarget = null;
|
|
2398
2400
|
let remainingFrames = PRESENTATION_WORKSPACE_FOCUS_RETRY_FRAMES;
|
|
2399
2401
|
const restore = ()=>{
|
|
@@ -2401,8 +2403,7 @@ function restorePresentationWorkspaceFocus(root, getState) {
|
|
|
2401
2403
|
remainingFrames -= 1;
|
|
2402
2404
|
const state = getState();
|
|
2403
2405
|
if ('normal' === state.viewMode && state.editingElementId) return;
|
|
2404
|
-
const
|
|
2405
|
-
const target = 'normal' === state.viewMode && selectedElementId ? Array.from(root.querySelectorAll('[data-slide-element-id]')).find((candidate)=>candidate.dataset.slideElementId === selectedElementId && 'true' === candidate.dataset.slideElementSelected) : Array.from(root.querySelectorAll('[data-slide-thumbnail]')).find((candidate)=>candidate.dataset.slideId === state.selectedSlideId && candidate.classList.contains('active'));
|
|
2406
|
+
const target = presentationWorkspaceFocusTarget(root, state);
|
|
2406
2407
|
if (!target) return void requestAnimationFrame(restore);
|
|
2407
2408
|
const activeElement = document.activeElement;
|
|
2408
2409
|
const canRestore = activeElement === commandTrigger || activeElement === target || activeElement === lastRestoredTarget || activeElement === document.body || activeElement === document.documentElement || !activeElement?.isConnected;
|
|
@@ -2415,6 +2416,11 @@ function restorePresentationWorkspaceFocus(root, getState) {
|
|
|
2415
2416
|
};
|
|
2416
2417
|
requestAnimationFrame(restore);
|
|
2417
2418
|
}
|
|
2419
|
+
function presentationWorkspaceFocusTarget(root, state) {
|
|
2420
|
+
if ('normal' === state.viewMode && state.editingElementId) return;
|
|
2421
|
+
const selectedElementId = state.selectedElementIds.at(-1);
|
|
2422
|
+
return 'normal' === state.viewMode && selectedElementId ? Array.from(root.querySelectorAll('[data-slide-element-id]')).find((candidate)=>candidate.dataset.slideElementId === selectedElementId && 'true' === candidate.dataset.slideElementSelected) : Array.from(root.querySelectorAll('[data-slide-thumbnail]')).find((candidate)=>candidate.dataset.slideId === state.selectedSlideId && candidate.classList.contains('active'));
|
|
2423
|
+
}
|
|
2418
2424
|
function presentationCommandsWithObjectFocus(commands, restoreFocus) {
|
|
2419
2425
|
const afterSuccessfulCommand = (command)=>(...args)=>{
|
|
2420
2426
|
const result = command(...args);
|
|
@@ -5477,6 +5483,53 @@ function presentationFontFamilyOptions(current) {
|
|
|
5477
5483
|
function normalizePresentationFontFamily(value) {
|
|
5478
5484
|
return normalizeOfficeFontFamily(value);
|
|
5479
5485
|
}
|
|
5486
|
+
function PresentationCollaborationPresenceLayer({ elements, slideId }) {
|
|
5487
|
+
const participants = useOfficeRemoteParticipants().filter((participant)=>participant.location?.kind === 'presentation' && participant.location.slideId === slideId);
|
|
5488
|
+
if (!participants.length) return null;
|
|
5489
|
+
return /*#__PURE__*/ jsx("div", {
|
|
5490
|
+
className: "work-presentation-remote-presence-layer",
|
|
5491
|
+
"aria-hidden": "true",
|
|
5492
|
+
children: participants.flatMap((participant, participantIndex)=>{
|
|
5493
|
+
const location = participant.location;
|
|
5494
|
+
if (location?.kind !== 'presentation') return [];
|
|
5495
|
+
const selected = location.elementIds.flatMap((elementId)=>{
|
|
5496
|
+
const element = elements.find((candidate)=>candidate.id === elementId);
|
|
5497
|
+
return element ? [
|
|
5498
|
+
element
|
|
5499
|
+
] : [];
|
|
5500
|
+
});
|
|
5501
|
+
if (!selected.length) return [
|
|
5502
|
+
/*#__PURE__*/ jsx("span", {
|
|
5503
|
+
className: "work-presentation-remote-slide-marker",
|
|
5504
|
+
"data-activity": participant.activity,
|
|
5505
|
+
"data-participant-id": participant.actor.id,
|
|
5506
|
+
style: {
|
|
5507
|
+
...officePresenceColorStyle(participant),
|
|
5508
|
+
top: 8 + 22 * participantIndex
|
|
5509
|
+
},
|
|
5510
|
+
children: participant.actor.name
|
|
5511
|
+
}, `${participant.presenceId}:slide`)
|
|
5512
|
+
];
|
|
5513
|
+
return selected.map((element, index)=>/*#__PURE__*/ jsx("span", {
|
|
5514
|
+
className: "work-presentation-remote-element",
|
|
5515
|
+
"data-activity": participant.activity,
|
|
5516
|
+
"data-participant-id": participant.actor.id,
|
|
5517
|
+
"data-remote-slide-element-id": element.id,
|
|
5518
|
+
style: {
|
|
5519
|
+
...officePresenceColorStyle(participant),
|
|
5520
|
+
left: `${element.x}%`,
|
|
5521
|
+
top: `${element.y}%`,
|
|
5522
|
+
width: `${element.width}%`,
|
|
5523
|
+
height: `${element.height}%`,
|
|
5524
|
+
transform: element.rotation ? `rotate(${element.rotation}deg)` : void 0
|
|
5525
|
+
},
|
|
5526
|
+
children: 0 === index && /*#__PURE__*/ jsx("span", {
|
|
5527
|
+
children: participant.actor.name
|
|
5528
|
+
})
|
|
5529
|
+
}, `${participant.presenceId}:${element.id}`));
|
|
5530
|
+
})
|
|
5531
|
+
});
|
|
5532
|
+
}
|
|
5480
5533
|
function PresentationSlideThumbnail({ content, slide, index, selected, slideCount, aspectRatio, variant, renderPreview, onFocus, onSelect, onDelete, onNavigate, onContextMenu, onDoubleClick }) {
|
|
5481
5534
|
return /*#__PURE__*/ jsxs("button", {
|
|
5482
5535
|
type: "button",
|
|
@@ -6354,6 +6407,10 @@ function PresentationWorkspace({ activeBackground, activeCommentId, activeElemen
|
|
|
6354
6407
|
]
|
|
6355
6408
|
}, element.id);
|
|
6356
6409
|
}),
|
|
6410
|
+
'slide' === designMode && /*#__PURE__*/ jsx(PresentationCollaborationPresenceLayer, {
|
|
6411
|
+
elements: activeElements,
|
|
6412
|
+
slideId: selectedSlide.id
|
|
6413
|
+
}),
|
|
6357
6414
|
'slide' === designMode && (selectedSlide.comments ?? []).map((comment, index)=>/*#__PURE__*/ jsx("button", {
|
|
6358
6415
|
type: "button",
|
|
6359
6416
|
className: `work-presentation-comment-pin ${comment.id === activeCommentId ? 'active' : ''}`,
|
|
@@ -7804,7 +7861,73 @@ function cancelPresentationFrame(frame) {
|
|
|
7804
7861
|
function presentationFrameTimestamp() {
|
|
7805
7862
|
return "u" < typeof performance ? Date.now() : performance.now();
|
|
7806
7863
|
}
|
|
7864
|
+
const EMPTY_PRESENTATION_PRESENCE_ELEMENT_IDS = [];
|
|
7807
7865
|
function PresentationEditor(props) {
|
|
7866
|
+
if (props.collaboration) return /*#__PURE__*/ jsx(CollaborativePresentationEditor, {
|
|
7867
|
+
...props,
|
|
7868
|
+
collaboration: props.collaboration
|
|
7869
|
+
});
|
|
7870
|
+
return /*#__PURE__*/ jsx(PresentationEditorSurface, {
|
|
7871
|
+
...props
|
|
7872
|
+
});
|
|
7873
|
+
}
|
|
7874
|
+
function CollaborativePresentationEditor(props) {
|
|
7875
|
+
const { collaboration } = props;
|
|
7876
|
+
const collaborationRef = useRef(collaboration);
|
|
7877
|
+
if (collaborationRef.current !== collaboration) throw new Error('PresentationEditor collaboration sessions cannot be replaced while mounted. Remount the editor for another shared presentation.');
|
|
7878
|
+
const [sharedContent, setSharedContent] = useState(()=>readWorkOfficePresentationCollaboration(collaboration));
|
|
7879
|
+
const contentRef = useRef(sharedContent);
|
|
7880
|
+
const bindingRef = useRef(void 0);
|
|
7881
|
+
const [, refreshHistory] = useState(0);
|
|
7882
|
+
const onChangeRef = useRef(props.onChange);
|
|
7883
|
+
onChangeRef.current = props.onChange;
|
|
7884
|
+
contentRef.current = sharedContent;
|
|
7885
|
+
useEffect(()=>{
|
|
7886
|
+
const binding = createWorkOfficePresentationCollaborationBinding(collaboration);
|
|
7887
|
+
bindingRef.current = binding;
|
|
7888
|
+
const unsubscribeContent = binding.subscribe(({ content })=>{
|
|
7889
|
+
contentRef.current = content;
|
|
7890
|
+
setSharedContent(content);
|
|
7891
|
+
onChangeRef.current(content);
|
|
7892
|
+
});
|
|
7893
|
+
const unsubscribeError = binding.subscribeError((error)=>{
|
|
7894
|
+
queueMicrotask(()=>{
|
|
7895
|
+
throw error;
|
|
7896
|
+
});
|
|
7897
|
+
});
|
|
7898
|
+
const unsubscribeHistory = binding.subscribeHistory(()=>refreshHistory((value)=>value + 1));
|
|
7899
|
+
const current = binding.content();
|
|
7900
|
+
contentRef.current = current;
|
|
7901
|
+
setSharedContent(current);
|
|
7902
|
+
return ()=>{
|
|
7903
|
+
unsubscribeContent();
|
|
7904
|
+
unsubscribeError();
|
|
7905
|
+
unsubscribeHistory();
|
|
7906
|
+
if (bindingRef.current === binding) bindingRef.current = void 0;
|
|
7907
|
+
binding.destroy();
|
|
7908
|
+
};
|
|
7909
|
+
}, [
|
|
7910
|
+
collaboration
|
|
7911
|
+
]);
|
|
7912
|
+
const commit = useCallback((next)=>{
|
|
7913
|
+
const previous = contentRef.current;
|
|
7914
|
+
if (bindingRef.current?.replace(previous, next)) contentRef.current = next;
|
|
7915
|
+
}, []);
|
|
7916
|
+
const history = {
|
|
7917
|
+
canRedo: bindingRef.current?.canRedo() ?? false,
|
|
7918
|
+
canUndo: bindingRef.current?.canUndo() ?? false,
|
|
7919
|
+
redo: ()=>bindingRef.current?.redo() ?? false,
|
|
7920
|
+
undo: ()=>bindingRef.current?.undo() ?? false
|
|
7921
|
+
};
|
|
7922
|
+
return /*#__PURE__*/ jsx(PresentationEditorSurface, {
|
|
7923
|
+
...props,
|
|
7924
|
+
content: sharedContent,
|
|
7925
|
+
collaborationHistory: history,
|
|
7926
|
+
onChange: commit,
|
|
7927
|
+
preview: props.preview || 'edit' !== collaboration.mode
|
|
7928
|
+
});
|
|
7929
|
+
}
|
|
7930
|
+
function PresentationEditorSurface(props) {
|
|
7808
7931
|
const { content, fileActions, preview } = props;
|
|
7809
7932
|
if (preview) return /*#__PURE__*/ jsxs("section", {
|
|
7810
7933
|
className: "work-presentation-editor preview",
|
|
@@ -7828,7 +7951,7 @@ function PresentationEditor(props) {
|
|
|
7828
7951
|
initialSlide: initialSlide
|
|
7829
7952
|
});
|
|
7830
7953
|
}
|
|
7831
|
-
function PresentationEditingSurface({ initialSlide, content, preview, saveStatus = '已自动保存', fileActions, kernelWasmUrl, onChange, onAgentRequest, onStartSlideshow }) {
|
|
7954
|
+
function PresentationEditingSurface({ initialSlide, autoFocus = true, collaborationHistory, content, preview, saveStatus = '已自动保存', fileActions, kernelWasmUrl, onChange, onAgentRequest, onStartSlideshow }) {
|
|
7832
7955
|
const contentRef = useRef(content);
|
|
7833
7956
|
const presentationCommandsRef = useRef(null);
|
|
7834
7957
|
const [selectedSlideId, setSelectedSlideId] = useState(content.slides[0]?.id ?? '');
|
|
@@ -7867,6 +7990,45 @@ function PresentationEditingSurface({ initialSlide, content, preview, saveStatus
|
|
|
7867
7990
|
const selectedMaster = designContent.masters?.find((master)=>master.id === selectedLayout?.masterId) ?? designContent.masters?.[0];
|
|
7868
7991
|
const activeElements = 'layout' === designMode ? selectedLayout?.elements ?? [] : 'master' === designMode ? selectedMaster?.elements ?? [] : selectedSlide?.elements ?? [];
|
|
7869
7992
|
const selection = usePresentationSelection(activeElements);
|
|
7993
|
+
const presentationPresenceLocation = useMemo(()=>({
|
|
7994
|
+
kind: 'presentation',
|
|
7995
|
+
slideId: selectedSlide.id,
|
|
7996
|
+
elementIds: 'slide' === designMode ? selection.selectedElementIds : EMPTY_PRESENTATION_PRESENCE_ELEMENT_IDS
|
|
7997
|
+
}), [
|
|
7998
|
+
designMode,
|
|
7999
|
+
selectedSlide.id,
|
|
8000
|
+
selection.selectedElementIds
|
|
8001
|
+
]);
|
|
8002
|
+
useOfficePublishPresenceLocation(presentationPresenceLocation);
|
|
8003
|
+
const navigateToPresentationParticipant = useCallback((participant)=>{
|
|
8004
|
+
const location = participant.location;
|
|
8005
|
+
if (location?.kind !== 'presentation') return false;
|
|
8006
|
+
const slide = content.slides.find((candidate)=>candidate.id === location.slideId);
|
|
8007
|
+
if (!slide) return false;
|
|
8008
|
+
const elementIds = location.elementIds.filter((elementId)=>slide.elements.some((element)=>element.id === elementId));
|
|
8009
|
+
setDesignMode('slide');
|
|
8010
|
+
setViewMode('normal');
|
|
8011
|
+
setSelectedSlideId(slide.id);
|
|
8012
|
+
selection.replace(elementIds);
|
|
8013
|
+
requestAnimationFrame(()=>{
|
|
8014
|
+
const root = presentationRootRef.current;
|
|
8015
|
+
if (!root) return;
|
|
8016
|
+
const selectedElementId = elementIds.at(-1);
|
|
8017
|
+
const target = selectedElementId ? Array.from(root.querySelectorAll('[data-slide-element-id]')).find((candidate)=>candidate.dataset.slideElementId === selectedElementId) : Array.from(root.querySelectorAll('[data-slide-thumbnail]')).find((candidate)=>candidate.dataset.slideId === slide.id);
|
|
8018
|
+
target?.scrollIntoView({
|
|
8019
|
+
block: 'nearest',
|
|
8020
|
+
inline: 'nearest'
|
|
8021
|
+
});
|
|
8022
|
+
target?.focus({
|
|
8023
|
+
preventScroll: true
|
|
8024
|
+
});
|
|
8025
|
+
});
|
|
8026
|
+
return true;
|
|
8027
|
+
}, [
|
|
8028
|
+
content.slides,
|
|
8029
|
+
selection.replace
|
|
8030
|
+
]);
|
|
8031
|
+
useOfficeCollaborationLocationNavigator(navigateToPresentationParticipant);
|
|
7870
8032
|
const selectedElements = selectedPresentationElements(activeElements, selection.selectedElementIds);
|
|
7871
8033
|
const selectionUnits = presentationSelectionUnits(activeElements, selection.selectedElementIds);
|
|
7872
8034
|
const selectedElementId = selection.selectedElementIds.at(-1) ?? null;
|
|
@@ -7882,6 +8044,14 @@ function PresentationEditingSurface({ initialSlide, content, preview, saveStatus
|
|
|
7882
8044
|
selectedSlideId: selectedSlide.id,
|
|
7883
8045
|
viewMode
|
|
7884
8046
|
};
|
|
8047
|
+
useOfficeEditorInitialFocus({
|
|
8048
|
+
enabled: autoFocus,
|
|
8049
|
+
getTarget: ()=>{
|
|
8050
|
+
const root = presentationRootRef.current;
|
|
8051
|
+
return root ? presentationWorkspaceFocusTarget(root, workspaceFocusStateRef.current) ?? null : null;
|
|
8052
|
+
},
|
|
8053
|
+
isTargetReady: (target)=>target.tabIndex >= 0 && !target.hasAttribute('disabled') && 'true' !== target.getAttribute('aria-disabled')
|
|
8054
|
+
});
|
|
7885
8055
|
useEffect(()=>{
|
|
7886
8056
|
setDismissedChartPaneElementId(null);
|
|
7887
8057
|
}, [
|
|
@@ -7953,7 +8123,7 @@ function PresentationEditingSurface({ initialSlide, content, preview, saveStatus
|
|
|
7953
8123
|
selectedSlideId,
|
|
7954
8124
|
selection.clear
|
|
7955
8125
|
]);
|
|
7956
|
-
const
|
|
8126
|
+
const controlledHistory = usePresentationHistory({
|
|
7957
8127
|
content,
|
|
7958
8128
|
onChange,
|
|
7959
8129
|
selectedSlideId,
|
|
@@ -7962,6 +8132,7 @@ function PresentationEditingSurface({ initialSlide, content, preview, saveStatus
|
|
|
7962
8132
|
selection.clear();
|
|
7963
8133
|
}
|
|
7964
8134
|
});
|
|
8135
|
+
const history = collaborationHistory ?? controlledHistory;
|
|
7965
8136
|
const presentationSlides = usePresentationSlideCommands({
|
|
7966
8137
|
content,
|
|
7967
8138
|
onChange,
|