@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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
import type { WorkDocumentBibliography, WorkDocumentComment, WorkDocumentContent } from '../features/work/work-types';
|
|
3
|
+
import { type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration';
|
|
4
|
+
export interface WorkOfficeDocumentSidecars {
|
|
5
|
+
pageColor?: string;
|
|
6
|
+
trackChanges?: boolean;
|
|
7
|
+
comments?: WorkDocumentComment[];
|
|
8
|
+
bibliography?: WorkDocumentBibliography;
|
|
9
|
+
}
|
|
10
|
+
export declare function assertWorkOfficeDocumentSidecarsEmpty(session: WorkOfficeCollaborationSession): void;
|
|
11
|
+
export declare function initializeWorkOfficeDocumentSidecars(session: WorkOfficeCollaborationSession, content: WorkDocumentContent): void;
|
|
12
|
+
export declare function readWorkOfficeDocumentSidecars(session: WorkOfficeCollaborationSession): WorkOfficeDocumentSidecars;
|
|
13
|
+
export declare function updateWorkOfficeDocumentSidecars(session: WorkOfficeCollaborationSession, previous: WorkDocumentContent, next: WorkDocumentContent, origin: WorkOfficeCollaborationOrigin): boolean;
|
|
14
|
+
export declare function workOfficeDocumentSidecarUndoScope(session: WorkOfficeCollaborationSession): Array<Y.Map<unknown> | Y.Array<string>>;
|
|
15
|
+
export declare function workOfficeDocumentSidecarsChanged(session: WorkOfficeCollaborationSession, transaction: Y.Transaction): boolean;
|
|
16
|
+
export declare function validatedWorkOfficeDocumentSidecars(content: WorkDocumentContent): WorkOfficeDocumentSidecars;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type Extensions } from '@tiptap/core';
|
|
2
|
+
import * as Y from 'yjs';
|
|
3
|
+
import { createWorkDocumentExtensions } from '../features/work/work-document-extensions';
|
|
4
|
+
import type { WorkDocumentContent, WorkDocumentNode } from '../features/work/work-types';
|
|
5
|
+
import { type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration';
|
|
6
|
+
export interface WorkOfficeDocumentCollaborationBindingOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Behavior-only extensions are supported. Node and mark extensions must be
|
|
9
|
+
* part of the versioned Office schema before they can enter shared content.
|
|
10
|
+
*/
|
|
11
|
+
additionalExtensions?: Extensions;
|
|
12
|
+
captureTimeoutMs?: number;
|
|
13
|
+
onFirstRender?: () => void;
|
|
14
|
+
origin?: WorkOfficeCollaborationOrigin;
|
|
15
|
+
workExtensions?: Omit<Parameters<typeof createWorkDocumentExtensions>[0], 'collaborative'>;
|
|
16
|
+
}
|
|
17
|
+
export interface WorkOfficeDocumentCollaborationChange {
|
|
18
|
+
content: WorkDocumentContent;
|
|
19
|
+
local: boolean;
|
|
20
|
+
origin: unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface WorkOfficeDocumentCollaborationBinding {
|
|
23
|
+
readonly extensions: Extensions;
|
|
24
|
+
readonly fragment: Y.XmlFragment;
|
|
25
|
+
readonly origin: WorkOfficeCollaborationOrigin;
|
|
26
|
+
content(): WorkDocumentContent;
|
|
27
|
+
updateSidecars(previous: WorkDocumentContent, next: WorkDocumentContent): boolean;
|
|
28
|
+
canUndo(): boolean;
|
|
29
|
+
canRedo(): boolean;
|
|
30
|
+
undo(): boolean;
|
|
31
|
+
redo(): boolean;
|
|
32
|
+
stopCapturing(): void;
|
|
33
|
+
subscribe(listener: (change: WorkOfficeDocumentCollaborationChange) => void): () => void;
|
|
34
|
+
subscribeError(listener: (error: unknown) => void): () => void;
|
|
35
|
+
subscribeHistory(listener: () => void): () => void;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
}
|
|
38
|
+
export declare function initializeWorkOfficeDocumentCollaboration(session: WorkOfficeCollaborationSession, content: WorkDocumentContent): {
|
|
39
|
+
initialized: boolean;
|
|
40
|
+
content: WorkDocumentContent;
|
|
41
|
+
};
|
|
42
|
+
export declare function readWorkOfficeDocumentCollaboration(session: WorkOfficeCollaborationSession): WorkDocumentContent;
|
|
43
|
+
export declare function createWorkOfficeDocumentCollaborationBinding(session: WorkOfficeCollaborationSession, options?: WorkOfficeDocumentCollaborationBindingOptions): WorkOfficeDocumentCollaborationBinding;
|
|
44
|
+
export declare function workOfficeDocumentCollaborationFragment(session: WorkOfficeCollaborationSession): Y.XmlFragment;
|
|
45
|
+
export declare function workOfficeDocumentCollaborationNode(session: WorkOfficeCollaborationSession): WorkDocumentNode;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WorkMarkdownContent } from '../features/work/work-types';
|
|
2
|
+
import { type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration';
|
|
3
|
+
export interface WorkOfficeMarkdownCollaborationChange {
|
|
4
|
+
content: WorkMarkdownContent;
|
|
5
|
+
local: boolean;
|
|
6
|
+
origin: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkOfficeMarkdownCollaborationBindingOptions {
|
|
9
|
+
origin?: WorkOfficeCollaborationOrigin;
|
|
10
|
+
captureTimeoutMs?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkOfficeMarkdownCollaborationBinding {
|
|
13
|
+
readonly origin: WorkOfficeCollaborationOrigin;
|
|
14
|
+
content(): WorkMarkdownContent;
|
|
15
|
+
replace(markdown: string): boolean;
|
|
16
|
+
canUndo(): boolean;
|
|
17
|
+
canRedo(): boolean;
|
|
18
|
+
undo(): boolean;
|
|
19
|
+
redo(): boolean;
|
|
20
|
+
stopCapturing(): void;
|
|
21
|
+
subscribe(listener: (change: WorkOfficeMarkdownCollaborationChange) => void): () => void;
|
|
22
|
+
subscribeHistory(listener: () => void): () => void;
|
|
23
|
+
destroy(): void;
|
|
24
|
+
}
|
|
25
|
+
export declare function initializeWorkOfficeMarkdownCollaboration(session: WorkOfficeCollaborationSession, content: WorkMarkdownContent): {
|
|
26
|
+
initialized: boolean;
|
|
27
|
+
content: WorkMarkdownContent;
|
|
28
|
+
};
|
|
29
|
+
export declare function readWorkOfficeMarkdownCollaboration(session: WorkOfficeCollaborationSession): WorkMarkdownContent;
|
|
30
|
+
export declare function replaceWorkOfficeMarkdownCollaboration(session: WorkOfficeCollaborationSession, markdown: string, origin?: WorkOfficeCollaborationOrigin): boolean;
|
|
31
|
+
export declare function createWorkOfficeMarkdownCollaborationBinding(session: WorkOfficeCollaborationSession, options?: WorkOfficeMarkdownCollaborationBindingOptions): WorkOfficeMarkdownCollaborationBinding;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
import type { WorkPdfCollaborationContent } from './office-pdf-collaboration-types';
|
|
3
|
+
export declare function appendWorkOfficePdfRecordClaims(claims: Y.Array<string>, previous: WorkPdfCollaborationContent | undefined, next: WorkPdfCollaborationContent): void;
|
|
4
|
+
export declare function assertWorkOfficePdfRecordClaims(claims: Y.Array<string>, content: WorkPdfCollaborationContent): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
import { type WorkOfficePdfRecordCollectionRoots } from './office-pdf-collaboration-records';
|
|
3
|
+
import type { WorkPdfCollaborationContent } from './office-pdf-collaboration-types';
|
|
4
|
+
export { validateWorkOfficePdfCollaborationContent } from './office-pdf-collaboration-validation';
|
|
5
|
+
export declare const PDF_SOURCE_ROOT = "pdf.source";
|
|
6
|
+
export declare const PDF_SOURCE_IDENTITIES_ROOT = "pdf.source-identities";
|
|
7
|
+
export declare const PDF_RECORD_CLAIMS_ROOT = "pdf.record-claims";
|
|
8
|
+
export interface WorkOfficePdfRoots {
|
|
9
|
+
source: Y.Map<unknown>;
|
|
10
|
+
sourceIdentities: Y.Array<string>;
|
|
11
|
+
annotations: WorkOfficePdfRecordCollectionRoots;
|
|
12
|
+
formValues: WorkOfficePdfRecordCollectionRoots;
|
|
13
|
+
signaturePlacements: WorkOfficePdfRecordCollectionRoots;
|
|
14
|
+
redactionProposals: WorkOfficePdfRecordCollectionRoots;
|
|
15
|
+
pageOperations: WorkOfficePdfRecordCollectionRoots;
|
|
16
|
+
reviewDecisions: WorkOfficePdfRecordCollectionRoots;
|
|
17
|
+
recordClaims: Y.Array<string>;
|
|
18
|
+
}
|
|
19
|
+
export declare function workOfficePdfRoots(document: Y.Doc, rootName: (suffix: string) => string): WorkOfficePdfRoots;
|
|
20
|
+
export declare function initializeWorkOfficePdfRoots(roots: WorkOfficePdfRoots, content: WorkPdfCollaborationContent): void;
|
|
21
|
+
export declare function readWorkOfficePdfRoots(roots: WorkOfficePdfRoots): WorkPdfCollaborationContent;
|
|
22
|
+
export declare function patchWorkOfficePdfRoots(roots: WorkOfficePdfRoots, previous: WorkPdfCollaborationContent, next: WorkPdfCollaborationContent): void;
|
|
23
|
+
export declare function assertWorkOfficePdfRootsEmpty(roots: WorkOfficePdfRoots): void;
|
|
24
|
+
export declare function workOfficePdfUndoScope(roots: WorkOfficePdfRoots): Array<Y.Map<unknown> | Y.Array<string>>;
|
|
25
|
+
export declare function workOfficePdfIrreversibleScope(roots: WorkOfficePdfRoots): Array<Y.Map<unknown> | Y.Array<string>>;
|
|
26
|
+
export declare function workOfficePdfIrreversibleChange(roots: WorkOfficePdfRoots, transaction: Y.Transaction): boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
export interface WorkOfficePdfRecordCollectionRoots {
|
|
3
|
+
presence: Y.Map<unknown>;
|
|
4
|
+
fields: Y.Map<unknown>;
|
|
5
|
+
order: Y.Array<string>;
|
|
6
|
+
}
|
|
7
|
+
export declare function workOfficePdfRecordCollectionRoots(document: Y.Doc, rootName: (suffix: string) => string, name: string): WorkOfficePdfRecordCollectionRoots;
|
|
8
|
+
export declare function patchWorkOfficePdfRecords<T extends {
|
|
9
|
+
id: string;
|
|
10
|
+
}>(roots: WorkOfficePdfRecordCollectionRoots, previous: readonly T[], next: readonly T[], label: string): void;
|
|
11
|
+
export declare function readWorkOfficePdfRecords<T extends Record<string, unknown> & {
|
|
12
|
+
id: string;
|
|
13
|
+
}>(roots: WorkOfficePdfRecordCollectionRoots, label: string): T[];
|
|
14
|
+
export declare function assertWorkOfficePdfRecordCollectionEmpty(roots: WorkOfficePdfRecordCollectionRoots): boolean;
|
|
15
|
+
export declare function workOfficePdfRecordCollectionUndoScope(roots: WorkOfficePdfRecordCollectionRoots): Array<Y.Map<unknown> | Y.Array<string>>;
|
|
16
|
+
/**
|
|
17
|
+
* Reports whether a transaction changed one recursively addressed record
|
|
18
|
+
* field. This lets format bindings keep an otherwise mutable collection on
|
|
19
|
+
* the local undo stack while treating selected fields as irreversible.
|
|
20
|
+
*/
|
|
21
|
+
export declare function workOfficePdfRecordFieldChanged(transaction: Y.Transaction, roots: WorkOfficePdfRecordCollectionRoots, path: readonly string[]): boolean;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export interface WorkPdfCollaborationSource {
|
|
2
|
+
/** Lowercase SHA-256 digest of the immutable source bytes. */
|
|
3
|
+
sha256: string;
|
|
4
|
+
byteLength: number;
|
|
5
|
+
pageCount: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WorkPdfCollaborationAnnotation {
|
|
8
|
+
id: string;
|
|
9
|
+
pageIndex: number;
|
|
10
|
+
source: 'base' | 'created';
|
|
11
|
+
/** Portable, JSON-compatible annotation object including matching id/pageIndex. */
|
|
12
|
+
annotation: Record<string, unknown>;
|
|
13
|
+
/** Durable tombstone. Annotation records are never physically removed. */
|
|
14
|
+
deleted?: true;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkPdfCollaborationFormValue {
|
|
17
|
+
/** Stable fully-qualified PDF field name. */
|
|
18
|
+
id: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
export interface WorkPdfCollaborationSignatureAppearance {
|
|
22
|
+
/** Host-owned encrypted/private asset reference; signature bytes are not in Yjs. */
|
|
23
|
+
assetId: string;
|
|
24
|
+
sha256: string;
|
|
25
|
+
byteLength: number;
|
|
26
|
+
mimeType: string;
|
|
27
|
+
}
|
|
28
|
+
export interface WorkPdfCollaborationSignaturePlacement {
|
|
29
|
+
id: string;
|
|
30
|
+
annotationId: string;
|
|
31
|
+
pageIndex: number;
|
|
32
|
+
kind: 'signature' | 'initials';
|
|
33
|
+
actorId: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
appearance: WorkPdfCollaborationSignatureAppearance;
|
|
36
|
+
}
|
|
37
|
+
export interface WorkPdfCollaborationRect {
|
|
38
|
+
left: number;
|
|
39
|
+
top: number;
|
|
40
|
+
right: number;
|
|
41
|
+
bottom: number;
|
|
42
|
+
}
|
|
43
|
+
export interface WorkPdfCollaborationRedactionProposal {
|
|
44
|
+
id: string;
|
|
45
|
+
pageIndex: number;
|
|
46
|
+
rects: WorkPdfCollaborationRect[];
|
|
47
|
+
proposedBy: string;
|
|
48
|
+
proposedAt: string;
|
|
49
|
+
reason?: string;
|
|
50
|
+
text?: string;
|
|
51
|
+
}
|
|
52
|
+
interface WorkPdfCollaborationPageOperationBase {
|
|
53
|
+
id: string;
|
|
54
|
+
proposedBy: string;
|
|
55
|
+
proposedAt: string;
|
|
56
|
+
}
|
|
57
|
+
export interface WorkPdfCollaborationRotatePagesOperation extends WorkPdfCollaborationPageOperationBase {
|
|
58
|
+
kind: 'rotate';
|
|
59
|
+
pageIndices: number[];
|
|
60
|
+
degrees: 90 | 180 | 270;
|
|
61
|
+
}
|
|
62
|
+
export interface WorkPdfCollaborationDeletePagesOperation extends WorkPdfCollaborationPageOperationBase {
|
|
63
|
+
kind: 'delete';
|
|
64
|
+
pageIndices: number[];
|
|
65
|
+
}
|
|
66
|
+
export interface WorkPdfCollaborationReorderPagesOperation extends WorkPdfCollaborationPageOperationBase {
|
|
67
|
+
kind: 'reorder';
|
|
68
|
+
/** Complete zero-based permutation of immutable source pages. */
|
|
69
|
+
pageOrder: number[];
|
|
70
|
+
}
|
|
71
|
+
export type WorkPdfCollaborationPageOperation = WorkPdfCollaborationRotatePagesOperation | WorkPdfCollaborationDeletePagesOperation | WorkPdfCollaborationReorderPagesOperation;
|
|
72
|
+
export interface WorkPdfCollaborationReviewDecision {
|
|
73
|
+
id: string;
|
|
74
|
+
targetKind: 'redaction' | 'page-operation';
|
|
75
|
+
targetId: string;
|
|
76
|
+
decision: 'approve' | 'reject';
|
|
77
|
+
actorId: string;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
}
|
|
80
|
+
export interface WorkPdfCollaborationContent {
|
|
81
|
+
type: 'pdf';
|
|
82
|
+
source: WorkPdfCollaborationSource;
|
|
83
|
+
annotations: WorkPdfCollaborationAnnotation[];
|
|
84
|
+
formValues: WorkPdfCollaborationFormValue[];
|
|
85
|
+
signaturePlacements: WorkPdfCollaborationSignaturePlacement[];
|
|
86
|
+
redactionProposals: WorkPdfCollaborationRedactionProposal[];
|
|
87
|
+
pageOperations: WorkPdfCollaborationPageOperation[];
|
|
88
|
+
reviewDecisions: WorkPdfCollaborationReviewDecision[];
|
|
89
|
+
}
|
|
90
|
+
export declare function createWorkPdfCollaborationContent(source: WorkPdfCollaborationSource): WorkPdfCollaborationContent;
|
|
91
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkPdfCollaborationContent } from './office-pdf-collaboration-types';
|
|
2
|
+
export declare function validateWorkOfficePdfCollaborationContent(content: WorkPdfCollaborationContent): WorkPdfCollaborationContent;
|
|
3
|
+
export declare function validateSharedWorkOfficePdfCollaborationContent(content: WorkPdfCollaborationContent): WorkPdfCollaborationContent;
|
|
4
|
+
export declare function invalidWorkOfficePdfShared(label: string): never;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration';
|
|
2
|
+
import type { WorkPdfCollaborationContent, WorkPdfCollaborationSource } from './office-pdf-collaboration-types';
|
|
3
|
+
export type * from './office-pdf-collaboration-types';
|
|
4
|
+
export interface WorkOfficePdfCollaborationChange {
|
|
5
|
+
content: WorkPdfCollaborationContent;
|
|
6
|
+
local: boolean;
|
|
7
|
+
origin: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkOfficePdfCollaborationBindingOptions {
|
|
10
|
+
captureTimeoutMs?: number;
|
|
11
|
+
origin?: WorkOfficeCollaborationOrigin;
|
|
12
|
+
}
|
|
13
|
+
export interface WorkOfficePdfCollaborationBinding {
|
|
14
|
+
readonly origin: WorkOfficeCollaborationOrigin;
|
|
15
|
+
content(): WorkPdfCollaborationContent;
|
|
16
|
+
replace(previous: WorkPdfCollaborationContent, next: WorkPdfCollaborationContent): boolean;
|
|
17
|
+
canUndo(): boolean;
|
|
18
|
+
canRedo(): boolean;
|
|
19
|
+
undo(): boolean;
|
|
20
|
+
redo(): boolean;
|
|
21
|
+
stopCapturing(): void;
|
|
22
|
+
subscribe(listener: (change: WorkOfficePdfCollaborationChange) => void): () => void;
|
|
23
|
+
subscribeError(listener: (error: unknown) => void): () => void;
|
|
24
|
+
subscribeHistory(listener: () => void): () => void;
|
|
25
|
+
destroy(): void;
|
|
26
|
+
}
|
|
27
|
+
export declare function initializeWorkOfficePdfCollaboration(session: WorkOfficeCollaborationSession, content: WorkPdfCollaborationContent): {
|
|
28
|
+
initialized: boolean;
|
|
29
|
+
content: WorkPdfCollaborationContent;
|
|
30
|
+
};
|
|
31
|
+
export declare function readWorkOfficePdfCollaboration(session: WorkOfficeCollaborationSession): WorkPdfCollaborationContent;
|
|
32
|
+
export declare function assertWorkOfficePdfCollaborationSource(session: WorkOfficeCollaborationSession, source: WorkPdfCollaborationSource): void;
|
|
33
|
+
export declare function readWorkOfficePdfCollaborationSource(session: WorkOfficeCollaborationSession): WorkPdfCollaborationSource;
|
|
34
|
+
export declare function replaceWorkOfficePdfCollaboration(session: WorkOfficeCollaborationSession, previous: WorkPdfCollaborationContent, next: WorkPdfCollaborationContent, origin?: WorkOfficeCollaborationOrigin): boolean;
|
|
35
|
+
export declare function createWorkOfficePdfCollaborationBinding(session: WorkOfficeCollaborationSession, options?: WorkOfficePdfCollaborationBindingOptions): WorkOfficePdfCollaborationBinding;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { WorkPresentationContent } from '../features/work/work-types';
|
|
3
|
+
export { validateWorkOfficePresentationContent } from './office-presentation-collaboration-validation';
|
|
4
|
+
export declare const PRESENTATION_OPTIONS_ROOT = "presentation.options";
|
|
5
|
+
export declare const PRESENTATION_SLIDES_ROOT = "presentation.slides";
|
|
6
|
+
export declare const PRESENTATION_SLIDE_ORDER_ROOT = "presentation.slide-order";
|
|
7
|
+
export declare const PRESENTATION_MASTERS_ROOT = "presentation.masters";
|
|
8
|
+
export declare const PRESENTATION_MASTER_ORDER_ROOT = "presentation.master-order";
|
|
9
|
+
export declare const PRESENTATION_LAYOUTS_ROOT = "presentation.layouts";
|
|
10
|
+
export declare const PRESENTATION_LAYOUT_ORDER_ROOT = "presentation.layout-order";
|
|
11
|
+
export interface WorkOfficePresentationRoots {
|
|
12
|
+
options: Y.Map<unknown>;
|
|
13
|
+
slides: Y.Map<unknown>;
|
|
14
|
+
slideOrder: Y.Array<string>;
|
|
15
|
+
masters: Y.Map<unknown>;
|
|
16
|
+
masterOrder: Y.Array<string>;
|
|
17
|
+
layouts: Y.Map<unknown>;
|
|
18
|
+
layoutOrder: Y.Array<string>;
|
|
19
|
+
}
|
|
20
|
+
export declare function workOfficePresentationRoots(document: Y.Doc, rootName: (suffix: string) => string): WorkOfficePresentationRoots;
|
|
21
|
+
export declare function initializeWorkOfficePresentationRoots(roots: WorkOfficePresentationRoots, content: WorkPresentationContent): void;
|
|
22
|
+
export declare function readWorkOfficePresentationRoots(roots: WorkOfficePresentationRoots): WorkPresentationContent;
|
|
23
|
+
export declare function patchWorkOfficePresentationRoots(roots: WorkOfficePresentationRoots, previous: WorkPresentationContent, next: WorkPresentationContent): void;
|
|
24
|
+
export declare function assertWorkOfficePresentationRootsEmpty(roots: WorkOfficePresentationRoots): void;
|
|
25
|
+
export declare function workOfficePresentationUndoScope(roots: WorkOfficePresentationRoots): Array<Y.Map<unknown> | Y.Array<string>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { WorkSlideElement } from '../features/work/work-types';
|
|
3
|
+
export declare const PRESENTATION_RECORD_ELEMENTS = "elements";
|
|
4
|
+
export declare const PRESENTATION_RECORD_ELEMENT_ORDER = "elementOrder";
|
|
5
|
+
export declare const PRESENTATION_RECORD_COMMENTS = "comments";
|
|
6
|
+
export declare const PRESENTATION_RECORD_COMMENT_ORDER = "commentOrder";
|
|
7
|
+
export declare const PRESENTATION_RECORD_COMMENTS_PRESENT = "commentsPresent";
|
|
8
|
+
export type WorkOfficePresentationRecord = {
|
|
9
|
+
id: string;
|
|
10
|
+
elements: WorkSlideElement[];
|
|
11
|
+
};
|
|
12
|
+
export declare function nestedPresentationMap(parent: Y.Map<unknown>, key: string, label: string): Y.Map<unknown>;
|
|
13
|
+
export declare function nestedPresentationArray(parent: Y.Map<unknown>, key: string, label: string): Y.Array<string>;
|
|
14
|
+
export declare function requiredPresentationMap(parent: Y.Map<unknown>, key: string, label: string): Y.Map<unknown>;
|
|
15
|
+
export declare function requiredPresentationArray(parent: Y.Map<unknown>, key: string, label: string): Y.Array<string>;
|
|
16
|
+
export declare function validatedPresentationOrder(order: Y.Array<string>, records: Y.Map<unknown>, label: string): string[];
|
|
17
|
+
export declare function readPresentationCollection(records: Y.Map<unknown>, order: Y.Array<string>, label: string): WorkOfficePresentationRecord[];
|
|
18
|
+
export declare function patchPresentationElements(records: Y.Map<unknown>, order: Y.Array<string>, previous: WorkSlideElement[], next: WorkSlideElement[], parentLabel: string): void;
|
|
19
|
+
export declare function patchPresentationIdRecords<T extends {
|
|
20
|
+
id: string;
|
|
21
|
+
}>(records: Y.Map<unknown>, order: Y.Array<string>, previous: T[], next: T[], label: string): void;
|
|
22
|
+
export declare function patchPresentationOrder(order: Y.Array<string>, previous: string[], next: string[]): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkPresentationContent } from '../features/work/work-types';
|
|
2
|
+
export declare function validateWorkOfficePresentationContent(content: WorkPresentationContent): WorkPresentationContent;
|
|
3
|
+
export declare function validateSharedWorkOfficePresentationContent(content: WorkPresentationContent): WorkPresentationContent;
|
|
4
|
+
export declare function invalidWorkOfficePresentationShared(label: string): never;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WorkPresentationContent } from '../features/work/work-types';
|
|
2
|
+
import { type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration';
|
|
3
|
+
export interface WorkOfficePresentationCollaborationChange {
|
|
4
|
+
content: WorkPresentationContent;
|
|
5
|
+
local: boolean;
|
|
6
|
+
origin: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkOfficePresentationCollaborationBindingOptions {
|
|
9
|
+
captureTimeoutMs?: number;
|
|
10
|
+
origin?: WorkOfficeCollaborationOrigin;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkOfficePresentationCollaborationBinding {
|
|
13
|
+
readonly origin: WorkOfficeCollaborationOrigin;
|
|
14
|
+
content(): WorkPresentationContent;
|
|
15
|
+
replace(previous: WorkPresentationContent, next: WorkPresentationContent): boolean;
|
|
16
|
+
canUndo(): boolean;
|
|
17
|
+
canRedo(): boolean;
|
|
18
|
+
undo(): boolean;
|
|
19
|
+
redo(): boolean;
|
|
20
|
+
stopCapturing(): void;
|
|
21
|
+
subscribe(listener: (change: WorkOfficePresentationCollaborationChange) => void): () => void;
|
|
22
|
+
subscribeError(listener: (error: unknown) => void): () => void;
|
|
23
|
+
subscribeHistory(listener: () => void): () => void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
export declare function initializeWorkOfficePresentationCollaboration(session: WorkOfficeCollaborationSession, content: WorkPresentationContent): {
|
|
27
|
+
initialized: boolean;
|
|
28
|
+
content: WorkPresentationContent;
|
|
29
|
+
};
|
|
30
|
+
export declare function readWorkOfficePresentationCollaboration(session: WorkOfficeCollaborationSession): WorkPresentationContent;
|
|
31
|
+
export declare function replaceWorkOfficePresentationCollaboration(session: WorkOfficeCollaborationSession, previous: WorkPresentationContent, next: WorkPresentationContent, origin?: WorkOfficeCollaborationOrigin): boolean;
|
|
32
|
+
export declare function createWorkOfficePresentationCollaborationBinding(session: WorkOfficeCollaborationSession, options?: WorkOfficePresentationCollaborationBindingOptions): WorkOfficePresentationCollaborationBinding;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { WorkSpreadsheetSheet } from '../features/work/work-types';
|
|
3
|
+
export declare const SPREADSHEET_RECORD_CELLS = "cells";
|
|
4
|
+
export declare const SPREADSHEET_RECORD_CELL_PRESENCE = "cellPresence";
|
|
5
|
+
export declare const SPREADSHEET_RECORD_CELL_MODE = "cellMode";
|
|
6
|
+
export declare const SPREADSHEET_RECORD_DATA_ROW_LENGTHS = "dataRowLengths";
|
|
7
|
+
/**
|
|
8
|
+
* Cells use one field map rather than assigning a nested map per coordinate.
|
|
9
|
+
* Two clients can therefore populate different fields of the same blank cell
|
|
10
|
+
* without Y.Map's concurrent child-type assignment discarding one child map.
|
|
11
|
+
*/
|
|
12
|
+
export declare function patchSpreadsheetCells(record: Y.Map<unknown>, previous: WorkSpreadsheetSheet | undefined, next: WorkSpreadsheetSheet): void;
|
|
13
|
+
export declare function readSpreadsheetCells(record: Y.Map<unknown>, sheet: WorkSpreadsheetSheet): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type * as Y from 'yjs';
|
|
2
|
+
import type { WorkSpreadsheetContent } from '../features/work/work-types';
|
|
3
|
+
export declare function appendWorkOfficeSpreadsheetRecordClaims(claims: Y.Array<string>, previous: WorkSpreadsheetContent | undefined, next: WorkSpreadsheetContent): void;
|
|
4
|
+
export declare function assertWorkOfficeSpreadsheetRecordClaims(claims: Y.Array<string>, content: WorkSpreadsheetContent): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WorkOfficeCollaborationFlatJsonMap } from './office-collaboration-flat-json';
|
|
2
|
+
/**
|
|
3
|
+
* Recursively flattens object fields into one stable Y.Map. Arrays remain atomic
|
|
4
|
+
* because their positional meaning varies across OOXML features. This avoids a
|
|
5
|
+
* concurrent first-write race for nested Y.Map instances while still letting
|
|
6
|
+
* independent object leaves converge.
|
|
7
|
+
*/
|
|
8
|
+
export declare function patchSpreadsheetFlatJsonMap(target: SpreadsheetFlatJsonMap, previous: Record<string, unknown> | undefined, next: Record<string, unknown> | undefined, label: string): void;
|
|
9
|
+
export declare function readSpreadsheetFlatJsonMap(target: SpreadsheetFlatJsonMap, label: string): Record<string, unknown>;
|
|
10
|
+
export type SpreadsheetFlatJsonMap = WorkOfficeCollaborationFlatJsonMap;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { WorkSpreadsheetContent } from '../features/work/work-types';
|
|
3
|
+
export { validateWorkOfficeSpreadsheetContent } from './office-spreadsheet-collaboration-validation';
|
|
4
|
+
export declare const SPREADSHEET_OPTIONS_ROOT = "spreadsheet.options";
|
|
5
|
+
export declare const SPREADSHEET_SHEETS_ROOT = "spreadsheet.sheets";
|
|
6
|
+
export declare const SPREADSHEET_SHEET_ORDER_ROOT = "spreadsheet.sheet-order";
|
|
7
|
+
export declare const SPREADSHEET_NAMED_RANGES_ROOT = "spreadsheet.named-ranges";
|
|
8
|
+
export declare const SPREADSHEET_NAMED_RANGE_ORDER_ROOT = "spreadsheet.named-range-order";
|
|
9
|
+
export declare const SPREADSHEET_RECORD_CLAIMS_ROOT = "spreadsheet.record-claims";
|
|
10
|
+
export declare const SPREADSHEET_PRINT_AREAS_ROOT = "spreadsheet.print-areas";
|
|
11
|
+
export declare const SPREADSHEET_PRINT_TITLES_ROOT = "spreadsheet.print-titles";
|
|
12
|
+
export declare const SPREADSHEET_PAGE_BREAKS_ROOT = "spreadsheet.page-breaks";
|
|
13
|
+
export declare const SPREADSHEET_PAGE_SETUPS_ROOT = "spreadsheet.page-setups";
|
|
14
|
+
export interface WorkOfficeSpreadsheetRoots {
|
|
15
|
+
options: Y.Map<unknown>;
|
|
16
|
+
sheets: Y.Map<unknown>;
|
|
17
|
+
sheetOrder: Y.Array<string>;
|
|
18
|
+
namedRanges: Y.Map<unknown>;
|
|
19
|
+
namedRangeOrder: Y.Array<string>;
|
|
20
|
+
recordClaims: Y.Array<string>;
|
|
21
|
+
printAreas: Y.Map<unknown>;
|
|
22
|
+
printTitles: Y.Map<unknown>;
|
|
23
|
+
pageBreaks: Y.Map<unknown>;
|
|
24
|
+
pageSetups: Y.Map<unknown>;
|
|
25
|
+
}
|
|
26
|
+
export declare function workOfficeSpreadsheetRoots(document: Y.Doc, rootName: (suffix: string) => string): WorkOfficeSpreadsheetRoots;
|
|
27
|
+
export declare function initializeWorkOfficeSpreadsheetRoots(roots: WorkOfficeSpreadsheetRoots, content: WorkSpreadsheetContent): void;
|
|
28
|
+
export declare function readWorkOfficeSpreadsheetRoots(roots: WorkOfficeSpreadsheetRoots): WorkSpreadsheetContent;
|
|
29
|
+
export declare function patchWorkOfficeSpreadsheetRoots(roots: WorkOfficeSpreadsheetRoots, previous: WorkSpreadsheetContent, next: WorkSpreadsheetContent): void;
|
|
30
|
+
export declare function assertWorkOfficeSpreadsheetRootsEmpty(roots: WorkOfficeSpreadsheetRoots): void;
|
|
31
|
+
export declare function workOfficeSpreadsheetUndoScope(roots: WorkOfficeSpreadsheetRoots): Array<Y.Map<unknown> | Y.Array<string>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { WorkSpreadsheetSheet } from '../features/work/work-types';
|
|
3
|
+
export declare const SPREADSHEET_RECORD_CONFIG = "config";
|
|
4
|
+
export declare const SPREADSHEET_RECORD_FORMULA_METADATA = "formulaMetadata";
|
|
5
|
+
export declare const SPREADSHEET_RECORD_IMAGES = "images";
|
|
6
|
+
export declare const SPREADSHEET_RECORD_IMAGE_ORDER = "imageOrder";
|
|
7
|
+
export declare const SPREADSHEET_RECORD_CHARTS = "charts";
|
|
8
|
+
export declare const SPREADSHEET_RECORD_CHART_ORDER = "chartOrder";
|
|
9
|
+
export declare const SPREADSHEET_RECORD_PIVOTS = "pivotTables";
|
|
10
|
+
export declare const SPREADSHEET_RECORD_PIVOT_ORDER = "pivotOrder";
|
|
11
|
+
export declare function initializeSpreadsheetSheetRecord(record: Y.Map<unknown>, sheet: WorkSpreadsheetSheet): void;
|
|
12
|
+
export declare function patchSpreadsheetSheetRecord(record: Y.Map<unknown>, previous: WorkSpreadsheetSheet | undefined, next: WorkSpreadsheetSheet): void;
|
|
13
|
+
export declare function readSpreadsheetSheetRecord(record: Y.Map<unknown>, id: string): WorkSpreadsheetSheet;
|
|
14
|
+
export declare function patchSpreadsheetOrder(order: Y.Array<string>, previous: string[], next: string[]): void;
|
|
15
|
+
export declare function validatedSpreadsheetOrder(order: Y.Array<string>, records: Y.Map<unknown>, label: string): string[];
|
|
16
|
+
export declare function nestedSpreadsheetMap(parent: Y.Map<unknown>, key: string, label: string): Y.Map<unknown>;
|
|
17
|
+
export declare function requiredSpreadsheetMap(parent: Y.Map<unknown>, key: string, label: string): Y.Map<unknown>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkSpreadsheetContent } from '../features/work/work-types';
|
|
2
|
+
export declare function validateWorkOfficeSpreadsheetContent(content: WorkSpreadsheetContent): WorkSpreadsheetContent;
|
|
3
|
+
export declare function validateSharedWorkOfficeSpreadsheetContent(content: WorkSpreadsheetContent): WorkSpreadsheetContent;
|
|
4
|
+
export declare function invalidWorkOfficeSpreadsheetShared(label: string): never;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { WorkSpreadsheetContent } from '../features/work/work-types';
|
|
2
|
+
import { type WorkOfficeCollaborationOrigin, type WorkOfficeCollaborationSession } from './office-collaboration';
|
|
3
|
+
export interface WorkOfficeSpreadsheetCollaborationChange {
|
|
4
|
+
content: WorkSpreadsheetContent;
|
|
5
|
+
local: boolean;
|
|
6
|
+
origin: unknown;
|
|
7
|
+
}
|
|
8
|
+
export interface WorkOfficeSpreadsheetCollaborationBindingOptions {
|
|
9
|
+
captureTimeoutMs?: number;
|
|
10
|
+
origin?: WorkOfficeCollaborationOrigin;
|
|
11
|
+
}
|
|
12
|
+
export interface WorkOfficeSpreadsheetCollaborationBinding {
|
|
13
|
+
readonly origin: WorkOfficeCollaborationOrigin;
|
|
14
|
+
content(): WorkSpreadsheetContent;
|
|
15
|
+
replace(previous: WorkSpreadsheetContent, next: WorkSpreadsheetContent): boolean;
|
|
16
|
+
canUndo(): boolean;
|
|
17
|
+
canRedo(): boolean;
|
|
18
|
+
undo(): boolean;
|
|
19
|
+
redo(): boolean;
|
|
20
|
+
stopCapturing(): void;
|
|
21
|
+
subscribe(listener: (change: WorkOfficeSpreadsheetCollaborationChange) => void): () => void;
|
|
22
|
+
subscribeError(listener: (error: unknown) => void): () => void;
|
|
23
|
+
subscribeHistory(listener: () => void): () => void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
}
|
|
26
|
+
export declare function initializeWorkOfficeSpreadsheetCollaboration(session: WorkOfficeCollaborationSession, content: WorkSpreadsheetContent): {
|
|
27
|
+
initialized: boolean;
|
|
28
|
+
content: WorkSpreadsheetContent;
|
|
29
|
+
};
|
|
30
|
+
export declare function readWorkOfficeSpreadsheetCollaboration(session: WorkOfficeCollaborationSession): WorkSpreadsheetContent;
|
|
31
|
+
export declare function replaceWorkOfficeSpreadsheetCollaboration(session: WorkOfficeCollaborationSession, previous: WorkSpreadsheetContent, next: WorkSpreadsheetContent, origin?: WorkOfficeCollaborationOrigin): boolean;
|
|
32
|
+
export declare function createWorkOfficeSpreadsheetCollaborationBinding(session: WorkOfficeCollaborationSession, options?: WorkOfficeSpreadsheetCollaborationBindingOptions): WorkOfficeSpreadsheetCollaborationBinding;
|
|
@@ -5,15 +5,17 @@ export type TabItem<T extends string> = {
|
|
|
5
5
|
compactLabel?: string;
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
badge?: ReactNode;
|
|
8
|
+
contextual?: boolean;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
tabId?: string;
|
|
10
11
|
panelId?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare function Tabs<T extends string>({ ariaLabel, value, items, onChange, variant, size, className, containerRef, }: {
|
|
13
|
+
export declare function Tabs<T extends string>({ ariaLabel, value, items, onChange, onTabDoubleClick, variant, size, className, containerRef, }: {
|
|
13
14
|
ariaLabel: string;
|
|
14
15
|
value: T;
|
|
15
16
|
items: readonly TabItem<T>[];
|
|
16
17
|
onChange: (value: T) => void;
|
|
18
|
+
onTabDoubleClick?: (value: T) => void;
|
|
17
19
|
variant?: 'segment' | 'line';
|
|
18
20
|
size?: 'standard' | 'compact';
|
|
19
21
|
className?: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WorkDocumentSectionLayout } from '../work-types';
|
|
2
|
+
export declare function WorkDocumentPageBorder({ layout, physicalPage, sectionPage, }: {
|
|
3
|
+
layout: WorkDocumentSectionLayout;
|
|
4
|
+
physicalPage?: number;
|
|
5
|
+
sectionPage: number;
|
|
6
|
+
}): import("react").JSX.Element | null;
|