@docx-editor.dev/editor-api 2.4.0 → 2.4.1

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/README.md CHANGED
@@ -55,6 +55,12 @@ try {
55
55
  }
56
56
  ```
57
57
 
58
+ `createServer` finishes its bounded parse before its promise resolves and does not retain the input
59
+ `Uint8Array`; you may reuse or transfer that buffer afterward. Every `save()` returns a fresh,
60
+ caller-owned `Uint8Array`, so transferring or mutating one result does not affect the runtime or a
61
+ later save. Detached edits remain detached until your application explicitly loads the returned
62
+ bytes into a live editor.
63
+
58
64
  ## In the browser
59
65
 
60
66
  The browser entry takes an editor the host already created, from `@docx-editor.dev/react` or a
@@ -21,8 +21,8 @@
21
21
  * @packageDocumentation
22
22
  * @public
23
23
  */
24
- import { y as DocxEditorRuntime, C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-BHhEJM8H.mjs';
25
- export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-BHhEJM8H.mjs';
24
+ import { y as DocxEditorRuntime, C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-DbbWqWoz.mjs';
25
+ export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-DbbWqWoz.mjs';
26
26
  import { DocxEditorInstance } from '@docx-editor.dev/core/editor';
27
27
  import '@docx-editor.dev/core/automation';
28
28
 
package/dist/browser.d.ts CHANGED
@@ -21,8 +21,8 @@
21
21
  * @packageDocumentation
22
22
  * @public
23
23
  */
24
- import { y as DocxEditorRuntime, C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-BHhEJM8H.js';
25
- export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-BHhEJM8H.js';
24
+ import { y as DocxEditorRuntime, C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-DbbWqWoz.js';
25
+ export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-DbbWqWoz.js';
26
26
  import { DocxEditorInstance } from '@docx-editor.dev/core/editor';
27
27
  import '@docx-editor.dev/core/automation';
28
28
 
package/dist/index.d.mts CHANGED
@@ -58,8 +58,8 @@
58
58
  * @packageDocumentation
59
59
  * @public
60
60
  */
61
- import { C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-BHhEJM8H.mjs';
62
- export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, y as DocxEditorRuntime, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-BHhEJM8H.mjs';
61
+ import { C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-DbbWqWoz.mjs';
62
+ export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, y as DocxEditorRuntime, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-DbbWqWoz.mjs';
63
63
  import '@docx-editor.dev/core/automation';
64
64
 
65
65
  /**
package/dist/index.d.ts CHANGED
@@ -58,8 +58,8 @@
58
58
  * @packageDocumentation
59
59
  * @public
60
60
  */
61
- import { C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-BHhEJM8H.js';
62
- export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, y as DocxEditorRuntime, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-BHhEJM8H.js';
61
+ import { C as CreateServerOptions, D as DocxEditorServerRuntime } from './server-DbbWqWoz.js';
62
+ export { B as BesideLocation, a as Body, b as BodyInsertParagraphLocation, c as BodyInsertTextLocation, d as Bookmark, e as BookmarkCollection, f as ClientObject, g as ClientResult, h as Comment, i as CommentCollection, j as CommentReply, k as CommentReplyCollection, l as ContentControl, m as ContentControlCollection, n as ContentControlLockState, o as ContentControlSubtype, p as ContentControlValue, q as Document, r as DocumentCapabilities, s as DocumentLimits, t as DocumentXmlLimits, u as DocumentZipLimits, v as DocxEditorError, w as DocxEditorErrorCode, x as DocxEditorErrorInit, y as DocxEditorRuntime, F as Font, H as HeaderFooterType, I as InsertLocation, L as List, z as ListCollection, A as ListItem, E as LoadOption, G as LoadQueryOptions, N as NoteItem, J as NoteItemCollection, K as NoteItemType, P as PageOrientation, M as PageSetup, O as Paragraph, Q as ParagraphAlignment, R as ParagraphCollection, S as ParagraphInsertTextLocation, T as Range, U as RangeCollection, V as RangeInsertTextLocation, W as RequestContext, X as Revision, Y as RevisionCollection, Z as RevisionType, _ as RunCallback, $ as SearchOptions, a0 as Section, a1 as SectionCollection, a2 as SelectionMode, a3 as TrackedObjects, a4 as isDocxEditorError } from './server-DbbWqWoz.js';
63
63
  import '@docx-editor.dev/core/automation';
64
64
 
65
65
  /**
@@ -1369,7 +1369,11 @@ interface DocxEditorRuntime {
1369
1369
  * @public
1370
1370
  */
1371
1371
  interface DocxEditorServerRuntime extends DocxEditorRuntime {
1372
- /** The current document as DOCX bytes. */
1372
+ /**
1373
+ * The current document as a fresh, caller-owned DOCX byte array.
1374
+ *
1375
+ * Mutating or transferring the returned array does not change this runtime or a later save.
1376
+ */
1373
1377
  save(): Promise<Uint8Array>;
1374
1378
  }
1375
1379
 
@@ -2021,6 +2025,9 @@ interface DocumentLimits {
2021
2025
  * they did not author gets "not a document this API can open", so a probe cannot use the error to
2022
2026
  * learn the reader's limits.
2023
2027
  *
2028
+ * The bounded parse is complete when this promise resolves. The runtime does not retain the
2029
+ * caller's `Uint8Array`, so the caller may reuse or transfer that input buffer afterward.
2030
+ *
2024
2031
  * @public
2025
2032
  */
2026
2033
  interface CreateServerOptions {
@@ -1369,7 +1369,11 @@ interface DocxEditorRuntime {
1369
1369
  * @public
1370
1370
  */
1371
1371
  interface DocxEditorServerRuntime extends DocxEditorRuntime {
1372
- /** The current document as DOCX bytes. */
1372
+ /**
1373
+ * The current document as a fresh, caller-owned DOCX byte array.
1374
+ *
1375
+ * Mutating or transferring the returned array does not change this runtime or a later save.
1376
+ */
1373
1377
  save(): Promise<Uint8Array>;
1374
1378
  }
1375
1379
 
@@ -2021,6 +2025,9 @@ interface DocumentLimits {
2021
2025
  * they did not author gets "not a document this API can open", so a probe cannot use the error to
2022
2026
  * learn the reader's limits.
2023
2027
  *
2028
+ * The bounded parse is complete when this promise resolves. The runtime does not retain the
2029
+ * caller's `Uint8Array`, so the caller may reuse or transfer that input buffer afterward.
2030
+ *
2024
2031
  * @public
2025
2032
  */
2026
2033
  interface CreateServerOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docx-editor.dev/editor-api",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Document automation for DOCX: a batching object model that drives a document from a server or from an editor already open in a page",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -73,6 +73,6 @@
73
73
  "access": "public"
74
74
  },
75
75
  "dependencies": {
76
- "@docx-editor.dev/core": "^2.4.0"
76
+ "@docx-editor.dev/core": "^2.4.1"
77
77
  }
78
78
  }