@ai-matrx/office 0.8.25 → 0.8.26

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/dist/docs-io.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  getDocsHost,
5
5
  sanitizeUniverDocSnapshot,
6
6
  saveDocumentSnapshot
7
- } from "./chunk-TRA2BTPL.js";
7
+ } from "./chunk-CAWDEHVL.js";
8
8
  import {
9
9
  deriveDocumentName,
10
10
  markdownToUniverDoc
package/dist/docs.cjs CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- var _chunkJMVPAJJAcjs = require('./chunk-JMVPAJJA.cjs');
19
+ var _chunkLHTG72LScjs = require('./chunk-LHTG72LS.cjs');
20
20
 
21
21
 
22
22
  var _chunkNSU6EVJKcjs = require('./chunk-NSU6EVJK.cjs');
@@ -1075,5 +1075,5 @@ function removeCommentAnchorActions(documentDataModel, anchorId) {
1075
1075
 
1076
1076
 
1077
1077
 
1078
- exports.CARET_HEARTBEAT_MS = CARET_HEARTBEAT_MS; exports.CARET_MAX_RANGES = CARET_MAX_RANGES; exports.CARET_STALE_MS = CARET_STALE_MS; exports.COMMENT_ANCHOR_LABEL_MAX = COMMENT_ANCHOR_LABEL_MAX; exports.COMMENT_ANCHOR_PART_PREFIX = COMMENT_ANCHOR_PART_PREFIX; exports.COMMENT_ANCHOR_RANGE_TYPE = COMMENT_ANCHOR_RANGE_TYPE; exports.DOCUMENT_BODY_MAX_LENGTH = DOCUMENT_BODY_MAX_LENGTH; exports.DOCUMENT_DESCRIPTION_MAX_LENGTH = DOCUMENT_DESCRIPTION_MAX_LENGTH; exports.DOCUMENT_NAME_MAX_LENGTH = DOCUMENT_NAME_MAX_LENGTH; exports.DOCUMENT_SAVE_DELAY_MS = DOCUMENT_SAVE_DELAY_MS; exports.DocumentModel = DocumentModel; exports.EMOJI_GROUPS = EMOJI_GROUPS; exports.MIN_FIT_ZOOM = MIN_FIT_ZOOM; exports.RemoteCaretBook = RemoteCaretBook; exports.SPECIAL_GROUPS = SPECIAL_GROUPS; exports.addCommentAnchorActions = addCommentAnchorActions; exports.anchorIdOfPartAnchor = anchorIdOfPartAnchor; exports.bodyTextOf = bodyTextOf; exports.commentAnchorPartKey = commentAnchorPartKey; exports.commentAnchorsOf = commentAnchorsOf; exports.commentPartAnchor = commentPartAnchor; exports.configureDocsHost = _chunkJMVPAJJAcjs.configureDocsHost; exports.copyDocument = _chunkJMVPAJJAcjs.copyDocument; exports.createDocument = _chunkJMVPAJJAcjs.createDocument; exports.deleteDocument = _chunkJMVPAJJAcjs.deleteDocument; exports.discardFailedDocument = _chunkJMVPAJJAcjs.discardFailedDocument; exports.documentBodyWriteHandler = documentBodyWriteHandler; exports.documentSourceLabel = documentSourceLabel; exports.fitZoomRatio = fitZoomRatio; exports.getDocsHost = _chunkJMVPAJJAcjs.getDocsHost; exports.getDocument = _chunkJMVPAJJAcjs.getDocument; exports.getLatestDocumentSnapshot = _chunkJMVPAJJAcjs.getLatestDocumentSnapshot; exports.listAccessibleDocuments = _chunkJMVPAJJAcjs.listAccessibleDocuments; exports.listDocumentSnapshots = _chunkJMVPAJJAcjs.listDocumentSnapshots; exports.listTrashedDocuments = _chunkJMVPAJJAcjs.listTrashedDocuments; exports.moveDocument = _chunkJMVPAJJAcjs.moveDocument; exports.movePeerRangesThroughBodyEdit = movePeerRangesThroughBodyEdit; exports.moveRangesThroughBodyEdit = moveRangesThroughBodyEdit; exports.newCommentAnchorId = newCommentAnchorId; exports.planBodyEdit = planBodyEdit; exports.publishedCaretFromSelection = publishedCaretFromSelection; exports.removeCommentAnchorActions = removeCommentAnchorActions; exports.renameDocument = _chunkJMVPAJJAcjs.renameDocument; exports.restoreDocument = _chunkJMVPAJJAcjs.restoreDocument; exports.sanitizeUniverDocSnapshot = _chunkJMVPAJJAcjs.sanitizeUniverDocSnapshot; exports.saveDocumentSnapshot = _chunkJMVPAJJAcjs.saveDocumentSnapshot; exports.searchSymbols = searchSymbols; exports.updateDocumentDescription = _chunkJMVPAJJAcjs.updateDocumentDescription; exports.validateDocumentBody = validateDocumentBody; exports.validateDocumentDescription = validateDocumentDescription; exports.validateDocumentName = validateDocumentName; exports.writeBodyText = writeBodyText;
1078
+ exports.CARET_HEARTBEAT_MS = CARET_HEARTBEAT_MS; exports.CARET_MAX_RANGES = CARET_MAX_RANGES; exports.CARET_STALE_MS = CARET_STALE_MS; exports.COMMENT_ANCHOR_LABEL_MAX = COMMENT_ANCHOR_LABEL_MAX; exports.COMMENT_ANCHOR_PART_PREFIX = COMMENT_ANCHOR_PART_PREFIX; exports.COMMENT_ANCHOR_RANGE_TYPE = COMMENT_ANCHOR_RANGE_TYPE; exports.DOCUMENT_BODY_MAX_LENGTH = DOCUMENT_BODY_MAX_LENGTH; exports.DOCUMENT_DESCRIPTION_MAX_LENGTH = DOCUMENT_DESCRIPTION_MAX_LENGTH; exports.DOCUMENT_NAME_MAX_LENGTH = DOCUMENT_NAME_MAX_LENGTH; exports.DOCUMENT_SAVE_DELAY_MS = DOCUMENT_SAVE_DELAY_MS; exports.DocumentModel = DocumentModel; exports.EMOJI_GROUPS = EMOJI_GROUPS; exports.MIN_FIT_ZOOM = MIN_FIT_ZOOM; exports.RemoteCaretBook = RemoteCaretBook; exports.SPECIAL_GROUPS = SPECIAL_GROUPS; exports.addCommentAnchorActions = addCommentAnchorActions; exports.anchorIdOfPartAnchor = anchorIdOfPartAnchor; exports.bodyTextOf = bodyTextOf; exports.commentAnchorPartKey = commentAnchorPartKey; exports.commentAnchorsOf = commentAnchorsOf; exports.commentPartAnchor = commentPartAnchor; exports.configureDocsHost = _chunkLHTG72LScjs.configureDocsHost; exports.copyDocument = _chunkLHTG72LScjs.copyDocument; exports.createDocument = _chunkLHTG72LScjs.createDocument; exports.deleteDocument = _chunkLHTG72LScjs.deleteDocument; exports.discardFailedDocument = _chunkLHTG72LScjs.discardFailedDocument; exports.documentBodyWriteHandler = documentBodyWriteHandler; exports.documentSourceLabel = documentSourceLabel; exports.fitZoomRatio = fitZoomRatio; exports.getDocsHost = _chunkLHTG72LScjs.getDocsHost; exports.getDocument = _chunkLHTG72LScjs.getDocument; exports.getLatestDocumentSnapshot = _chunkLHTG72LScjs.getLatestDocumentSnapshot; exports.listAccessibleDocuments = _chunkLHTG72LScjs.listAccessibleDocuments; exports.listDocumentSnapshots = _chunkLHTG72LScjs.listDocumentSnapshots; exports.listTrashedDocuments = _chunkLHTG72LScjs.listTrashedDocuments; exports.moveDocument = _chunkLHTG72LScjs.moveDocument; exports.movePeerRangesThroughBodyEdit = movePeerRangesThroughBodyEdit; exports.moveRangesThroughBodyEdit = moveRangesThroughBodyEdit; exports.newCommentAnchorId = newCommentAnchorId; exports.planBodyEdit = planBodyEdit; exports.publishedCaretFromSelection = publishedCaretFromSelection; exports.removeCommentAnchorActions = removeCommentAnchorActions; exports.renameDocument = _chunkLHTG72LScjs.renameDocument; exports.restoreDocument = _chunkLHTG72LScjs.restoreDocument; exports.sanitizeUniverDocSnapshot = _chunkLHTG72LScjs.sanitizeUniverDocSnapshot; exports.saveDocumentSnapshot = _chunkLHTG72LScjs.saveDocumentSnapshot; exports.searchSymbols = searchSymbols; exports.updateDocumentDescription = _chunkLHTG72LScjs.updateDocumentDescription; exports.validateDocumentBody = validateDocumentBody; exports.validateDocumentDescription = validateDocumentDescription; exports.validateDocumentName = validateDocumentName; exports.writeBodyText = writeBodyText;
1079
1079
  //# sourceMappingURL=docs.cjs.map
package/dist/docs.d.cts CHANGED
@@ -25,6 +25,14 @@ interface DocsHostPorts {
25
25
  method: "POST";
26
26
  body: FormData;
27
27
  }): Promise<Response>;
28
+ /**
29
+ * The record's CURRENT content, including what people are typing in a live co-editing room and have not saved
30
+ * (the app folds the room; the package owns no server). Optional: a host without co-editing leaves it out and
31
+ * a copy takes the newest saved snapshot. It may throw; the copy then fails with its message, never silently.
32
+ */
33
+ readCurrentSnapshot?(documentId: string): Promise<{
34
+ snapshot: unknown | null;
35
+ }>;
28
36
  }
29
37
  declare function configureDocsHost(ports: DocsHostPorts): void;
30
38
  declare function getDocsHost(): DocsHostPorts;
@@ -145,7 +153,7 @@ type SaveDocumentSnapshotArgs = {
145
153
  };
146
154
  declare function saveDocumentSnapshot(args: SaveDocumentSnapshotArgs): Promise<ServiceResult<DocumentSnapshot>>;
147
155
  /**
148
- * An independent copy of a document: its own row, with the latest snapshot copied over, so editing the copy never
156
+ * An independent copy of a document: its own row, with the CURRENT content copied over (the live room when people are co-editing), so editing the copy never
149
157
  * touches the original. The copy lives in the original's organization and project. Used by a board-template use.
150
158
  */
151
159
  declare function copyDocument(documentId: string, name?: string): Promise<ServiceResult<DocumentRow>>;
package/dist/docs.d.ts CHANGED
@@ -25,6 +25,14 @@ interface DocsHostPorts {
25
25
  method: "POST";
26
26
  body: FormData;
27
27
  }): Promise<Response>;
28
+ /**
29
+ * The record's CURRENT content, including what people are typing in a live co-editing room and have not saved
30
+ * (the app folds the room; the package owns no server). Optional: a host without co-editing leaves it out and
31
+ * a copy takes the newest saved snapshot. It may throw; the copy then fails with its message, never silently.
32
+ */
33
+ readCurrentSnapshot?(documentId: string): Promise<{
34
+ snapshot: unknown | null;
35
+ }>;
28
36
  }
29
37
  declare function configureDocsHost(ports: DocsHostPorts): void;
30
38
  declare function getDocsHost(): DocsHostPorts;
@@ -145,7 +153,7 @@ type SaveDocumentSnapshotArgs = {
145
153
  };
146
154
  declare function saveDocumentSnapshot(args: SaveDocumentSnapshotArgs): Promise<ServiceResult<DocumentSnapshot>>;
147
155
  /**
148
- * An independent copy of a document: its own row, with the latest snapshot copied over, so editing the copy never
156
+ * An independent copy of a document: its own row, with the CURRENT content copied over (the live room when people are co-editing), so editing the copy never
149
157
  * touches the original. The copy lives in the original's organization and project. Used by a board-template use.
150
158
  */
151
159
  declare function copyDocument(documentId: string, name?: string): Promise<ServiceResult<DocumentRow>>;
package/dist/docs.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  sanitizeUniverDocSnapshot,
17
17
  saveDocumentSnapshot,
18
18
  updateDocumentDescription
19
- } from "./chunk-TRA2BTPL.js";
19
+ } from "./chunk-CAWDEHVL.js";
20
20
  import {
21
21
  looksLikeMarkdown
22
22
  } from "./chunk-DY5TGHBI.js";
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkZDZCCOUBcjs = require('./chunk-ZDZCCOUB.cjs');
6
+ var _chunkIJNET5TTcjs = require('./chunk-IJNET5TT.cjs');
7
7
 
8
8
 
9
9
 
@@ -455,7 +455,7 @@ function unsupportedFileReason(file) {
455
455
  return `"${file.name}" isn't a spreadsheet file. Supported: .xlsx, .xls, .csv. For a Google Sheet, use Import from Google Sheets.`;
456
456
  }
457
457
  async function importWorkbookFile(file, organizationId) {
458
- const capturedOrganizationId = await _chunkZDZCCOUBcjs.getSheetsHost.call(void 0, ).ensureOrgId(organizationId);
458
+ const capturedOrganizationId = await _chunkIJNET5TTcjs.getSheetsHost.call(void 0, ).ensureOrgId(organizationId);
459
459
  const { xlsxToUniverWorkbook: xlsxToUniverWorkbook2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./xlsx-to-univer-NWCHAWJC.cjs")));
460
460
  const droppedOnImport = [];
461
461
  const { uploadImportedImage } = await Promise.resolve().then(() => _interopRequireWildcard(require("./matrxImagePorts-46SGQTLN.cjs")));
@@ -465,7 +465,7 @@ async function importWorkbookFile(file, organizationId) {
465
465
  });
466
466
  let originalFileId;
467
467
  try {
468
- const uploaded = await _chunkZDZCCOUBcjs.getSheetsHost.call(void 0, ).uploadOriginalFile(file, { folderPath: "Workbooks/Imports" });
468
+ const uploaded = await _chunkIJNET5TTcjs.getSheetsHost.call(void 0, ).uploadOriginalFile(file, { folderPath: "Workbooks/Imports" });
469
469
  originalFileId = uploaded.fileId;
470
470
  } catch (uploadErr) {
471
471
  console.warn(
@@ -474,7 +474,7 @@ async function importWorkbookFile(file, organizationId) {
474
474
  );
475
475
  }
476
476
  const cleanName = file.name.replace(/\.[^.]+$/, "") || "Imported workbook";
477
- const created = await _chunkZDZCCOUBcjs.createWorkbook.call(void 0, {
477
+ const created = await _chunkIJNET5TTcjs.createWorkbook.call(void 0, {
478
478
  name: cleanName,
479
479
  description: `Imported from ${file.name}`,
480
480
  source: file.name.toLowerCase().endsWith(".csv") ? "imported_csv" : "imported_xlsx",
@@ -482,14 +482,14 @@ async function importWorkbookFile(file, organizationId) {
482
482
  ...originalFileId ? { originalFileId } : {}
483
483
  });
484
484
  if (_core.isServiceFailure.call(void 0, created)) throw new Error(created.error);
485
- const saved = await _chunkZDZCCOUBcjs.saveSnapshot.call(void 0, {
485
+ const saved = await _chunkIJNET5TTcjs.saveSnapshot.call(void 0, {
486
486
  workbookId: created.data.id,
487
487
  snapshot,
488
488
  origin: "imported",
489
489
  label: file.name
490
490
  });
491
491
  if (_core.isServiceFailure.call(void 0, saved)) {
492
- await _chunkZDZCCOUBcjs.discardFailedWorkbook.call(void 0, created.data.id);
492
+ await _chunkIJNET5TTcjs.discardFailedWorkbook.call(void 0, created.data.id);
493
493
  throw new Error(saved.error);
494
494
  }
495
495
  return { id: created.data.id, name: cleanName, notCarried: droppedOnImport };
@@ -3,7 +3,7 @@ import {
3
3
  discardFailedWorkbook,
4
4
  getSheetsHost,
5
5
  saveSnapshot
6
- } from "./chunk-WKBWRG7N.js";
6
+ } from "./chunk-RREOARR4.js";
7
7
  import {
8
8
  H_ALIGN_IN,
9
9
  H_ALIGN_OUT,
package/dist/sheets.cjs CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- var _chunkZDZCCOUBcjs = require('./chunk-ZDZCCOUB.cjs');
19
+ var _chunkIJNET5TTcjs = require('./chunk-IJNET5TT.cjs');
20
20
 
21
21
  // src/sheets/univer-snapshot-rows.ts
22
22
  function univerSheetIds(snapshot) {
@@ -658,7 +658,7 @@ function planSheetPrint(rows, setup, frozen = { rows: 0, cols: 0 }) {
658
658
 
659
659
  // src/sheets/sheet-page-setup-service.ts
660
660
  var _db = require('@ai-matrx/data/db');
661
- var db = () => _chunkZDZCCOUBcjs.getSheetsHost.call(void 0, ).getSupabase();
661
+ var db = () => _chunkIJNET5TTcjs.getSheetsHost.call(void 0, ).getSupabase();
662
662
  async function readSheetPageSetup(workbookId) {
663
663
  const { data, error } = await db().schema("workbench").from("udt_workbooks").select("metadata").eq("id", workbookId).maybeSingle();
664
664
  if (error) return { ok: false, error: error.message };
@@ -917,5 +917,5 @@ function readWorkbookScopeSource(workbookId) {
917
917
 
918
918
 
919
919
 
920
- exports.DEFAULT_SHEET_PAGE_SETUP = DEFAULT_SHEET_PAGE_SETUP; exports.GRID_MAX_COLUMNS = GRID_MAX_COLUMNS; exports.GRID_MAX_ROWS = GRID_MAX_ROWS; exports.MARGIN_PRESET_INCHES = MARGIN_PRESET_INCHES; exports.PRINT_ROW_HEIGHT = PRINT_ROW_HEIGHT; exports.SHEET_MARGIN_PRESETS = SHEET_MARGIN_PRESETS; exports.SHEET_PRINT_SCOPES = SHEET_PRINT_SCOPES; exports.SHEET_SCALES = SHEET_SCALES; exports.THUMB_HEIGHT = THUMB_HEIGHT; exports.THUMB_WIDTH = THUMB_WIDTH; exports.buildSheetPrintDocument = buildSheetPrintDocument; exports.cfMatch = cfMatch; exports.collectPrintSheets = collectPrintSheets; exports.configureSheetsHost = _chunkZDZCCOUBcjs.configureSheetsHost; exports.copyWorkbook = _chunkZDZCCOUBcjs.copyWorkbook; exports.createWorkbook = _chunkZDZCCOUBcjs.createWorkbook; exports.deleteWorkbook = _chunkZDZCCOUBcjs.deleteWorkbook; exports.discardFailedWorkbook = _chunkZDZCCOUBcjs.discardFailedWorkbook; exports.documentPreviewSvg = documentPreviewSvg; exports.downloadSheetAsCsv = downloadSheetAsCsv; exports.downloadSheetAsHtml = downloadSheetAsHtml; exports.downloadSheetAsPdf = downloadSheetAsPdf; exports.downloadSheetAsTsv = downloadSheetAsTsv; exports.formatCellValue = formatCellValue; exports.getLatestSnapshot = _chunkZDZCCOUBcjs.getLatestSnapshot; exports.getSheetsHost = _chunkZDZCCOUBcjs.getSheetsHost; exports.getWorkbook = _chunkZDZCCOUBcjs.getWorkbook; exports.listAccessibleWorkbooks = _chunkZDZCCOUBcjs.listAccessibleWorkbooks; exports.listSnapshots = _chunkZDZCCOUBcjs.listSnapshots; exports.listTrashedWorkbooks = _chunkZDZCCOUBcjs.listTrashedWorkbooks; exports.moveWorkbook = _chunkZDZCCOUBcjs.moveWorkbook; exports.normalizeSheetPageSetup = normalizeSheetPageSetup; exports.pageSetupFromMetadata = pageSetupFromMetadata; exports.parseResource = parseResource; exports.planSheetPrint = planSheetPrint; exports.printColumnWidths = printColumnWidths; exports.printDocumentHtml = printDocumentHtml; exports.printGeometry = printGeometry; exports.printSheet = printSheet; exports.readSheetPageSetup = readSheetPageSetup; exports.readWorkbookScopeSource = readWorkbookScopeSource; exports.registerWorkbookScopeSource = registerWorkbookScopeSource; exports.renameWorkbook = _chunkZDZCCOUBcjs.renameWorkbook; exports.restoreWorkbook = _chunkZDZCCOUBcjs.restoreWorkbook; exports.saveSnapshot = _chunkZDZCCOUBcjs.saveSnapshot; exports.sheetGridToCsv = sheetGridToCsv; exports.sheetGridToMarkdownTable = sheetGridToMarkdownTable; exports.snapshotPreviewSvg = snapshotPreviewSvg; exports.snapshotToGridSheets = snapshotToGridSheets; exports.univerSheetIds = univerSheetIds; exports.univerSnapshotToRows = univerSnapshotToRows; exports.updateWorkbookDescription = _chunkZDZCCOUBcjs.updateWorkbookDescription; exports.workbookPreviewSvg = workbookPreviewSvg; exports.workbookSourceLabel = _chunkZDZCCOUBcjs.workbookSourceLabel; exports.writeSheetPageSetup = writeSheetPageSetup;
920
+ exports.DEFAULT_SHEET_PAGE_SETUP = DEFAULT_SHEET_PAGE_SETUP; exports.GRID_MAX_COLUMNS = GRID_MAX_COLUMNS; exports.GRID_MAX_ROWS = GRID_MAX_ROWS; exports.MARGIN_PRESET_INCHES = MARGIN_PRESET_INCHES; exports.PRINT_ROW_HEIGHT = PRINT_ROW_HEIGHT; exports.SHEET_MARGIN_PRESETS = SHEET_MARGIN_PRESETS; exports.SHEET_PRINT_SCOPES = SHEET_PRINT_SCOPES; exports.SHEET_SCALES = SHEET_SCALES; exports.THUMB_HEIGHT = THUMB_HEIGHT; exports.THUMB_WIDTH = THUMB_WIDTH; exports.buildSheetPrintDocument = buildSheetPrintDocument; exports.cfMatch = cfMatch; exports.collectPrintSheets = collectPrintSheets; exports.configureSheetsHost = _chunkIJNET5TTcjs.configureSheetsHost; exports.copyWorkbook = _chunkIJNET5TTcjs.copyWorkbook; exports.createWorkbook = _chunkIJNET5TTcjs.createWorkbook; exports.deleteWorkbook = _chunkIJNET5TTcjs.deleteWorkbook; exports.discardFailedWorkbook = _chunkIJNET5TTcjs.discardFailedWorkbook; exports.documentPreviewSvg = documentPreviewSvg; exports.downloadSheetAsCsv = downloadSheetAsCsv; exports.downloadSheetAsHtml = downloadSheetAsHtml; exports.downloadSheetAsPdf = downloadSheetAsPdf; exports.downloadSheetAsTsv = downloadSheetAsTsv; exports.formatCellValue = formatCellValue; exports.getLatestSnapshot = _chunkIJNET5TTcjs.getLatestSnapshot; exports.getSheetsHost = _chunkIJNET5TTcjs.getSheetsHost; exports.getWorkbook = _chunkIJNET5TTcjs.getWorkbook; exports.listAccessibleWorkbooks = _chunkIJNET5TTcjs.listAccessibleWorkbooks; exports.listSnapshots = _chunkIJNET5TTcjs.listSnapshots; exports.listTrashedWorkbooks = _chunkIJNET5TTcjs.listTrashedWorkbooks; exports.moveWorkbook = _chunkIJNET5TTcjs.moveWorkbook; exports.normalizeSheetPageSetup = normalizeSheetPageSetup; exports.pageSetupFromMetadata = pageSetupFromMetadata; exports.parseResource = parseResource; exports.planSheetPrint = planSheetPrint; exports.printColumnWidths = printColumnWidths; exports.printDocumentHtml = printDocumentHtml; exports.printGeometry = printGeometry; exports.printSheet = printSheet; exports.readSheetPageSetup = readSheetPageSetup; exports.readWorkbookScopeSource = readWorkbookScopeSource; exports.registerWorkbookScopeSource = registerWorkbookScopeSource; exports.renameWorkbook = _chunkIJNET5TTcjs.renameWorkbook; exports.restoreWorkbook = _chunkIJNET5TTcjs.restoreWorkbook; exports.saveSnapshot = _chunkIJNET5TTcjs.saveSnapshot; exports.sheetGridToCsv = sheetGridToCsv; exports.sheetGridToMarkdownTable = sheetGridToMarkdownTable; exports.snapshotPreviewSvg = snapshotPreviewSvg; exports.snapshotToGridSheets = snapshotToGridSheets; exports.univerSheetIds = univerSheetIds; exports.univerSnapshotToRows = univerSnapshotToRows; exports.updateWorkbookDescription = _chunkIJNET5TTcjs.updateWorkbookDescription; exports.workbookPreviewSvg = workbookPreviewSvg; exports.workbookSourceLabel = _chunkIJNET5TTcjs.workbookSourceLabel; exports.writeSheetPageSetup = writeSheetPageSetup;
921
921
  //# sourceMappingURL=sheets.cjs.map
package/dist/sheets.d.cts CHANGED
@@ -25,6 +25,14 @@ interface SheetsHostPorts {
25
25
  }): Promise<{
26
26
  fileId: string;
27
27
  }>;
28
+ /**
29
+ * The record's CURRENT content, including what people are typing in a live co-editing room and have not saved
30
+ * (the app folds the room; the package owns no server). Optional: a host without co-editing leaves it out and
31
+ * a copy takes the newest saved snapshot. It may throw; the copy then fails with its message, never silently.
32
+ */
33
+ readCurrentSnapshot?(workbookId: string): Promise<{
34
+ snapshot: unknown | null;
35
+ }>;
28
36
  }
29
37
  declare function configureSheetsHost(ports: SheetsHostPorts): void;
30
38
  declare function getSheetsHost(): SheetsHostPorts;
@@ -143,7 +151,7 @@ declare function restoreWorkbook(workbookId: string): Promise<ServiceResult<true
143
151
  declare function listTrashedWorkbooks(): Promise<ServiceResult<Workbook$1[]>>;
144
152
  /**
145
153
  * An independent copy of a workbook: its own row in the original's organization
146
- * and project, with the latest snapshot copied over. Editing the copy never
154
+ * and project, with the CURRENT content copied over (the live room when people are co-editing). Editing the copy never
147
155
  * touches the original.
148
156
  */
149
157
  declare function copyWorkbook(workbookId: string, name?: string): Promise<ServiceResult<Workbook$1>>;
package/dist/sheets.d.ts CHANGED
@@ -25,6 +25,14 @@ interface SheetsHostPorts {
25
25
  }): Promise<{
26
26
  fileId: string;
27
27
  }>;
28
+ /**
29
+ * The record's CURRENT content, including what people are typing in a live co-editing room and have not saved
30
+ * (the app folds the room; the package owns no server). Optional: a host without co-editing leaves it out and
31
+ * a copy takes the newest saved snapshot. It may throw; the copy then fails with its message, never silently.
32
+ */
33
+ readCurrentSnapshot?(workbookId: string): Promise<{
34
+ snapshot: unknown | null;
35
+ }>;
28
36
  }
29
37
  declare function configureSheetsHost(ports: SheetsHostPorts): void;
30
38
  declare function getSheetsHost(): SheetsHostPorts;
@@ -143,7 +151,7 @@ declare function restoreWorkbook(workbookId: string): Promise<ServiceResult<true
143
151
  declare function listTrashedWorkbooks(): Promise<ServiceResult<Workbook$1[]>>;
144
152
  /**
145
153
  * An independent copy of a workbook: its own row in the original's organization
146
- * and project, with the latest snapshot copied over. Editing the copy never
154
+ * and project, with the CURRENT content copied over (the live room when people are co-editing). Editing the copy never
147
155
  * touches the original.
148
156
  */
149
157
  declare function copyWorkbook(workbookId: string, name?: string): Promise<ServiceResult<Workbook$1>>;
package/dist/sheets.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  saveSnapshot,
17
17
  updateWorkbookDescription,
18
18
  workbookSourceLabel
19
- } from "./chunk-WKBWRG7N.js";
19
+ } from "./chunk-RREOARR4.js";
20
20
 
21
21
  // src/sheets/univer-snapshot-rows.ts
22
22
  function univerSheetIds(snapshot) {