@nutrient-sdk/document-authoring 1.10.0-preview.202512190816.90cd35dd5494eda6e0aba78c724b366b267c7ec8 → 1.11.0-preview.202512211414.300a5861107627b515dddf84519ffa4cd0b39abe

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.staging.nutrient.io/releases/document-authoring-1.11.0-preview.202512211414.300a5861107627b515dddf84519ffa4cd0b39abe-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.staging.nutrient.io/releases/document-authoring-1.11.0-preview.202512211414.300a5861107627b515dddf84519ffa4cd0b39abe-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.staging.nutrient.io/2025/1/",window.location.href).href,t=new URL("docauth-impl-77db3ba9af7e778d.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.staging.nutrient.io/2025/1/",window.location.href).href,t=new URL("docauth-impl-77db3ba9af7e778d.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
@@ -653,6 +653,7 @@ export declare type DocAuthDocument = {
653
653
  exportDOCX(options?: ExportDOCXOptions): Promise<ArrayBuffer>;
654
654
  /**
655
655
  * Executes a transaction to programmatically read or modify the document.
656
+ * @since 1.10.0
656
657
  *
657
658
  * @remarks
658
659
  * Provides programmatic access to the document structure through a draft document that can be
@@ -851,6 +852,24 @@ export declare type DocAuthEditor = {
851
852
  * @sidebarGroupOrder 7
852
853
  */
853
854
  setToolbarConfig(config: ToolbarConfig): void;
855
+ /**
856
+ * Sets the author name used when creating comments and replies.
857
+ *
858
+ * @since 1.10.0
859
+ * @example
860
+ *
861
+ * ```ts
862
+ * // Set author when user logs in
863
+ * editor.setAuthor('John Doe');
864
+ *
865
+ * // Clear author when user logs out (will use localized "Anonymous")
866
+ * editor.setAuthor('');
867
+ * ```
868
+ *
869
+ * @param name - The author name to use for new comments
870
+ * @see {@linkcode UIOptions#author | UIOptions.author} for setting the initial author.
871
+ */
872
+ setAuthor(name: string): void;
854
873
  /**
855
874
  * Adds an event listener that will be called every time the specified event is emitted.
856
875
  *
@@ -1416,6 +1435,7 @@ export declare type Locale = 'en' | 'fr' | 'de';
1416
1435
  /**
1417
1436
  * @public
1418
1437
  * @sidebarGroup programmatic api
1438
+ * @since 1.10.0
1419
1439
  */
1420
1440
  export declare namespace Programmatic {
1421
1441
  /**
@@ -4455,6 +4475,9 @@ export declare type ToolbarSeparatorItem = {
4455
4475
  *
4456
4476
  * @public
4457
4477
  * @sidebarGroup programmatic api
4478
+ * @sidebarGroupOrder 1
4479
+ * @since 1.10.0
4480
+ *
4458
4481
  * @see {@linkcode DocAuthDocument.transaction} for running transactions with this callback type.
4459
4482
  * @see {@linkcode TransactionResult} for details on return value options.
4460
4483
  */
@@ -4468,6 +4491,9 @@ export declare type TransactionCallback<T = void> = (context: TransactionContext
4468
4491
  *
4469
4492
  * @public
4470
4493
  * @sidebarGroup programmatic api
4494
+ * @sidebarGroupOrder 2
4495
+ * @since 1.10.0
4496
+ *
4471
4497
  * @see {@linkcode TransactionCallback} for how this context is used
4472
4498
  */
4473
4499
  export declare type TransactionContext = {
@@ -4517,6 +4543,9 @@ export declare type TransactionContext = {
4517
4543
  *
4518
4544
  * @public
4519
4545
  * @sidebarGroup programmatic api
4546
+ * @sidebarGroupOrder 3
4547
+ * @since 1.10.0
4548
+ *
4520
4549
  * @see {@linkcode TransactionCallback} for the callback signature that returns this result type.
4521
4550
  */
4522
4551
  export declare type TransactionResult<T = void> = undefined | boolean | {
@@ -4671,6 +4700,25 @@ export declare type UIOptions = {
4671
4700
  * ```
4672
4701
  */
4673
4702
  actions?: Action[];
4703
+ /**
4704
+ * The author name to use when creating comments and replies.
4705
+ *
4706
+ * This can also be changed at runtime using {@linkcode DocAuthEditor#setAuthor | editor.setAuthor()}.
4707
+ *
4708
+ * If not provided, comments will show a localized "Anonymous" author.
4709
+ *
4710
+ * @since 1.10.0
4711
+ * @example
4712
+ *
4713
+ * ```ts
4714
+ * const editor = await system.createEditor(target, {
4715
+ * ui: {
4716
+ * author: 'John Doe',
4717
+ * },
4718
+ * });
4719
+ * ```
4720
+ */
4721
+ author?: string;
4674
4722
  };
4675
4723
 
4676
4724
  /**
package/lib/index.d.mts CHANGED
@@ -653,6 +653,7 @@ export declare type DocAuthDocument = {
653
653
  exportDOCX(options?: ExportDOCXOptions): Promise<ArrayBuffer>;
654
654
  /**
655
655
  * Executes a transaction to programmatically read or modify the document.
656
+ * @since 1.10.0
656
657
  *
657
658
  * @remarks
658
659
  * Provides programmatic access to the document structure through a draft document that can be
@@ -851,6 +852,24 @@ export declare type DocAuthEditor = {
851
852
  * @sidebarGroupOrder 7
852
853
  */
853
854
  setToolbarConfig(config: ToolbarConfig): void;
855
+ /**
856
+ * Sets the author name used when creating comments and replies.
857
+ *
858
+ * @since 1.10.0
859
+ * @example
860
+ *
861
+ * ```ts
862
+ * // Set author when user logs in
863
+ * editor.setAuthor('John Doe');
864
+ *
865
+ * // Clear author when user logs out (will use localized "Anonymous")
866
+ * editor.setAuthor('');
867
+ * ```
868
+ *
869
+ * @param name - The author name to use for new comments
870
+ * @see {@linkcode UIOptions#author | UIOptions.author} for setting the initial author.
871
+ */
872
+ setAuthor(name: string): void;
854
873
  /**
855
874
  * Adds an event listener that will be called every time the specified event is emitted.
856
875
  *
@@ -1416,6 +1435,7 @@ export declare type Locale = 'en' | 'fr' | 'de';
1416
1435
  /**
1417
1436
  * @public
1418
1437
  * @sidebarGroup programmatic api
1438
+ * @since 1.10.0
1419
1439
  */
1420
1440
  export declare namespace Programmatic {
1421
1441
  /**
@@ -4455,6 +4475,9 @@ export declare type ToolbarSeparatorItem = {
4455
4475
  *
4456
4476
  * @public
4457
4477
  * @sidebarGroup programmatic api
4478
+ * @sidebarGroupOrder 1
4479
+ * @since 1.10.0
4480
+ *
4458
4481
  * @see {@linkcode DocAuthDocument.transaction} for running transactions with this callback type.
4459
4482
  * @see {@linkcode TransactionResult} for details on return value options.
4460
4483
  */
@@ -4468,6 +4491,9 @@ export declare type TransactionCallback<T = void> = (context: TransactionContext
4468
4491
  *
4469
4492
  * @public
4470
4493
  * @sidebarGroup programmatic api
4494
+ * @sidebarGroupOrder 2
4495
+ * @since 1.10.0
4496
+ *
4471
4497
  * @see {@linkcode TransactionCallback} for how this context is used
4472
4498
  */
4473
4499
  export declare type TransactionContext = {
@@ -4517,6 +4543,9 @@ export declare type TransactionContext = {
4517
4543
  *
4518
4544
  * @public
4519
4545
  * @sidebarGroup programmatic api
4546
+ * @sidebarGroupOrder 3
4547
+ * @since 1.10.0
4548
+ *
4520
4549
  * @see {@linkcode TransactionCallback} for the callback signature that returns this result type.
4521
4550
  */
4522
4551
  export declare type TransactionResult<T = void> = undefined | boolean | {
@@ -4671,6 +4700,25 @@ export declare type UIOptions = {
4671
4700
  * ```
4672
4701
  */
4673
4702
  actions?: Action[];
4703
+ /**
4704
+ * The author name to use when creating comments and replies.
4705
+ *
4706
+ * This can also be changed at runtime using {@linkcode DocAuthEditor#setAuthor | editor.setAuthor()}.
4707
+ *
4708
+ * If not provided, comments will show a localized "Anonymous" author.
4709
+ *
4710
+ * @since 1.10.0
4711
+ * @example
4712
+ *
4713
+ * ```ts
4714
+ * const editor = await system.createEditor(target, {
4715
+ * ui: {
4716
+ * author: 'John Doe',
4717
+ * },
4718
+ * });
4719
+ * ```
4720
+ */
4721
+ author?: string;
4674
4722
  };
4675
4723
 
4676
4724
  /**
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.11.0-preview.202512211414.300a5861107627b515dddf84519ffa4cd0b39abe",
4
4
  "description": "A web SDK for word processing and rich text capabilities.",
5
5
  "type": "commonjs",
6
6
  "main": "lib/docauth.umd.js",