@ai-matrx/office 0.8.34 → 0.8.35
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/CHANGELOG.md +1 -1
- package/dist/univer-collab.cjs +19 -0
- package/dist/univer-collab.cjs.map +1 -1
- package/dist/univer-collab.d.cts +17 -1
- package/dist/univer-collab.d.ts +17 -1
- package/dist/univer-collab.js +19 -0
- package/dist/univer-collab.js.map +1 -1
- package/package.json +3 -3
package/dist/univer-collab.d.cts
CHANGED
|
@@ -851,6 +851,22 @@ declare const canonicalSheetString: (snapshot: unknown) => string;
|
|
|
851
851
|
/** SHA-256 (hex) of the canonical form. Web Crypto, so the browser and Node compute the same hash. */
|
|
852
852
|
declare function sheetsStateHash(snapshot: unknown): Promise<string>;
|
|
853
853
|
|
|
854
|
+
/**
|
|
855
|
+
* Every Univer preset the workbook editor loads, and the headless (non-UI) plugin packages each one brings that
|
|
856
|
+
* carry workbook state: a snapshot resource or a mutation a peer must be able to apply. Pure data, so the editor's
|
|
857
|
+
* guard can read it without loading Univer.
|
|
858
|
+
*
|
|
859
|
+
* - The fold (the server's reader, `fold.ts`) and the transform fuzz seats register exactly these packages
|
|
860
|
+
* (`registerSheetRoomPlugins`), so a room the editor wrote always folds, and the fold's hash is a seat's hash.
|
|
861
|
+
* - matrx-frontend's `the-fold-loads-every-editor-preset.test.ts` fails when the editor's preset list and these
|
|
862
|
+
* keys disagree; office's `the-fold-loads-the-sheet-room-plugins.test.ts` fails when the fold, the seats and
|
|
863
|
+
* these packages disagree.
|
|
864
|
+
* - A preset whose plugins only add UI or emit core mutations (sort, find/replace, the action recorder) maps to [].
|
|
865
|
+
*/
|
|
866
|
+
declare const SHEET_ROOM_EDITOR_PRESETS: Readonly<Record<string, readonly string[]>>;
|
|
867
|
+
/** The headless plugin packages of a sheet room, in registration order. */
|
|
868
|
+
declare const SHEET_ROOM_PLUGIN_PACKAGES: readonly string[];
|
|
869
|
+
|
|
854
870
|
/**
|
|
855
871
|
* "Copy my offline text" (C10): the words a person typed while offline, pulled out of the wire groups of a buffer
|
|
856
872
|
* the room refused (changed protocol, document trashed). Format-light on purpose: Docs inserts carry their text in
|
|
@@ -897,4 +913,4 @@ declare function startWorkbookOtRoom(port: SheetsOtPort & {
|
|
|
897
913
|
dispose?: () => void;
|
|
898
914
|
}, o: WorkbookOtRoomOptions): Promise<WorkbookOtRoomHandle>;
|
|
899
915
|
|
|
900
|
-
export { COLLAB_COVERED_KEY, type CollabBase, type CollabMutationInfo, type CollabProviderLike, type CommandServiceLike, DOCS_COLLAB_PROTO, DOCS_TRANSFORM_VERSION, DOC_LOCAL_KEYS, type DocsLocalMutation, type DocsLost, type DocsOp, type DocsOtNotice, type DocsOtPort, type DocsOtRoom, type DocsTransformResult, type DocumentOtFactoryOptions, type DocumentRestoreDeps, type DocumentRestoreResult, type OpenDocsOtRoomOptions, type OpenSheetsOtRoomOptions, type OtRoomsKnob, RICH_TEXT_EDITING, SENDER_VIEW_PARAMS, SHEETS_COLLAB_PROTO, SHEETS_EDIT_GROUP, SHEETS_READABLE_PROTOS, type SheetOp, type SheetSelection, type SheetsCommandService, type SheetsLocalEvent, type SheetsLocalGroup, type SheetsNotShared, type SheetsOtAdapter, type SheetsOtAdapterHooks, type SheetsOtNotice, type SheetsOtPort, type SheetsOtRoom, type SheetsWorkbookLike, type SheetsWorksheetLike, type UniverSheetsOtPortOptions, WorkbookCollabSession, type WorkbookCollabSessionOptions, type WorkbookOtRoomHandle, type WorkbookOtRoomOptions, type WorkbookOtRoomsKnob, applyDocsOp, asLoadedDocsSnapshot, canonicalDocsSnapshot, canonicalDocsString, canonicalKeys, canonicalSheet, canonicalSheetString, composeDocsOps, createSheetsOtAdapter, decodeSheetOp, docsStateHash, documentOtFactory, documentUsesOrderedRoom, dropEmptyStyleRetains, encodeSheetOp, invertDocsOp, isCellEditorScratch, isNoopDocsOp, moveSelectionsThrough, normalizeDocsOp, offlineTextOfGroups, openDocsOtRoom, openSheetsOtRoom, rebaseSheetUndoStack, rebaseUndoStack, restoreDocumentSnapshot, sheetsStateHash, stampCovered, stampDeterministicIds, startWorkbookOtRoom, stripSenderView, takeCovered, transformDocsOp, transformSheetOp, transformTextX, undoStacksOf, univerSheetsOtPort, workbookUsesOrderedRoom };
|
|
916
|
+
export { COLLAB_COVERED_KEY, type CollabBase, type CollabMutationInfo, type CollabProviderLike, type CommandServiceLike, DOCS_COLLAB_PROTO, DOCS_TRANSFORM_VERSION, DOC_LOCAL_KEYS, type DocsLocalMutation, type DocsLost, type DocsOp, type DocsOtNotice, type DocsOtPort, type DocsOtRoom, type DocsTransformResult, type DocumentOtFactoryOptions, type DocumentRestoreDeps, type DocumentRestoreResult, type OpenDocsOtRoomOptions, type OpenSheetsOtRoomOptions, type OtRoomsKnob, RICH_TEXT_EDITING, SENDER_VIEW_PARAMS, SHEETS_COLLAB_PROTO, SHEETS_EDIT_GROUP, SHEETS_READABLE_PROTOS, SHEET_ROOM_EDITOR_PRESETS, SHEET_ROOM_PLUGIN_PACKAGES, type SheetOp, type SheetSelection, type SheetsCommandService, type SheetsLocalEvent, type SheetsLocalGroup, type SheetsNotShared, type SheetsOtAdapter, type SheetsOtAdapterHooks, type SheetsOtNotice, type SheetsOtPort, type SheetsOtRoom, type SheetsWorkbookLike, type SheetsWorksheetLike, type UniverSheetsOtPortOptions, WorkbookCollabSession, type WorkbookCollabSessionOptions, type WorkbookOtRoomHandle, type WorkbookOtRoomOptions, type WorkbookOtRoomsKnob, applyDocsOp, asLoadedDocsSnapshot, canonicalDocsSnapshot, canonicalDocsString, canonicalKeys, canonicalSheet, canonicalSheetString, composeDocsOps, createSheetsOtAdapter, decodeSheetOp, docsStateHash, documentOtFactory, documentUsesOrderedRoom, dropEmptyStyleRetains, encodeSheetOp, invertDocsOp, isCellEditorScratch, isNoopDocsOp, moveSelectionsThrough, normalizeDocsOp, offlineTextOfGroups, openDocsOtRoom, openSheetsOtRoom, rebaseSheetUndoStack, rebaseUndoStack, restoreDocumentSnapshot, sheetsStateHash, stampCovered, stampDeterministicIds, startWorkbookOtRoom, stripSenderView, takeCovered, transformDocsOp, transformSheetOp, transformTextX, undoStacksOf, univerSheetsOtPort, workbookUsesOrderedRoom };
|
package/dist/univer-collab.d.ts
CHANGED
|
@@ -851,6 +851,22 @@ declare const canonicalSheetString: (snapshot: unknown) => string;
|
|
|
851
851
|
/** SHA-256 (hex) of the canonical form. Web Crypto, so the browser and Node compute the same hash. */
|
|
852
852
|
declare function sheetsStateHash(snapshot: unknown): Promise<string>;
|
|
853
853
|
|
|
854
|
+
/**
|
|
855
|
+
* Every Univer preset the workbook editor loads, and the headless (non-UI) plugin packages each one brings that
|
|
856
|
+
* carry workbook state: a snapshot resource or a mutation a peer must be able to apply. Pure data, so the editor's
|
|
857
|
+
* guard can read it without loading Univer.
|
|
858
|
+
*
|
|
859
|
+
* - The fold (the server's reader, `fold.ts`) and the transform fuzz seats register exactly these packages
|
|
860
|
+
* (`registerSheetRoomPlugins`), so a room the editor wrote always folds, and the fold's hash is a seat's hash.
|
|
861
|
+
* - matrx-frontend's `the-fold-loads-every-editor-preset.test.ts` fails when the editor's preset list and these
|
|
862
|
+
* keys disagree; office's `the-fold-loads-the-sheet-room-plugins.test.ts` fails when the fold, the seats and
|
|
863
|
+
* these packages disagree.
|
|
864
|
+
* - A preset whose plugins only add UI or emit core mutations (sort, find/replace, the action recorder) maps to [].
|
|
865
|
+
*/
|
|
866
|
+
declare const SHEET_ROOM_EDITOR_PRESETS: Readonly<Record<string, readonly string[]>>;
|
|
867
|
+
/** The headless plugin packages of a sheet room, in registration order. */
|
|
868
|
+
declare const SHEET_ROOM_PLUGIN_PACKAGES: readonly string[];
|
|
869
|
+
|
|
854
870
|
/**
|
|
855
871
|
* "Copy my offline text" (C10): the words a person typed while offline, pulled out of the wire groups of a buffer
|
|
856
872
|
* the room refused (changed protocol, document trashed). Format-light on purpose: Docs inserts carry their text in
|
|
@@ -897,4 +913,4 @@ declare function startWorkbookOtRoom(port: SheetsOtPort & {
|
|
|
897
913
|
dispose?: () => void;
|
|
898
914
|
}, o: WorkbookOtRoomOptions): Promise<WorkbookOtRoomHandle>;
|
|
899
915
|
|
|
900
|
-
export { COLLAB_COVERED_KEY, type CollabBase, type CollabMutationInfo, type CollabProviderLike, type CommandServiceLike, DOCS_COLLAB_PROTO, DOCS_TRANSFORM_VERSION, DOC_LOCAL_KEYS, type DocsLocalMutation, type DocsLost, type DocsOp, type DocsOtNotice, type DocsOtPort, type DocsOtRoom, type DocsTransformResult, type DocumentOtFactoryOptions, type DocumentRestoreDeps, type DocumentRestoreResult, type OpenDocsOtRoomOptions, type OpenSheetsOtRoomOptions, type OtRoomsKnob, RICH_TEXT_EDITING, SENDER_VIEW_PARAMS, SHEETS_COLLAB_PROTO, SHEETS_EDIT_GROUP, SHEETS_READABLE_PROTOS, type SheetOp, type SheetSelection, type SheetsCommandService, type SheetsLocalEvent, type SheetsLocalGroup, type SheetsNotShared, type SheetsOtAdapter, type SheetsOtAdapterHooks, type SheetsOtNotice, type SheetsOtPort, type SheetsOtRoom, type SheetsWorkbookLike, type SheetsWorksheetLike, type UniverSheetsOtPortOptions, WorkbookCollabSession, type WorkbookCollabSessionOptions, type WorkbookOtRoomHandle, type WorkbookOtRoomOptions, type WorkbookOtRoomsKnob, applyDocsOp, asLoadedDocsSnapshot, canonicalDocsSnapshot, canonicalDocsString, canonicalKeys, canonicalSheet, canonicalSheetString, composeDocsOps, createSheetsOtAdapter, decodeSheetOp, docsStateHash, documentOtFactory, documentUsesOrderedRoom, dropEmptyStyleRetains, encodeSheetOp, invertDocsOp, isCellEditorScratch, isNoopDocsOp, moveSelectionsThrough, normalizeDocsOp, offlineTextOfGroups, openDocsOtRoom, openSheetsOtRoom, rebaseSheetUndoStack, rebaseUndoStack, restoreDocumentSnapshot, sheetsStateHash, stampCovered, stampDeterministicIds, startWorkbookOtRoom, stripSenderView, takeCovered, transformDocsOp, transformSheetOp, transformTextX, undoStacksOf, univerSheetsOtPort, workbookUsesOrderedRoom };
|
|
916
|
+
export { COLLAB_COVERED_KEY, type CollabBase, type CollabMutationInfo, type CollabProviderLike, type CommandServiceLike, DOCS_COLLAB_PROTO, DOCS_TRANSFORM_VERSION, DOC_LOCAL_KEYS, type DocsLocalMutation, type DocsLost, type DocsOp, type DocsOtNotice, type DocsOtPort, type DocsOtRoom, type DocsTransformResult, type DocumentOtFactoryOptions, type DocumentRestoreDeps, type DocumentRestoreResult, type OpenDocsOtRoomOptions, type OpenSheetsOtRoomOptions, type OtRoomsKnob, RICH_TEXT_EDITING, SENDER_VIEW_PARAMS, SHEETS_COLLAB_PROTO, SHEETS_EDIT_GROUP, SHEETS_READABLE_PROTOS, SHEET_ROOM_EDITOR_PRESETS, SHEET_ROOM_PLUGIN_PACKAGES, type SheetOp, type SheetSelection, type SheetsCommandService, type SheetsLocalEvent, type SheetsLocalGroup, type SheetsNotShared, type SheetsOtAdapter, type SheetsOtAdapterHooks, type SheetsOtNotice, type SheetsOtPort, type SheetsOtRoom, type SheetsWorkbookLike, type SheetsWorksheetLike, type UniverSheetsOtPortOptions, WorkbookCollabSession, type WorkbookCollabSessionOptions, type WorkbookOtRoomHandle, type WorkbookOtRoomOptions, type WorkbookOtRoomsKnob, applyDocsOp, asLoadedDocsSnapshot, canonicalDocsSnapshot, canonicalDocsString, canonicalKeys, canonicalSheet, canonicalSheetString, composeDocsOps, createSheetsOtAdapter, decodeSheetOp, docsStateHash, documentOtFactory, documentUsesOrderedRoom, dropEmptyStyleRetains, encodeSheetOp, invertDocsOp, isCellEditorScratch, isNoopDocsOp, moveSelectionsThrough, normalizeDocsOp, offlineTextOfGroups, openDocsOtRoom, openSheetsOtRoom, rebaseSheetUndoStack, rebaseUndoStack, restoreDocumentSnapshot, sheetsStateHash, stampCovered, stampDeterministicIds, startWorkbookOtRoom, stripSenderView, takeCovered, transformDocsOp, transformSheetOp, transformTextX, undoStacksOf, univerSheetsOtPort, workbookUsesOrderedRoom };
|
package/dist/univer-collab.js
CHANGED
|
@@ -4509,6 +4509,23 @@ function moveSelectionsThrough(selections, m, maxRows, maxCols) {
|
|
|
4509
4509
|
return selections.map((s) => ({ ...s, range: box(s.range, s.range.rangeType), ...s.primary ? { primary: box(s.primary) } : {} }));
|
|
4510
4510
|
}
|
|
4511
4511
|
|
|
4512
|
+
// src/univer/collab/sheets-ot/room-presets.ts
|
|
4513
|
+
var SHEET_ROOM_EDITOR_PRESETS = {
|
|
4514
|
+
// core + engine-formula + sheets are always there; sheets-formula moves formulas inside plugin ranges
|
|
4515
|
+
UniverSheetsCorePreset: ["@univerjs/sheets-formula"],
|
|
4516
|
+
UniverSheetsSortPreset: [],
|
|
4517
|
+
UniverSheetsFilterPreset: ["@univerjs/sheets-filter"],
|
|
4518
|
+
UniverSheetsTablePreset: ["@univerjs/sheets-table"],
|
|
4519
|
+
UniverSheetsDataValidationPreset: ["@univerjs/data-validation", "@univerjs/sheets-data-validation"],
|
|
4520
|
+
UniverSheetsConditionalFormattingPreset: ["@univerjs/sheets-conditional-formatting"],
|
|
4521
|
+
UniverSheetsFindReplacePreset: [],
|
|
4522
|
+
UniverSheetsHyperLinkPreset: ["@univerjs/sheets-hyper-link"],
|
|
4523
|
+
UniverSheetsDrawingPreset: ["@univerjs/drawing", "@univerjs/sheets-drawing"],
|
|
4524
|
+
UniverSheetsNotePreset: ["@univerjs/sheets-note"],
|
|
4525
|
+
UniverActionRecorderPlugin: []
|
|
4526
|
+
};
|
|
4527
|
+
var SHEET_ROOM_PLUGIN_PACKAGES = [...new Set(Object.values(SHEET_ROOM_EDITOR_PRESETS).flat())];
|
|
4528
|
+
|
|
4512
4529
|
// src/univer/collab/offline-text.ts
|
|
4513
4530
|
var colName3 = (c) => {
|
|
4514
4531
|
let n = c;
|
|
@@ -4737,6 +4754,8 @@ export {
|
|
|
4737
4754
|
SHEETS_COLLAB_PROTO,
|
|
4738
4755
|
SHEETS_EDIT_GROUP,
|
|
4739
4756
|
SHEETS_READABLE_PROTOS,
|
|
4757
|
+
SHEET_ROOM_EDITOR_PRESETS,
|
|
4758
|
+
SHEET_ROOM_PLUGIN_PACKAGES,
|
|
4740
4759
|
WorkbookCollabSession,
|
|
4741
4760
|
applyDocsOp,
|
|
4742
4761
|
asLoadedDocsSnapshot,
|