@nutrient-sdk/document-authoring 1.10.0-preview.202512190816.90cd35dd5494eda6e0aba78c724b366b267c7ec8 → 1.10.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/README.md CHANGED
@@ -78,7 +78,7 @@ the SDK via `npm`).
78
78
 
79
79
  ### Example
80
80
 
81
- You can download an example project demoing both TypeScript and JavaScript integration from [here](https://document-authoring.cdn.staging.nutrient.io/releases/document-authoring-1.10.0-preview.202512190816.90cd35dd5494eda6e0aba78c724b366b267c7ec8-example.zip), unzip it and run:
81
+ You can download an example project demoing both TypeScript and JavaScript integration from [here](https://document-authoring.cdn.nutrient.io/releases/document-authoring-1.10.0-example.zip), unzip it and run:
82
82
 
83
83
  ```bash
84
84
  npm install
@@ -92,7 +92,7 @@ By default, the Document Authoring SDK will fetch the required files (fonts, emo
92
92
 
93
93
  ### Self-hosting the assets
94
94
 
95
- To host the assets on your own infrastructure you can download them from [here](https://document-authoring.cdn.staging.nutrient.io/releases/document-authoring-1.10.0-preview.202512190816.90cd35dd5494eda6e0aba78c724b366b267c7ec8-assets.zip) and deploy them to a suitable location.
95
+ To host the assets on your own infrastructure you can download them from [here](https://document-authoring.cdn.nutrient.io/releases/document-authoring-1.10.0-assets.zip) and deploy them to a suitable location.
96
96
  Provide an appropriate base path when initializing the Document Authoring SDK.
97
97
 
98
98
  #### Example:
package/lib/docauth.mjs CHANGED
@@ -14,7 +14,7 @@ var e=[
14
14
  // Style actions
15
15
  {id:"style.apply",label:"Apply Style",description:"Apply a style to the selection"}],i={items:[{type:"built-in",id:"zoom-select",builtInType:"zoom"},{type:"separator",id:"sep-after-zoom"},{type:"built-in",id:"mobile-lock",builtInType:"mobile-lock",visible:e=>!!e.mobile},{type:"separator",id:"separator-after-mobile-lock",visible:e=>!!e.mobile},{type:"built-in",id:"undo-btn",builtInType:"undo",visible:e=>!e.mobile},{type:"built-in",id:"redo-btn",builtInType:"redo",visible:e=>!e.mobile},{type:"separator",id:"sep-after-undo-redo",visible:e=>!e.mobile},{type:"built-in",id:"style-menu",builtInType:"style-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-style",visible:e=>!e.mobile},{type:"built-in",id:"font-family-select",builtInType:"font-family",visible:e=>!e.mobile},{type:"built-in",id:"font-size-input",builtInType:"font-size",visible:e=>!e.mobile},{type:"separator",id:"sep-after-font",visible:e=>!e.mobile},{type:"built-in",id:"bold-btn",builtInType:"bold",visible:e=>!e.mobile},{type:"built-in",id:"italic-btn",builtInType:"italic",visible:e=>!e.mobile},{type:"built-in",id:"underline-btn",builtInType:"underline",visible:e=>!e.mobile},{type:"built-in",id:"strikethrough-btn",builtInType:"strikethrough",visible:e=>!e.mobile},{type:"built-in",id:"subscript-btn",builtInType:"subscript",visible:e=>!e.mobile},{type:"built-in",id:"superscript-btn",builtInType:"superscript",visible:e=>!e.mobile},{type:"separator",id:"sep-after-character-formatting",visible:e=>!e.mobile},{type:"built-in",id:"text-color-picker",builtInType:"text-color",visible:e=>!e.mobile},{type:"built-in",id:"highlight-color-picker",builtInType:"highlight-color",visible:e=>!e.mobile},{type:"separator",id:"sep-after-colors",visible:e=>!e.mobile},{type:"built-in",id:"align-left-btn",builtInType:"align-left",visible:e=>!e.mobile},{type:"built-in",id:"align-center-btn",builtInType:"align-center",visible:e=>!e.mobile},{type:"built-in",id:"align-right-btn",builtInType:"align-right",visible:e=>!e.mobile},{type:"built-in",id:"align-justify-btn",builtInType:"align-justify",visible:e=>!e.mobile},{type:"separator",id:"sep-after-alignment",visible:e=>!e.mobile},{type:"built-in",id:"line-spacing-menu",builtInType:"line-spacing-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-line-spacing",visible:e=>!e.mobile},{type:"built-in",id:"bulleted-list",builtInType:"bulleted-list",visible:e=>!e.mobile},{type:"built-in",id:"numbered-list",builtInType:"numbered-list",visible:e=>!e.mobile},{type:"separator",id:"sep-after-lists",visible:e=>!e.mobile},{type:"built-in",id:"decrease-indent-btn",builtInType:"decrease-indent",visible:e=>!e.mobile},{type:"built-in",id:"increase-indent-btn",builtInType:"increase-indent",visible:e=>!e.mobile},{type:"separator",id:"sep-after-indentation",visible:e=>!e.mobile},{type:"built-in",id:"clear-formatting-btn",builtInType:"clear-formatting",visible:e=>!e.mobile},{type:"built-in",id:"formatting-marks-btn",builtInType:"formatting-marks",visible:e=>!e.mobile},{type:"separator",id:"sep-after-formatting-marks",visible:e=>!e.mobile},{type:"built-in",id:"page-setup-menu",builtInType:"page-setup-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-page-setup",visible:e=>!e.mobile},{type:"built-in",id:"insert-menu",builtInType:"insert-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-insert",visible:e=>!e.mobile},{type:"built-in",id:"table-menu",builtInType:"table-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-table",visible:e=>!e.mobile},{type:"built-in",id:"download-menu",builtInType:"download-menu"},{type:"separator",id:"sep-before-ui-settings",visible:e=>!e.mobile},{type:"built-in",id:"ui-settings-menu",builtInType:"ui-settings-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-ui-settings",visible:e=>!e.mobile}]};
16
16
  // ../packages/ui/src/actions/default-actions-standalone.ts
17
- const t={type:"default-index"};async function l(e){return(await(async e=>{const i=new URL(e??"https://document-authoring.cdn.staging.nutrient.io/2025/1/",window.location.href).href,t=new URL("docauth-impl-0004ef0d61f869b6.js",i).href;return import(
17
+ const t={type:"default-index"};async function l(e){return(await(async e=>{const i=new URL(e??"https://document-authoring.cdn.nutrient.io/2025/1/",window.location.href).href,t=new URL("docauth-impl-56043b5bf625e32e.js",i).href;return import(
18
18
  /*webpackIgnore: true*/
19
19
  /* @vite-ignore */
20
20
  t)})(e?.assets?.base)).createDocAuthSystem(e)}var n={createDocAuthSystem:l,defaultFontIndex:t,defaultActions:e,defaultToolbarConfig:i};export{l as createDocAuthSystem,n as default,e as defaultActions,t as defaultFontIndex,i as defaultToolbarConfig};
@@ -14,7 +14,7 @@
14
14
  // Style actions
15
15
  {id:"style.apply",label:"Apply Style",description:"Apply a style to the selection"}],t={items:[{type:"built-in",id:"zoom-select",builtInType:"zoom"},{type:"separator",id:"sep-after-zoom"},{type:"built-in",id:"mobile-lock",builtInType:"mobile-lock",visible:e=>!!e.mobile},{type:"separator",id:"separator-after-mobile-lock",visible:e=>!!e.mobile},{type:"built-in",id:"undo-btn",builtInType:"undo",visible:e=>!e.mobile},{type:"built-in",id:"redo-btn",builtInType:"redo",visible:e=>!e.mobile},{type:"separator",id:"sep-after-undo-redo",visible:e=>!e.mobile},{type:"built-in",id:"style-menu",builtInType:"style-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-style",visible:e=>!e.mobile},{type:"built-in",id:"font-family-select",builtInType:"font-family",visible:e=>!e.mobile},{type:"built-in",id:"font-size-input",builtInType:"font-size",visible:e=>!e.mobile},{type:"separator",id:"sep-after-font",visible:e=>!e.mobile},{type:"built-in",id:"bold-btn",builtInType:"bold",visible:e=>!e.mobile},{type:"built-in",id:"italic-btn",builtInType:"italic",visible:e=>!e.mobile},{type:"built-in",id:"underline-btn",builtInType:"underline",visible:e=>!e.mobile},{type:"built-in",id:"strikethrough-btn",builtInType:"strikethrough",visible:e=>!e.mobile},{type:"built-in",id:"subscript-btn",builtInType:"subscript",visible:e=>!e.mobile},{type:"built-in",id:"superscript-btn",builtInType:"superscript",visible:e=>!e.mobile},{type:"separator",id:"sep-after-character-formatting",visible:e=>!e.mobile},{type:"built-in",id:"text-color-picker",builtInType:"text-color",visible:e=>!e.mobile},{type:"built-in",id:"highlight-color-picker",builtInType:"highlight-color",visible:e=>!e.mobile},{type:"separator",id:"sep-after-colors",visible:e=>!e.mobile},{type:"built-in",id:"align-left-btn",builtInType:"align-left",visible:e=>!e.mobile},{type:"built-in",id:"align-center-btn",builtInType:"align-center",visible:e=>!e.mobile},{type:"built-in",id:"align-right-btn",builtInType:"align-right",visible:e=>!e.mobile},{type:"built-in",id:"align-justify-btn",builtInType:"align-justify",visible:e=>!e.mobile},{type:"separator",id:"sep-after-alignment",visible:e=>!e.mobile},{type:"built-in",id:"line-spacing-menu",builtInType:"line-spacing-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-line-spacing",visible:e=>!e.mobile},{type:"built-in",id:"bulleted-list",builtInType:"bulleted-list",visible:e=>!e.mobile},{type:"built-in",id:"numbered-list",builtInType:"numbered-list",visible:e=>!e.mobile},{type:"separator",id:"sep-after-lists",visible:e=>!e.mobile},{type:"built-in",id:"decrease-indent-btn",builtInType:"decrease-indent",visible:e=>!e.mobile},{type:"built-in",id:"increase-indent-btn",builtInType:"increase-indent",visible:e=>!e.mobile},{type:"separator",id:"sep-after-indentation",visible:e=>!e.mobile},{type:"built-in",id:"clear-formatting-btn",builtInType:"clear-formatting",visible:e=>!e.mobile},{type:"built-in",id:"formatting-marks-btn",builtInType:"formatting-marks",visible:e=>!e.mobile},{type:"separator",id:"sep-after-formatting-marks",visible:e=>!e.mobile},{type:"built-in",id:"page-setup-menu",builtInType:"page-setup-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-page-setup",visible:e=>!e.mobile},{type:"built-in",id:"insert-menu",builtInType:"insert-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-insert",visible:e=>!e.mobile},{type:"built-in",id:"table-menu",builtInType:"table-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-table",visible:e=>!e.mobile},{type:"built-in",id:"download-menu",builtInType:"download-menu"},{type:"separator",id:"sep-before-ui-settings",visible:e=>!e.mobile},{type:"built-in",id:"ui-settings-menu",builtInType:"ui-settings-menu",visible:e=>!e.mobile},{type:"separator",id:"sep-after-ui-settings",visible:e=>!e.mobile}]};
16
16
  // ../packages/ui/src/actions/default-actions-standalone.ts
17
- const l={type:"default-index"};async function n(e){return(await(async e=>{const i=new URL(e??"https://document-authoring.cdn.staging.nutrient.io/2025/1/",window.location.href).href,t=new URL("docauth-impl-0004ef0d61f869b6.js",i).href;return import(
17
+ const l={type:"default-index"};async function n(e){return(await(async e=>{const i=new URL(e??"https://document-authoring.cdn.nutrient.io/2025/1/",window.location.href).href,t=new URL("docauth-impl-56043b5bf625e32e.js",i).href;return import(
18
18
  /*webpackIgnore: true*/
19
19
  /* @vite-ignore */
20
20
  t)})(e?.assets?.base)).createDocAuthSystem(e)}var o={createDocAuthSystem:n,defaultFontIndex:l,defaultActions:i,defaultToolbarConfig:t};e.createDocAuthSystem=n,e.default=o,e.defaultActions=i,e.defaultFontIndex=l,e.defaultToolbarConfig=t,Object.defineProperty(e,"__esModule",{value:!0})}));
package/lib/index.d.cts CHANGED
@@ -411,14 +411,8 @@ export declare type CreateEditorOptions = {
411
411
  * @since 1.5.0 Allows toggling/changing various UI options.
412
412
  */
413
413
  ui?: UIOptions;
414
- /**
415
- * @internal
416
- */
417
- __hideDOCXDownload?: boolean;
418
- /**
419
- * @internal
420
- */
421
- __hidePDFDownload?: boolean;
414
+
415
+
422
416
  };
423
417
 
424
418
  /**
@@ -653,6 +647,7 @@ export declare type DocAuthDocument = {
653
647
  exportDOCX(options?: ExportDOCXOptions): Promise<ArrayBuffer>;
654
648
  /**
655
649
  * Executes a transaction to programmatically read or modify the document.
650
+ * @since 1.10.0
656
651
  *
657
652
  * @remarks
658
653
  * Provides programmatic access to the document structure through a draft document that can be
@@ -851,6 +846,24 @@ export declare type DocAuthEditor = {
851
846
  * @sidebarGroupOrder 7
852
847
  */
853
848
  setToolbarConfig(config: ToolbarConfig): void;
849
+ /**
850
+ * Sets the author name used when creating comments and replies.
851
+ *
852
+ * @since 1.10.0
853
+ * @example
854
+ *
855
+ * ```ts
856
+ * // Set author when user logs in
857
+ * editor.setAuthor('John Doe');
858
+ *
859
+ * // Clear author when user logs out (will use localized "Anonymous")
860
+ * editor.setAuthor('');
861
+ * ```
862
+ *
863
+ * @param name - The author name to use for new comments
864
+ * @see {@linkcode UIOptions#author | UIOptions.author} for setting the initial author.
865
+ */
866
+ setAuthor(name: string): void;
854
867
  /**
855
868
  * Adds an event listener that will be called every time the specified event is emitted.
856
869
  *
@@ -1416,6 +1429,7 @@ export declare type Locale = 'en' | 'fr' | 'de';
1416
1429
  /**
1417
1430
  * @public
1418
1431
  * @sidebarGroup programmatic api
1432
+ * @since 1.10.0
1419
1433
  */
1420
1434
  export declare namespace Programmatic {
1421
1435
  /**
@@ -1433,14 +1447,8 @@ export declare namespace Programmatic {
1433
1447
  * @sidebarGroup programmatic api
1434
1448
  */
1435
1449
  export type Range = {
1436
- /**
1437
- * @internal
1438
- */
1439
- begin: number;
1440
- /**
1441
- * @internal
1442
- */
1443
- end?: number;
1450
+
1451
+
1444
1452
  };
1445
1453
  /**
1446
1454
  * Defines text formatting properties that can be applied to document content.
@@ -4455,6 +4463,9 @@ export declare type ToolbarSeparatorItem = {
4455
4463
  *
4456
4464
  * @public
4457
4465
  * @sidebarGroup programmatic api
4466
+ * @sidebarGroupOrder 1
4467
+ * @since 1.10.0
4468
+ *
4458
4469
  * @see {@linkcode DocAuthDocument.transaction} for running transactions with this callback type.
4459
4470
  * @see {@linkcode TransactionResult} for details on return value options.
4460
4471
  */
@@ -4468,6 +4479,9 @@ export declare type TransactionCallback<T = void> = (context: TransactionContext
4468
4479
  *
4469
4480
  * @public
4470
4481
  * @sidebarGroup programmatic api
4482
+ * @sidebarGroupOrder 2
4483
+ * @since 1.10.0
4484
+ *
4471
4485
  * @see {@linkcode TransactionCallback} for how this context is used
4472
4486
  */
4473
4487
  export declare type TransactionContext = {
@@ -4517,6 +4531,9 @@ export declare type TransactionContext = {
4517
4531
  *
4518
4532
  * @public
4519
4533
  * @sidebarGroup programmatic api
4534
+ * @sidebarGroupOrder 3
4535
+ * @since 1.10.0
4536
+ *
4520
4537
  * @see {@linkcode TransactionCallback} for the callback signature that returns this result type.
4521
4538
  */
4522
4539
  export declare type TransactionResult<T = void> = undefined | boolean | {
@@ -4563,15 +4580,7 @@ export declare type UIOptions = {
4563
4580
  */
4564
4581
  enabled: boolean;
4565
4582
  };
4566
- /**
4567
- * @defaultValue `1`
4568
- * @internal
4569
- *
4570
- * Initial zoom level for the editor.
4571
- *
4572
- * Valid range is 0.5 to 4.0, which any values provided will be clamped to.
4573
- */
4574
- initialZoom?: number;
4583
+
4575
4584
  /**
4576
4585
  * Initial toolbar configuration.
4577
4586
  *
@@ -4671,6 +4680,25 @@ export declare type UIOptions = {
4671
4680
  * ```
4672
4681
  */
4673
4682
  actions?: Action[];
4683
+ /**
4684
+ * The author name to use when creating comments and replies.
4685
+ *
4686
+ * This can also be changed at runtime using {@linkcode DocAuthEditor#setAuthor | editor.setAuthor()}.
4687
+ *
4688
+ * If not provided, comments will show a localized "Anonymous" author.
4689
+ *
4690
+ * @since 1.10.0
4691
+ * @example
4692
+ *
4693
+ * ```ts
4694
+ * const editor = await system.createEditor(target, {
4695
+ * ui: {
4696
+ * author: 'John Doe',
4697
+ * },
4698
+ * });
4699
+ * ```
4700
+ */
4701
+ author?: string;
4674
4702
  };
4675
4703
 
4676
4704
  /**
package/lib/index.d.mts CHANGED
@@ -411,14 +411,8 @@ export declare type CreateEditorOptions = {
411
411
  * @since 1.5.0 Allows toggling/changing various UI options.
412
412
  */
413
413
  ui?: UIOptions;
414
- /**
415
- * @internal
416
- */
417
- __hideDOCXDownload?: boolean;
418
- /**
419
- * @internal
420
- */
421
- __hidePDFDownload?: boolean;
414
+
415
+
422
416
  };
423
417
 
424
418
  /**
@@ -653,6 +647,7 @@ export declare type DocAuthDocument = {
653
647
  exportDOCX(options?: ExportDOCXOptions): Promise<ArrayBuffer>;
654
648
  /**
655
649
  * Executes a transaction to programmatically read or modify the document.
650
+ * @since 1.10.0
656
651
  *
657
652
  * @remarks
658
653
  * Provides programmatic access to the document structure through a draft document that can be
@@ -851,6 +846,24 @@ export declare type DocAuthEditor = {
851
846
  * @sidebarGroupOrder 7
852
847
  */
853
848
  setToolbarConfig(config: ToolbarConfig): void;
849
+ /**
850
+ * Sets the author name used when creating comments and replies.
851
+ *
852
+ * @since 1.10.0
853
+ * @example
854
+ *
855
+ * ```ts
856
+ * // Set author when user logs in
857
+ * editor.setAuthor('John Doe');
858
+ *
859
+ * // Clear author when user logs out (will use localized "Anonymous")
860
+ * editor.setAuthor('');
861
+ * ```
862
+ *
863
+ * @param name - The author name to use for new comments
864
+ * @see {@linkcode UIOptions#author | UIOptions.author} for setting the initial author.
865
+ */
866
+ setAuthor(name: string): void;
854
867
  /**
855
868
  * Adds an event listener that will be called every time the specified event is emitted.
856
869
  *
@@ -1416,6 +1429,7 @@ export declare type Locale = 'en' | 'fr' | 'de';
1416
1429
  /**
1417
1430
  * @public
1418
1431
  * @sidebarGroup programmatic api
1432
+ * @since 1.10.0
1419
1433
  */
1420
1434
  export declare namespace Programmatic {
1421
1435
  /**
@@ -1433,14 +1447,8 @@ export declare namespace Programmatic {
1433
1447
  * @sidebarGroup programmatic api
1434
1448
  */
1435
1449
  export type Range = {
1436
- /**
1437
- * @internal
1438
- */
1439
- begin: number;
1440
- /**
1441
- * @internal
1442
- */
1443
- end?: number;
1450
+
1451
+
1444
1452
  };
1445
1453
  /**
1446
1454
  * Defines text formatting properties that can be applied to document content.
@@ -4455,6 +4463,9 @@ export declare type ToolbarSeparatorItem = {
4455
4463
  *
4456
4464
  * @public
4457
4465
  * @sidebarGroup programmatic api
4466
+ * @sidebarGroupOrder 1
4467
+ * @since 1.10.0
4468
+ *
4458
4469
  * @see {@linkcode DocAuthDocument.transaction} for running transactions with this callback type.
4459
4470
  * @see {@linkcode TransactionResult} for details on return value options.
4460
4471
  */
@@ -4468,6 +4479,9 @@ export declare type TransactionCallback<T = void> = (context: TransactionContext
4468
4479
  *
4469
4480
  * @public
4470
4481
  * @sidebarGroup programmatic api
4482
+ * @sidebarGroupOrder 2
4483
+ * @since 1.10.0
4484
+ *
4471
4485
  * @see {@linkcode TransactionCallback} for how this context is used
4472
4486
  */
4473
4487
  export declare type TransactionContext = {
@@ -4517,6 +4531,9 @@ export declare type TransactionContext = {
4517
4531
  *
4518
4532
  * @public
4519
4533
  * @sidebarGroup programmatic api
4534
+ * @sidebarGroupOrder 3
4535
+ * @since 1.10.0
4536
+ *
4520
4537
  * @see {@linkcode TransactionCallback} for the callback signature that returns this result type.
4521
4538
  */
4522
4539
  export declare type TransactionResult<T = void> = undefined | boolean | {
@@ -4563,15 +4580,7 @@ export declare type UIOptions = {
4563
4580
  */
4564
4581
  enabled: boolean;
4565
4582
  };
4566
- /**
4567
- * @defaultValue `1`
4568
- * @internal
4569
- *
4570
- * Initial zoom level for the editor.
4571
- *
4572
- * Valid range is 0.5 to 4.0, which any values provided will be clamped to.
4573
- */
4574
- initialZoom?: number;
4583
+
4575
4584
  /**
4576
4585
  * Initial toolbar configuration.
4577
4586
  *
@@ -4671,6 +4680,25 @@ export declare type UIOptions = {
4671
4680
  * ```
4672
4681
  */
4673
4682
  actions?: Action[];
4683
+ /**
4684
+ * The author name to use when creating comments and replies.
4685
+ *
4686
+ * This can also be changed at runtime using {@linkcode DocAuthEditor#setAuthor | editor.setAuthor()}.
4687
+ *
4688
+ * If not provided, comments will show a localized "Anonymous" author.
4689
+ *
4690
+ * @since 1.10.0
4691
+ * @example
4692
+ *
4693
+ * ```ts
4694
+ * const editor = await system.createEditor(target, {
4695
+ * ui: {
4696
+ * author: 'John Doe',
4697
+ * },
4698
+ * });
4699
+ * ```
4700
+ */
4701
+ author?: string;
4674
4702
  };
4675
4703
 
4676
4704
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutrient-sdk/document-authoring",
3
- "version": "1.10.0-preview.202512190816.90cd35dd5494eda6e0aba78c724b366b267c7ec8",
3
+ "version": "1.10.0",
4
4
  "description": "A web SDK for word processing and rich text capabilities.",
5
5
  "type": "commonjs",
6
6
  "main": "lib/docauth.umd.js",