@nutrient-sdk/document-authoring 1.10.0-preview.202512190816.90cd35dd5494eda6e0aba78c724b366b267c7ec8 → 1.10.0-preview.202512191647.d0b04b954e3b7e0dd1b4246e792bf01d9cf963f4
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 +2 -2
- package/lib/docauth.mjs +1 -1
- package/lib/docauth.umd.js +1 -1
- package/lib/index.d.cts +37 -0
- package/lib/index.d.mts +37 -0
- package/package.json +1 -1
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.
|
|
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.202512191647.d0b04b954e3b7e0dd1b4246e792bf01d9cf963f4-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.
|
|
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.202512191647.d0b04b954e3b7e0dd1b4246e792bf01d9cf963f4-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-
|
|
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-8f8b0e48872c7cdb.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};
|
package/lib/docauth.umd.js
CHANGED
|
@@ -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-
|
|
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-8f8b0e48872c7cdb.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
|
@@ -851,6 +851,24 @@ export declare type DocAuthEditor = {
|
|
|
851
851
|
* @sidebarGroupOrder 7
|
|
852
852
|
*/
|
|
853
853
|
setToolbarConfig(config: ToolbarConfig): void;
|
|
854
|
+
/**
|
|
855
|
+
* Sets the author name used when creating comments and replies.
|
|
856
|
+
*
|
|
857
|
+
* @since 1.10.0
|
|
858
|
+
* @example
|
|
859
|
+
*
|
|
860
|
+
* ```ts
|
|
861
|
+
* // Set author when user logs in
|
|
862
|
+
* editor.setAuthor('John Doe');
|
|
863
|
+
*
|
|
864
|
+
* // Clear author when user logs out (will use localized "Anonymous")
|
|
865
|
+
* editor.setAuthor('');
|
|
866
|
+
* ```
|
|
867
|
+
*
|
|
868
|
+
* @param name - The author name to use for new comments
|
|
869
|
+
* @see {@linkcode UIOptions#author | UIOptions.author} for setting the initial author.
|
|
870
|
+
*/
|
|
871
|
+
setAuthor(name: string): void;
|
|
854
872
|
/**
|
|
855
873
|
* Adds an event listener that will be called every time the specified event is emitted.
|
|
856
874
|
*
|
|
@@ -4671,6 +4689,25 @@ export declare type UIOptions = {
|
|
|
4671
4689
|
* ```
|
|
4672
4690
|
*/
|
|
4673
4691
|
actions?: Action[];
|
|
4692
|
+
/**
|
|
4693
|
+
* The author name to use when creating comments and replies.
|
|
4694
|
+
*
|
|
4695
|
+
* This can also be changed at runtime using {@linkcode DocAuthEditor#setAuthor | editor.setAuthor()}.
|
|
4696
|
+
*
|
|
4697
|
+
* If not provided, comments will show a localized "Anonymous" author.
|
|
4698
|
+
*
|
|
4699
|
+
* @since 1.10.0
|
|
4700
|
+
* @example
|
|
4701
|
+
*
|
|
4702
|
+
* ```ts
|
|
4703
|
+
* const editor = await system.createEditor(target, {
|
|
4704
|
+
* ui: {
|
|
4705
|
+
* author: 'John Doe',
|
|
4706
|
+
* },
|
|
4707
|
+
* });
|
|
4708
|
+
* ```
|
|
4709
|
+
*/
|
|
4710
|
+
author?: string;
|
|
4674
4711
|
};
|
|
4675
4712
|
|
|
4676
4713
|
/**
|
package/lib/index.d.mts
CHANGED
|
@@ -851,6 +851,24 @@ export declare type DocAuthEditor = {
|
|
|
851
851
|
* @sidebarGroupOrder 7
|
|
852
852
|
*/
|
|
853
853
|
setToolbarConfig(config: ToolbarConfig): void;
|
|
854
|
+
/**
|
|
855
|
+
* Sets the author name used when creating comments and replies.
|
|
856
|
+
*
|
|
857
|
+
* @since 1.10.0
|
|
858
|
+
* @example
|
|
859
|
+
*
|
|
860
|
+
* ```ts
|
|
861
|
+
* // Set author when user logs in
|
|
862
|
+
* editor.setAuthor('John Doe');
|
|
863
|
+
*
|
|
864
|
+
* // Clear author when user logs out (will use localized "Anonymous")
|
|
865
|
+
* editor.setAuthor('');
|
|
866
|
+
* ```
|
|
867
|
+
*
|
|
868
|
+
* @param name - The author name to use for new comments
|
|
869
|
+
* @see {@linkcode UIOptions#author | UIOptions.author} for setting the initial author.
|
|
870
|
+
*/
|
|
871
|
+
setAuthor(name: string): void;
|
|
854
872
|
/**
|
|
855
873
|
* Adds an event listener that will be called every time the specified event is emitted.
|
|
856
874
|
*
|
|
@@ -4671,6 +4689,25 @@ export declare type UIOptions = {
|
|
|
4671
4689
|
* ```
|
|
4672
4690
|
*/
|
|
4673
4691
|
actions?: Action[];
|
|
4692
|
+
/**
|
|
4693
|
+
* The author name to use when creating comments and replies.
|
|
4694
|
+
*
|
|
4695
|
+
* This can also be changed at runtime using {@linkcode DocAuthEditor#setAuthor | editor.setAuthor()}.
|
|
4696
|
+
*
|
|
4697
|
+
* If not provided, comments will show a localized "Anonymous" author.
|
|
4698
|
+
*
|
|
4699
|
+
* @since 1.10.0
|
|
4700
|
+
* @example
|
|
4701
|
+
*
|
|
4702
|
+
* ```ts
|
|
4703
|
+
* const editor = await system.createEditor(target, {
|
|
4704
|
+
* ui: {
|
|
4705
|
+
* author: 'John Doe',
|
|
4706
|
+
* },
|
|
4707
|
+
* });
|
|
4708
|
+
* ```
|
|
4709
|
+
*/
|
|
4710
|
+
author?: string;
|
|
4674
4711
|
};
|
|
4675
4712
|
|
|
4676
4713
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nutrient-sdk/document-authoring",
|
|
3
|
-
"version": "1.10.0-preview.
|
|
3
|
+
"version": "1.10.0-preview.202512191647.d0b04b954e3b7e0dd1b4246e792bf01d9cf963f4",
|
|
4
4
|
"description": "A web SDK for word processing and rich text capabilities.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "lib/docauth.umd.js",
|